Commit Graph

432 Commits

Author SHA1 Message Date
Johannes Rieken
15648f1f73 Handle pending confirmation as error case in inline chat (#297673)
inline
2026-02-25 15:30:52 +01:00
Johannes Rieken
b7238ce5bc Add CancelSessionAction and integrate into inline chat actions (#297048)
* Add CancelSessionAction and integrate into inline chat actions

fixes pressing Cancel not doing anything

* ccr
2026-02-23 18:28:33 +00:00
Johannes Rieken
0ccdf14436 fix: conditionally attach diagnostics based on configuration setting (#297049) 2026-02-23 18:16:09 +00:00
Johannes Rieken
6b820e7b5b Add diagnostics support to inline chat and related actions (#296939)
- Introduce `selectionHasDiagnostics` context key to track diagnostics in the editor selection.
- Implement `FixDiagnosticsAction` to allow users to fix diagnostics directly from inline chat.
- Enhance `InlineChatController` to optionally attach diagnostics to chat requests.
- Update inline chat configuration to include `FixDiagnostics` setting.
- Register new action in the inline chat affordance for fixing diagnostics.
2026-02-23 11:44:40 +01:00
Matt Bierner
cfd0d61d66 Try cleaning up api around acquiring/loading/creating sessions
We have a number of methods that have fairly similar names (get, load, acquire, start). This change tries to align these names a bit more so it's easier to understand which one to use
2026-02-20 13:07:09 -08:00
Johannes Rieken
c613dcbf08 Enhance inline chat functionality and affordances (#296291)
* Enhance inline chat functionality with new actions which allow to continue/enrich an existing chat session

* Refactor inline chat affordances and adjust z-index for overlay widgets

* Add support for queued chat requests in SubmitToChatAction
2026-02-19 15:42:01 +00:00
Johannes
33b466b265 feat: add inline chat input functionality and styling improvements 2026-02-18 12:39:25 +01:00
Johannes Rieken
715f7adc5e Merge pull request #291354 from microsoft/copilot/fix-done-widget-issue
Fix "Done" affordance not hiding after inline chat exits without changes
2026-01-29 10:48:09 +01:00
eleanorjboyd
c2b2a7ab98 address comments 2026-01-28 11:54:22 -08:00
eleanorjboyd
cafabc758f bug: prioritize user-selected model during same vscode session for inline chat 2026-01-28 11:34:48 -08:00
copilot-swe-agent[bot]
db70877d18 Fix "Done" affordance not going away after inline chat exit without changes
Co-authored-by: jrieken <1794099+jrieken@users.noreply.github.com>
2026-01-28 18:05:04 +00:00
Eleanor Boyd
d1bae8a836 enhance model selection logic to use location based defaults and bring back session model section tracking (#289993)
* enhance model selection logic to use location based defaults and bring back session model section tracking

* handle comments

* cleanup

* comments addressed
2026-01-27 07:12:18 +00:00
Copilot
4de5008c32 Support model as string[] in custom agent definitions (#289655)
* Initial plan

* Support model as string or string[] in custom agents

- Updated ICustomAgent.model to support string | string[] | undefined
- Updated IChatModeData.model and IChatMode.model accordingly
- Added getStringOrStringArrayAttribute method in PromptHeader
- Updated validateModel in promptValidator to handle both string and array types
- Added comprehensive tests for model array validation

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

* Support model as string or string[] in custom agents - verified

- All code compiles successfully with 0 errors
- Tests verified to compile and be comprehensive
- Backward compatible with single string models
- Type-safe implementation with proper validation

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

* Fix: Include empty strings in model array parsing

- Updated getStringOrStringArrayAttribute to include empty strings
- Allows downstream validation to catch empty string errors
- Addresses code review feedback

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

* Fix: Update model validation in isCachedChatModeData to allow arrays

- Modified isCachedChatModeData to validate model as string | string[]
- Fixes test failures related to cached mode data validation
- All chat tests now passing

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

* update

* add lookupLanguageModelByQualifiedName

* fix completion and hover

* Update src/vs/workbench/contrib/chat/common/languageModels.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix test

* update

* update

* fix

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-26 14:51:26 +00:00
eleanorjboyd
4a6e1b5da5 remove store 2026-01-22 13:01:57 -08:00
eleanorjboyd
df9e0bea2d fix to logging 2026-01-22 07:52:58 -08:00
eleanorjboyd
220c6f18bb Refactor for improved maintainability 2026-01-21 23:02:36 -08:00
eleanorjboyd
219cf91710 New setting for inlinechat.defaultModel 2026-01-21 17:53:18 -08:00
Johannes
61e55c38b2 refactor(inlineChat): rename overlay widget classes and update references
feat(inlineChat): enhance overlay widget positioning and visibility handling
fix(inlineChat): adjust CSS for session overlay progress message
2026-01-21 17:03:17 +01:00
Johannes
09050dd122 feat(inlineChat): add inline chat session overlay and progress handling 2026-01-21 15:48:44 +01:00
Johannes
6ba5c9d738 refactor(inlineChat): rename InlineChatOverlayWidget to InlineChatInputOverlayWidget and update references 2026-01-21 11:55:19 +01:00
Johannes Rieken
90bae3ca47 feat(inlineChat): refactor inline chat affordance and rendering modes (#289159)
* feat(inlineChat): refactor inline chat affordance and rendering modes

- Replaced InlineChatSelectionIndicator with InlineChatAffordance for improved affordance handling.
- Introduced InlineChatGutterAffordance and InlineChatEditorAffordance for gutter and editor affordances respectively.
- Added InlineChatOverlayWidget for rendering inline chat as a hover overlay.
- Updated configuration keys to support new affordance options and rendering modes.
- Removed deprecated ShowGutterMenu configuration in favor of more flexible affordance settings.
- Enhanced inline chat behavior to support both zone and hover rendering modes.

* thanks copilot
2026-01-21 07:57:05 +00:00
Johannes Rieken
0292f07476 Gutter inline edit menu (#287103)
* WIP - edit gutter

* ignore empty selections

* tweaks

* wip

* wip

* wip

* proper menu, custom view item with edtor

* wip

* add setting

* Make it inlineChat.showGutterMenu, noZone etc pp

* polish

* use `IChatEntiteldService.sentiment.hidden`

* Add inline chat gutter visibility context and menu actions

* Add inline gutter menu proposal for chat editor

* fix progress message for the overlay

* Add inline chat gutter menu overlay widget and styles

* cleanup

* Refactor inline chat gutter code: remove unused styles and streamline action handling

* Simplify focus tracking logic in inline chat gutter menu widget

* Enhance inline chat gutter menu: improve input handling and dynamic height adjustment
2026-01-19 18:33:34 +01:00
Sandeep Somavarapu
82352d9ab5 do not show copilot models if they are not user selectable (#288078) 2026-01-15 15:02:43 +00:00
Johannes Rieken
472a1bb130 fix how _selectVendorDefaultLanguageModel is set (#287804) 2026-01-14 16:13:31 +00:00
Johannes Rieken
23f6c25c9b Allow vscode.LanguageModelChatInformation#isDefault to be per chat location (#287527)
We have `isDefault` which allows a model to indicate that it is the best/most-recommended model. This PR extends this concept to define default by location, e.g for inline chat a different default model might apply than for panel chat or terminal chat
2026-01-13 10:45:38 -05:00
Johannes Rieken
9d62a24f48 Make inline chat fallback to the default model of selected vendor (#287244)
This makes sure inline chat uses the model the vendor/extension recommends. Also makes sure folks aren't stuck on an old model selection. This can be disabled (via setting) and a custom selection will be honoured for the duration of a vscode session (lifetime of a window)

https://github.com/microsoft/vscode-internalbacklog/issues/6544
2026-01-13 09:45:59 +00:00
Johannes Rieken
70fcd02c91 fix leaking inline chat widget (#287231) 2026-01-13 07:57:19 +00:00
Johannes Rieken
e76e5a9069 Revert "Add inlineChat.persistModelChoice setting" (#287135)
This reverts commit f345afbb17.
2026-01-12 17:29:34 +00:00
Johannes
f345afbb17 Add inlineChat.persistModelChoice setting
This setting allows to control if the inline chat model choice is persisted. The default is `false` (do not persist model choice) because we see many users sticking around with old, less good models.

re https://github.com/microsoft/vscode-internalbacklog/issues/6544
2026-01-12 13:54:05 +01:00
Johannes Rieken
9d3ba969a8 fix support for inline eval (#286552)
* fix support for inline eval

* thank you padawan
2026-01-08 16:11:17 +00:00
Johannes Rieken
74195430ca debt - remove old inline chat world (#286503)
fixes https://github.com/microsoft/vscode/issues/282015
2026-01-08 10:12:31 +00:00
Aaron Munger
5d583ada12 use v2 controller with old notebook prompt (#284160)
* use v2 controller with old notebook prompt

* fix cell edit creation, dont re-open notebooks

* v1 enabled will never be true
2026-01-06 09:37:05 +11:00
Rob Lourens
99d8a2706e Reorganize workbench/contrib/chat (#285467)
* Move some tools files

* chat/accessibility

* Fix this

* Move model files into model/

* Move tool invocation into model/

* Move builtinTools under tools/

* Add common/ui/ folder

* attachments/ and participants/

* browser/widget/ folder

* attachments/ and tools/

* widgetHosts/

* widget/modelPcker/ and context/

* Doc and more organizing

* widget/input/

* widget/chatContentParts/

* More cleanup in common/

* Tweak docs, move a file

* Break up contrib/ folder

* Fix test/ files
2025-12-31 13:02:33 -08:00
Johannes Rieken
d2841596be Make sure not create widget eagerly, enforce editor to have a model when widget gets created (#283023)
https://github.com/microsoft/vscode/issues/283017
2025-12-12 12:23:50 +00:00
Johannes Rieken
97037ea763 fix https://github.com/microsoft/vscode/issues/278112 (#280964) 2025-12-03 14:49:00 +00:00
Johannes Rieken
e69c47a5a0 fixes https://github.com/microsoft/vscode/issues/280756 (#280919) 2025-12-03 11:34:18 +00:00
Johannes Rieken
ce9c9c3931 chore - have ChatRequestEditorData#editor and let it eventually replace document/selection/wholeRange (#280259) 2025-12-01 08:52:02 +00:00
Rob Lourens
8ccd1dae54 Some chat service cleanup (#280105)
* Clean up unused cancel token

* Simplify shouldBeInHistory

* Use real DisposableResourceMap
2025-11-30 13:58:18 +11:00
Johannes Rieken
b10b0bbae0 make sure inline chat restore state after switching files and but dismisses empty sessions (#280000)
* 💄

* make sure inline chat restore state after switching files and but dismisses empty sessions

fixes https://github.com/microsoft/vscode/issues/278060
2025-11-28 19:41:07 +01:00
Johannes Rieken
c426bc9e9a support modelSelector option when running inline chat (#279976)
https://github.com/microsoft/vscode-copilot-evaluation/issues/894
2025-11-28 14:51:19 +00:00
Johannes Rieken
b299fed13c show error details of failed requests in v2 UI (#279959)
re https://github.com/microsoft/vscode/issues/278065
2025-11-28 12:46:20 +01:00
Johannes Rieken
51eb8fbd82 show progress message (in placeholder place) (#279953)
re https://github.com/microsoft/vscode/issues/278057

also disables MCP via !canUseTools
2025-11-28 10:42:08 +00:00
Johannes Rieken
ca97995de9 don't filter confirmation bits from the UI (#279410)
https://github.com/microsoft/vscode/issues/279340
2025-11-25 18:02:23 +00:00
Rob Lourens
bbdd097bd3 Manage ChatModels with ref-counting, allow running in bg (#278476)
* Manage ChatModels with ref-counting, allow running in bg
Towards #277318

* Rename

* Clear widget viewmodel when editor is closed

* Cleanups

* Comment

* cleanup

* Ensure models disposed

* Revert file

* Fix tests
2025-11-21 05:24:50 +00:00
Johannes Rieken
aea5802acc Use correct location for inline chat (#278559)
* inline chat should use correct location and manually start the editing session

* remove `isGlobalEditingSession` from `startSession`
2025-11-20 11:23:24 +00:00
Connor Peet
9cf56d4ac7 chat: reduce mutability in ichatmodel (#278239)
refs https://github.com/microsoft/vscode/issues/277318
2025-11-19 11:11:47 -08:00
Connor Peet
ea4ccd5f44 chat: add requestNeedsInput on the chat model (#278171)
With a side quest that makes elicitations correctly trigger this, which
involved refactoring their state into an observable.

Also swap requestInProgress/Obs to a single requestInProgress observable.
Synchronous callers can just `.get()` it as needed.
2025-11-18 11:05:28 -08:00
Johannes Rieken
77becee660 Use new inline chat UI all the time (#278139)
* Don't read `inlineChat.enableV2` on the client anymore

The UI is now always the new way but the extension still supports both "back ends"

re https://github.com/microsoft/vscode/issues/278054

* handle graceful files, e.g from /test, graceful

* use artifical version number to make chat happy with code-oss
2025-11-18 16:34:39 +00:00
Connor Peet
798ef59100 chat: remove waitForReady (#277944)
* chat: remove `waitForReady`

- Now that edit sessions are sync, we don't need to wait for them (just
  guard edits) as in https://github.com/microsoft/vscode-copilot/issues/16060
- I noticed `widget.onDidClear()` listeners were actually async and we
  do need to wait for them before we can safely make new input. Revised
  this to a delegate pattern.
- Wait for a view model when sending chat. Also, improved Event.toPromise
  so it can safely be reused -- it now cleans up its own disposable from
  the disposable store or array after it settles.

Resolves #247484

* Update src/vs/base/common/event.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-17 22:55:36 +00:00
Connor Peet
c74439554c chat: make creation of the edit session sync (#277924)
Uses the session state to wait in cases where it's needed

Refs #277318
2025-11-17 19:17:15 +00:00