Commit Graph

128 Commits

Author SHA1 Message Date
Johannes Rieken
a0af0335c8 chore - cleanup (#238118) 2025-01-17 12:10:00 +01:00
Johannes Rieken
24f6dafe20 debt - remove inline chat preview mode (#237654) 2025-01-10 15:24:34 +01:00
Johannes Rieken
a58957af82 fix https://github.com/microsoft/vscode/issues/232918 (#236233) 2024-12-16 16:39:38 +01:00
Johannes Rieken
1097df99c7 remove unused and falsly flagged setting (#232044) 2024-10-23 15:34:11 +02:00
Johannes Rieken
edbf964e42 ensure accept/discard always reveals the zone widget (#228327)
fixes https://github.com/microsoft/vscode-copilot/issues/7933
2024-09-12 11:49:10 +02:00
Johannes Rieken
d869359453 make sure to set argument for lens actions (#228324)
fixes https://github.com/microsoft/vscode-copilot/issues/8037
2024-09-12 11:40:43 +02:00
Benjamin Pasero
6b924c5152 ESM merge to main (#227184)
Co-authored-by: Johannes Rieken <jrieken@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2024-08-30 10:31:46 +02:00
Johannes Rieken
65ce95d652 fix https://github.com/microsoft/vscode/issues/227045 (#227048) 2024-08-29 10:54:44 +02:00
Johannes Rieken
2c24fee996 Polish UI of inline-edits toolbar (#226969)
* use lenses for accept/discard commands

* use lens actions for headless inline ui (and not right-aligned button bar)

* fixes https://github.com/microsoft/vscode/issues/226750
* fixes https://github.com/microsoft/vscode-copilot/issues/7628
* fixes https://github.com/microsoft/vscode-copilot/issues/7707
* fixes (maybe) https://github.com/microsoft/vscode-copilot/issues/7547

* fix https://github.com/microsoft/vscode/issues/226966

* graceful handling of headless run
2024-08-28 17:39:31 +02:00
Johannes Rieken
eb2f7c1a35 add secondary inline chat menu and render response commands there (#226621)
fixes https://github.com/microsoft/vscode-copilot/issues/7368
fixes https://github.com/microsoft/vscode-copilot/issues/6650
2024-08-26 16:06:26 +02:00
Johannes Rieken
51457d01d5 change zone toolbar should not overflow the editor (#226396) 2024-08-23 09:22:05 +02:00
Johannes Rieken
04ebdc5472 make sure to handle accept/discard action in all cases (#226387) 2024-08-23 07:55:42 +02:00
Johannes Rieken
b8236f2c57 inline chat zone tweaks (#226328)
* make sure diff zone is below inline chat zone

* relayout zone toolbar when menu changes
2024-08-23 07:55:14 +02:00
Johannes Rieken
f12921b077 fixes https://github.com/microsoft/vscode-copilot/issues/7481 (#226256) 2024-08-22 16:18:40 +02:00
Johannes Rieken
c7954a2224 keep zone toolbar stable when toggling diff (#226049) 2024-08-20 15:32:15 +02:00
Johannes Rieken
469f45091d add InlineChatController#reviewEdits which allows to reuse the inline code review flow/ui (#225981) 2024-08-19 17:51:14 +02:00
Johannes Rieken
3218292d9d remove ExpTextButtons setting and logic but keep make buttons more dynamic (#225495) 2024-08-13 16:00:26 +02:00
Benjamin Pasero
b18a8c5495 esm - reduce diff (#224388) 2024-07-31 15:59:06 +02:00
Johannes Rieken
53c0b5ac53 Joh/mental-koi (#217004)
* hightlight first button only when inline chat has a prompt

* rename "Cancel Request" to "Stop Request"

* mark `inlineChat.experimental.textButtons` as experimental

* show all "input" command when not using text btns

* When cancelling, undo untill before the request
2024-06-24 13:06:53 +02:00
Johannes Rieken
a2cab7255c don't move inline chat zone into selection when changes aren't far away (#216809)
* return (?) of the info icon

* don't move inline chat zone into selection when changes aren't far away
2024-06-21 15:41:43 +02:00
David Dossett
0bb8c91f56 More polish 2024-06-20 16:28:47 -07:00
Johannes Rieken
a11602734b inline chat positioning polish (#216630)
* make sure to show close button when having just message responses

* * no more intented rendering of inline chat
* make sure the top of the view zone is always revealed
2024-06-19 18:10:43 +02:00
Johannes Rieken
5e2e40c42e tweak accept or discard message (#216384) 2024-06-18 10:00:46 +02:00
Johannes Rieken
2e98100d22 Joh/homely-damselfly (#213376)
* chore - `ReplyResponse` cleanup

* associate hunk data with response id

* Associate hunk data with response state so that accepting hunks updates the text edit group

* first cut of moving N-edits conversion from inline chat to panel
2024-05-24 11:14:49 +02:00
Johannes Rieken
a54e247fba Enable roaming of inflight chat requests (#213239)
This enables to remove the special handling for `/explain`

- fixes https://github.com/microsoft/vscode-copilot/issues/2192
- fixes https://github.com/microsoft/vscode/issues/208706 because inline chat now closes on "view in chat"
- fixes https://github.com/microsoft/vscode-copilot/issues/5288
2024-05-22 18:47:03 +02:00
Johannes Rieken
89eb8a767f make sure to push an undo stop after each request (#213137)
fixes https://github.com/microsoft/vscode-copilot/issues/5736
2024-05-21 12:16:33 +02:00
David Dossett
d1cc483e03 Initial inline chat polish (#212755)
* Initial inline chat polish

* Fix widget padding

* More tweaks
2024-05-15 14:37:04 -07:00
Johannes Rieken
703b81086a Editable chat code compare blocks (#210986)
Have a `DefaultChatTextEditor` that applies chat text edits using the diff editor if possible, normal edits otherwise. The former makes it possible to tweak the diff/changes before applying
2024-04-22 20:00:12 -07:00
Johannes Rieken
3c1a47dc74 inline chat should render outside edits with the new embedded diff rendering (#210980) 2024-04-22 17:10:32 -07:00
Johannes Rieken
ba65916262 improve CodeCompareBlockPart (#210964)
* polish code compare block for chat widgets

* show edits unless applied
* show summary after applying
* know when original file has changed

* don't double apply edits

* separate `IChatTextEdit` (progress chunk) and `IChatTextEditGroup` (response value) so that latter can hold extra state and allows for groups of edits

* fix compile errors
2024-04-23 00:28:59 +02:00
Johannes Rieken
7b91c2d1ba Live mode uses chat widget rendering (#210157)
* reveal editor after making changes

* also give preview models a path component

* workaround errors in diff computer fyi @hediet

* * make live mode be a rendering mode
* render new files with the chat widget and not with a separate zone

* 💄

* fix tests
2024-04-11 14:43:53 +02:00
Johannes Rieken
250ab2f640 render inline chat change decoration also inside minimap (#209414) 2024-04-03 09:38:19 +02:00
Johannes Rieken
dda7e5ead2 inline - fix toggle state of Show Changes (#208899) 2024-03-27 12:45:58 +01:00
Johannes Rieken
ad5a40fb18 Inline chat fixes/feature (#208393)
* only show slash command as detected when not having typed one

* use clearer message that hunks need to be accepted or discard, also add hover with more details

fixes https://github.com/microsoft/vscode/issues/206939
2024-03-22 13:24:07 +01:00
Johannes Rieken
df09a73143 More inline chat fixes and polish (#208387)
* align preview and live mode for previewing new/untitled files

* fix layout when having preview-only changes

* increate max speed of progressive text edits

* History entries are tracked by object identity. Make sure `acceptInput` finds and updates previous entries by text

fyi @roblourens

fixes https://github.com/microsoft/vscode/issues/208386
2024-03-22 11:04:21 +01:00
Johannes Rieken
9626fb0cd2 Inline chat widget tweaks (#206954)
* make status menu configurable

https://github.com/microsoft/vscode/issues/206940

* pull inline chat zone widget into its own file

* 💄

* remove expand/crop feature

* make chat message contents scrollable
2024-03-06 12:51:50 +01:00
Johannes Rieken
95e10d938f Remove livePreview and its implementation (#206073)
* Remove `livePreview` and its implementation

fixes https://github.com/microsoft/vscode/issues/205535

* make compiler happy
2024-02-23 15:19:33 +01:00
Johannes Rieken
2411a9c913 add inlineChat.accessibleDiffView setting (#205837)
fixes https://github.com/microsoft/vscode/issues/205714
2024-02-21 11:06:38 +01:00
Johannes
f439a7d9c5 wip - use accessible diff viewer for hunk info 2024-02-16 14:52:45 +01:00
Johannes Rieken
7215958b3c add commands to navigate between hunks (#205293)
https://github.com/microsoft/vscode/issues/203349
2024-02-15 15:57:24 +01:00
Matt Bierner
531cc0ee62 Don't accidentally create InlineChatFileCreatePreviewWidget when hiding it (#203830) 2024-01-30 12:31:38 -08:00
Johannes Rieken
6be4d6cc52 Don't let actual decorations grow, but still grow the "ambient" background decoration (#203546)
fixes https://github.com/microsoft/vscode-copilot/issues/3713
2024-01-26 18:03:09 +01:00
Johannes Rieken
6eb3213066 inline chat work (#203534)
* debt - use hunks to render preview diff

* add `InteractiveEditorRequest#previewDocument` to indicate for which document edits are previewed before being applied
2024-01-26 15:40:43 +01:00
Johannes Rieken
1f607d67c5 fix https://github.com/microsoft/vscode-copilot/issues/3652 (#203305) 2024-01-24 13:08:06 +01:00
Johannes Rieken
4217af7696 restore stashed sessions for when accidentially dismissing a session (#203006) 2024-01-22 14:31:23 +01:00
Johannes Rieken
053bbeb47c Use hunks also for livePreview and preview mode (#202843)
* more test coverage

* - Session has textModelN and targetUri where they must not always be equal
- for preview mode create textModelN copy so that AI edits can always be applied
- let preview mode work with hunk information

* - live preview uses hunk information
- tweak utils

* fix live-mode toggle diff
2024-01-19 13:14:28 +01:00
Johannes Rieken
e5a7abbc6a Mirror user edits into base model (#202723) 2024-01-18 14:51:52 +01:00
Johannes Rieken
b8b5a4aad0 Move hunk computation into sessions, let strategies render them (#202578)
* chore - move chat session service implementation and interface into their own files

* chore - move chat saving service implementation and interface into their own files

* - move hunks into session (instead of strategy)
- recompute them after receiving AI changes
- accept& discard moves hunks from textModelN to textModel0 and vice versa
- service renames
- tests

* - session doesn't know about an editor, only service does
- allow to "move" session to a different editor
- let controller pickup session after move to its editor
- session saving picks up orphand sessions

* try to restore editors when group is still valid

* ctrl - don't pause when cancellation happens during session create

* fix tests
2024-01-16 14:50:19 +01:00
Johannes Rieken
02580fd00c Make sure AI generate code gets accepted/discarded before saving (#202347)
* add inline chat save logic that ensures AI generated changes are only saved after consent

* live - when cancelling don't undo until start version but revert changes

* add setting to control save participation

* fix typo

* stub new services, fixes tests
2024-01-12 16:29:12 +01:00
Johannes Rieken
b0abf6638b fix https://github.com/microsoft/vscode/issues/202164 (#202317)
* remove start-method from strategies

* rename - activeSession to session

* keep strategy alive when pausing session, let strategy participate in pause, allow to call LiveStrategy#renderChanges repeatedly without recomputing hunks

* reset diff toggled state

* make sure to reset hunk display on done (dipose, accept, discard)

* reset diff state in pause, not hide function
2024-01-12 09:11:05 +01:00