Commit Graph
198 Commits
Author SHA1 Message Date
Johannes f439a7d9c5 wip - use accessible diff viewer for hunk info 2024-02-16 14:52:45 +01:00
Johannes RiekenandGitHub 7215958b3c add commands to navigate between hunks (#205293)
https://github.com/microsoft/vscode/issues/203349
2024-02-15 15:57:24 +01:00
Johannes RiekenandGitHub 9d7e3d9cc1 make live the default mode for inline chat, remove the livePreview setting but not (yet) the implementation (#204706)
https://github.com/microsoft/vscode/issues/204368
2024-02-08 11:58:32 +01:00
Johannes RiekenandGitHub 9cf254d483 support to invoke inline chat controller with a prompt/response pair (#204154) 2024-02-02 16:41:25 +01:00
Johannes RiekenandGitHub 933a728d0e end inline chat session when its provider goes, undo changes and close chat UI (#204125) 2024-02-02 13:28:25 +01:00
Matt BiernerandGitHub 31fbc3dc94 Remove extra not null assertions (#202201)
* Remove extra not null assertions

With https://github.com/microsoft/TypeScript/pull/56908, TS should better preserve type refinements. To help test this out, I made a quick pass through our code to remove type assertions that are no longer needed

Most of these are not impacted by https://github.com/microsoft/TypeScript/pull/56908 but removing them helps TS test changes like this

Not adding an eslint rule for now as it requires whole program intellisense, which is too slow for commit hooks

* Fix merge
2024-01-30 15:43:09 -08:00
Matt BiernerandGitHub 531cc0ee62 Don't accidentally create InlineChatFileCreatePreviewWidget when hiding it (#203830) 2024-01-30 12:31:38 -08:00
Johannes RiekenandGitHub 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 RiekenandGitHub f055b096fd show message when accept or discard is need for saving (#203427)
re https://github.com/microsoft/vscode-copilot/issues/3653
2024-01-25 11:40:46 +01:00
Johannes RiekenandGitHub 4bc3583c4e handle rerun message during make_request state (#203333)
handle `rerun` message during make_request state,

fixes https://github.com/microsoft/vscode-copilot/issues/3650
2024-01-24 13:48:40 +01:00
Johannes RiekenandGitHub 1f607d67c5 fix https://github.com/microsoft/vscode-copilot/issues/3652 (#203305) 2024-01-24 13:08:06 +01:00
Johannes RiekenandGitHub afd4f631aa inline chat fixes (#203297)
* Pause state should be more relaxed and expect partial state

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

* clear stashed session before starting a new session

fixes https://github.com/microsoft/vscode-copilot/issues/3719
2024-01-24 10:40:58 +01:00
Johannes RiekenandGitHub 24f7924634 remove save-block when stashing session (#203164)
also restore save-block when unstashing and fix and issues that would prevent stashing

fixes https://github.com/microsoft/vscode-copilot/issues/3654
2024-01-23 16:31:25 +01:00
Johannes RiekenandGitHub cc593a387e inline chat tweaks and tests (#202984)
* update action ids

* detect user edits inside and outside of chat UI, add test for https://github.com/microsoft/vscode-copilot/issues/3523

* fix tests
2024-01-22 14:39:08 +01:00
Johannes RiekenandGitHub 4217af7696 restore stashed sessions for when accidentially dismissing a session (#203006) 2024-01-22 14:31:23 +01:00
Johannes ceb5e559bd fix compilo 2024-01-19 16:10:55 +01:00
Johannes 53e467c211 fix https://github.com/microsoft/vscode-copilot/issues/315 2024-01-19 15:14:39 +01:00
Johannes RiekenandGitHub 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 RiekenandGitHub e5a7abbc6a Mirror user edits into base model (#202723) 2024-01-18 14:51:52 +01:00
Rob LourensandGitHub 0b571a26e2 Change ChatAgent history to include real requests, response data, variables, etc. (#202541)
* Change ChatAgent history to include real requests, response data, variables, etc.
For #199908

* Tweak

* Update snapshots

* Clean up

* Update addCompleteRequest

* Filter out other progress types

* Fix chat slash command data in history

* Don't include slashCommand in history request at all, since it's deprecated anyway

* undefined
2024-01-17 20:14:36 -08:00
Peng LyuandGitHub f05f54e74c Support command in inline chat followup (#202634) 2024-01-17 08:23:55 -08:00
Johannes RiekenandGitHub d0d22003f7 make sure save constent also works for notebooks (#202666) 2024-01-17 14:42:47 +01:00
Johannes RiekenandGitHub 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 RiekenandGitHub 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 RiekenandGitHub 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
Johannes RiekenandGitHub 8ffbf09e31 Clear edit queue when request errors, tweak Queue/Limiter, tests (#202157)
* don't drag targetWindow all the way across all the layers

* add `ILimiter#clear`, add tests and define onDrain and clear behaviour

* fix compilo

* Queue/Limit - clarify onDrain timing, make sure it fires only once, add whenIdle

* chat - clear edit queue on error, adopt whenIdle

* add test to ensure progress edit stream stop on being cancelled
2024-01-10 15:27:09 +01:00
Johannes RiekenandGitHub 77ca6ccd41 Joh/mysterious-octopus (#202079)
* debt - don't use extra buttons for accept/discard hunk

* - inline chat history shouldn't loop
- preserve the initial value and restore it

fixes https://github.com/microsoft/vscode-copilot-release/issues/671
2024-01-09 15:43:26 +01:00
Johannes RiekenandGitHub 4759837ec9 chore - rearrange bits (#202062) 2024-01-09 11:36:47 +01:00
Johannes RiekenandGitHub 683c7f5172 fix https://github.com/microsoft/vscode/issues/201825 (#202012) 2024-01-08 16:04:57 +01:00
Ulugbek AbdullaevandGitHub 61fb9b10f5 Merge pull request #201299 from microsoft/ulugbekna/inline-chat-detected-intent
inline chat: display detect intent for the duration of the request & allow re-running the request without intent detection
2024-01-08 12:28:15 +01:00
Ulugbek Abdullaev 275819ac9d inline chat: refactor: use RERUN_INPUT instead of ACCEPT_INPUT for re-running without intent detection 2024-01-02 21:27:19 +05:00
Benjamin PaseroandBenjamin Pasero 35c44eeb27 Aux window: reduce $window usage (#195888) 2023-12-30 01:41:14 +01:00
Ulugbek Abdullaev 31541c6b18 inline chat: display detect intent for the duration of the request & allow re-running the request without intent detection 2023-12-20 19:44:30 +05:00
Johannes RiekenandGitHub 0603a4682b allow strategies to control whole range deco, let live not render it (#201224) 2023-12-19 19:20:27 +01:00
Johannes RiekenandGitHub 595e7d4275 fix https://github.com/microsoft/vscode/issues/201197 (#201221) 2023-12-19 17:55:40 +01:00
Johannes RiekenandGitHub 48a9149e6a Joh/overall-swordtail (#201218)
* don't grow wholeRange but accept it as given, pass tracked wholeRange when making a request

* fix it
2023-12-19 16:51:10 +01:00
Johannes RiekenandGitHub 0bd31a85e4 Add inline chat toolbar for close and configure (#201200)
* add input widget toolbar, add close action

* * make "finish on typing" configurable and turn it off by default
* add configure action to widget toolbar

* fix tests
2023-12-19 15:19:11 +01:00
Johannes RiekenandGitHub 3369508fe7 inline chat tweaks (#201126)
* streamline tel data

* rename to LiveStrategy

* fix up highlights
2023-12-18 15:17:26 +01:00
Johannes RiekenandGitHub 2cf5c59bcc reset history offset when finishing session (#200930) 2023-12-15 09:59:44 +01:00
Johannes RiekenandGitHub 054c9129f8 live3 becomes live (#200866) 2023-12-14 18:24:38 +01:00
Johannes RiekenandGitHub f6a6df7dd4 fix https://github.com/microsoft/vscode-copilot/issues/3143 (#200859) 2023-12-14 17:20:18 +01:00
Johannes RiekenandGitHub e1950559a8 Eager inline UI shouldn't show info message nor placeholder to prevent flicker (#200236)
fixes https://github.com/microsoft/vscode-copilot/issues/3194
2023-12-07 12:12:30 +01:00
Johannes RiekenandGitHub 7a5744dffc fix https://github.com/microsoft/vscode-copilot/issues/3134 (#199523) 2023-11-29 12:34:19 +01:00
Johannes RiekenandGitHub ee6922b849 fix https://github.com/microsoft/vscode-copilot/issues/3112 (#199504) 2023-11-29 10:08:11 +01:00
Martin AeschlimannandGitHub 84d1e11bb6 inline chat: bring back message cropping (#199040)
* bring back cropped mesages

* fix
2023-11-27 15:27:55 +01:00
Johannes RiekenandGitHub f54f1b0400 Further tweak light weight diff mode (#199148)
- Let message talk about changes not lines
- Move "Compare" into rhs toolbar as toogle action
2023-11-27 12:21:57 +01:00
Johannes RiekenandGitHub f593d2e626 Joh/weird-mink (#199049)
* fix up wholerange with diff information once all edits are there

* update summary when having changes across ranges
2023-11-24 19:13:50 +01:00
Johannes RiekenandGitHub 5d73488bb3 Use a light weight diff for live inline chat mode (#199027)
* wip

* add yet another live mode which is live and live preview...

* use `renderLines` and view zones for orginal contents, render accept, discard, and compare in line

* remove LiveStrategy2 again

* render insertion diff as progressive changes happen

* implement discard

* implement explicit accept via button and implict accept via typing inside changes

* merge diff changes that are somewhat near

* pass zone, not just widget to strategies

* add `IEditorDecorationsCollection#append`

* move live3 actions into widget, don't render normal accept, discard, allow strategry to trigger accept, discard flows

* cleanup

* make sure re-run works
2023-11-24 15:14:53 +01:00
Johannes RiekenandGitHub 9372453879 persist inline chat history (#198680) 2023-11-20 14:35:53 +01:00
Martin AeschlimannandGitHub 521466d52f inlinechat: add UI for followups (#198563)
inlinechat: add followups
2023-11-17 22:15:48 +01:00