* enhance model selection logic to use location based defaults and bring back session model section tracking
* handle comments
* cleanup
* comments addressed
* 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>
* 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
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
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
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
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.
* 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
* 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>
- Adopting for code blocks
- Switching to use safer `LocalChatSessionUri.parseLocalSessionId` in a few more spots
- Adopting for some contexts and a few more apis
* disable auto-accept for inline chat
* hide inline chat via ESC more
* inline - render picker below input
* remove unneccessary v2 actions
* fix `Enter` to only accept from input when there is no new text typed
* custom placeholder, use prompt as placeholder while request is on
* no min width for inline chat widget
Moves the chat service public APIs to use uris for identifying sessions instead of ids. These uris are preferred as they work correctly for both contributed and local session
This ends up touch a lot of the chat apis. In most cases, the change is simply to pass in the URI instead of the id. In a few cases where the URI hasn't been fully hooked up, I am using `LocalChatSessionUri` to do this conversation
For the chat session implementation, I also switched to use resource maps to store session specific information instead of a normal map
* wip - have a tool that allows inline chat to escape
* wip
* improve move session
* inline chat v2 UI tweaks
* pick up "selected" diagnostics and add them as attachments
* show inline chat widget always above selection
* tweak inline escape tool
* remove `hideOnRequest`
* use `inlineChatApplyEdit` when using inline chat
* make sure to position zone above changes if otherwise inbetween
* 💄
* add logging
* * add inline v2 specific execute toolbar
* add the minimun number of command only
* add keep/discard commands
* Update src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>