Commit Graph

34 Commits

Author SHA1 Message Date
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
3ebe5a4ef7 prepare for not having a "real" inline chat provider (#210069)
* prepare for not having a "real" inline chat provider

- add location to provideWelcomeMessage
- add dynamic/fake inline chat provider for editor agents
- fix inline content widget when not having a message

* fix tests
2024-04-10 18:25:52 +02:00
Johannes Rieken
6a06de0033 Hook up feedback/user-action events for inline chat participants (#210040)
- add a special user-action
- inline chat controller doesn't call handleFeedback directly anymore
- ReplyResonse knows its chat model response
2024-04-10 13:15:40 +02:00
Rob Lourens
437a79c17e Render publisher with dupe chat participant names (#209983)
* Render publisher with dupe chat participant names

* Use publisher for suggest as well
2024-04-09 15:39:53 -07:00
Johannes Rieken
ace2b1b336 use provideSampleQuestions to show initial input of inline chat session (#209947)
* use `provideSampleQuestions` to show initial input of inline chat session

* fix test
2024-04-09 16:01:35 +02:00
Johannes Rieken
abb831f432 add IChatModel#initialLocation (#209930)
This represents the location in which chat started, it also comes with `startSession(location)`. Finally, pass the location along when asking for sample questions
2024-04-09 12:02:29 +02:00
Johannes Rieken
e8836b1f62 add an implict variable that is the inline chat selection and whole range (#209832) 2024-04-08 06:32:40 -07:00
Johannes Rieken
ef6345ae05 Support for attempt and enableCommandDetection in chat model/service (#209826)
* add `IChatRequestModel#attempt` so that rerun request/response can be supported

* - support to run with/without command detection enabled
- adopt agent brigde to new chat request
- add share rerun-commands (but only enable them for inline chat for now)
2024-04-08 14:08:22 +02:00
Rob Lourens
ed6c6d3f28 Kill "interactive session provider" DEAD (#209700)
* Reduce chat provider usage

* Clear out IChat props

* Delete interactive session provider API

* Totally remove static chat provider registration

* Clean up onDidRegisterProvider events

* Remove provider ID references from model

* Eliminate many 'providerId' references

* Simplify view registration

* Clean up participant-specific actions

* Delete getProviderInfos

* Rename context key

* Fix tests

* Fix action label

* Fix view title

* Fix test

* Fix test

* Fix integration test

* Remove more providerId

* Add API stub to make this compatible with the existing Copilot Chat
2024-04-07 21:06:43 -07:00
Johannes Rieken
2a347db49e Prepare for inline chat participants (#209628)
* debt - remove bridge agent when "true" agent appears

* create a SessionExchange from chat model request/response pair

* fix markdown message passing

* use (a little) more of ChatModel world and less of inline chat models

* remove unused test

* fix tests
2024-04-05 16:27:17 +02: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
3ab4e99de2 - getDefaultAgent takes chat agent location
- forward agent location to more places
- updated snapshots
2024-03-21 16:19:43 +01:00
Johannes
42383cb45f post merge fixes 2024-03-21 12:11:06 +01:00
Johannes
bb289d3280 small todo updates 2024-03-20 17:07:46 +01:00
Johannes
15441f4251 Merge branch 'main' into joh/chatWidget 2024-03-20 16:06:03 +01:00
Johannes
6ae696aa56 - first run of cleanup
- update new required services for tests and adjust them
2024-03-20 15:58:55 +01:00
Johannes
6931665097 - fix re-run and re-run with intent detection commands
- add support for tree-rendering detected command/agent in a special way
- first cut of tree-rendering for text edis
2024-03-20 12:38:04 +01:00
Johannes
230e024cd6 updates 2024-03-19 17:08:19 +01:00
Logan Ramos
811ce8a51f Introduce new inline chat error type for showing to the user (#208098)
Introduce new error type for showing to the user
2024-03-19 16:56:09 +01:00
Johannes
86580f4c05 register only one chat agent for all of inline chat 2024-03-19 15:11:51 +01:00
Johannes
1f17652159 - only layout zone widget when visible
- content widget and controller tweaks
- wire up follow up commands
- disable filter for inline chat widget because its weird
- hardcode height
2024-03-19 14:31:53 +01:00
Johannes
82dd541e3d - progress bar is defined by request start/stop
- agent clue makes response objects
2024-03-18 20:03:23 +01:00
Johannes
e5385dac71 - use chat widget also for content widget (shared chat model)
- add TextEdits to chat model
- add IChatTextEdit and IChatUsedSlashCommand to chat progress types
-  hook up ad-hoc agent to inline chat session (no more custom commands)
- add new `State.SHOW_REQUEST` state for when new requests are made
2024-03-18 19:12:44 +01:00
Johannes
8db31dfc5d wip 2024-03-18 14:18:32 +01:00
Johannes
0ac95cc1b7 - use chat input part for content widget
- use chat widget over renderer-reuse and custom input
- allow to configure chat menus/actions
- allow to define filter for chat list/tree
2024-03-15 15:44:41 +01:00
Johannes Rieken
933a728d0e end inline chat session when its provider goes, undo changes and close chat UI (#204125) 2024-02-02 13:28:25 +01:00
Johannes Rieken
1f80d8b8e4 fix https://github.com/microsoft/vscode/issues/203510 (#203798) 2024-01-30 15:54:13 +01:00
Johannes Rieken
6215ccd0e7 send telemetry about accepted/discarded hunks and about response types (#203780) 2024-01-30 12:09:34 +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
5cbd1a836b release inline chat session for untitled file when it becomes saved (non-dirty) (#203454)
fixes https://github.com/microsoft/vscode/issues/203448
2024-01-25 16:21:47 +01:00
Johannes Rieken
4e31c84e0f make sure textModel0 (and textModekN) has a unique uri (#203015) 2024-01-22 16:21:09 +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
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