Commit 15d2d8c
Fix agent host agents in vscode (#312628)
* chat: register in-place action for programmatic chat session contributions
The autorun that registers `openNewChatSessionInPlace.<type>` actions
filters `_contributions` by `_contributionDisposables.has(...)`. Only
extension-contributed providers were getting added to that map (via
`_evaluateAvailability`), so programmatically-registered contributions
(local + remote agent hosts) had no in-place action and the session-type
picker in VS Code threw "command not found" when switching to the local
Copilot CLI agent host.
Mark programmatic registrations as active in
`registerChatSessionContribution` so they participate in the autorun.
Also disambiguate the agent-host displayName in VS Code by suffixing
"- Agent Host", since the extension-host Copilot CLI harness uses the
same "Copilot CLI" label. The Agents window keeps the original
displayName.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: refresh hasCanDelegateProviders context key on programmatic register/unregister
Programmatic chat session contributions bypass _evaluateAvailability,
which was the only path that called _updateHasCanDelegateProvidersContextKey.
Update the context key directly in registerChatSessionContribution and its
dispose so UI gated on ChatContextKeys.hasCanDelegateProviders stays in sync.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 1d8e3cb commit 15d2d8c
2 files changed
Lines changed: 18 additions & 1 deletion
File tree
- src/vs/workbench/contrib/chat/browser
- agentSessions/agentHost
- chatSessions
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
162 | | - | |
| 170 | + | |
163 | 171 | | |
164 | 172 | | |
165 | 173 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
813 | 820 | | |
814 | 821 | | |
815 | 822 | | |
816 | 823 | | |
| 824 | + | |
| 825 | + | |
817 | 826 | | |
818 | 827 | | |
819 | 828 | | |
| |||
0 commit comments