mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 14:04:49 -05:00
* Agents: extract BaseAgentHostSessionsProvider to share local/remote logic (Written by Copilot) Extracts the shared session/config/adapter/notification flow from LocalAgentHostSessionsProvider and RemoteAgentHostSessionsProvider into a new abstract BaseAgentHostSessionsProvider plus a single concrete AgentHostSessionAdapter (with an options bag for variation points), both under src/vs/sessions/contrib/agentHost/browser/. The local provider drops from 1164 to 186 LOC. The remote provider drops from 1457 to 395 LOC, retaining the connection-lifecycle surface (setConnection / clearConnection / setAuthenticationPending / setConnectionStatus / setOutputChannelId), the well-known agent-type mapping, and the remote folder picker. Public API and behavior are unchanged; both providers' existing test suites pass unmodified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Agents: merge localAgentHost contrib into agentHost contrib (Written by Copilot) The base provider already lives in src/vs/sessions/contrib/agentHost/. Move the local provider, contribution, and test in alongside it so the local agent host and the shared base sit in one folder. The remote provider stays in its own contrib because it carries substantially more machinery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Clear _currentNewSessionStatus alongside other draft state in createNewSession (Written by Copilot) Addresses Copilot review feedback: when createNewSession throws before _createNewSessionForType runs (no matching sessionType, validation failure), the previous draft's status observable would otherwise be left around. Reset it with the rest of the draft state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>