Skip to content

[pull] main from microsoft:main#1074

Merged
pull[bot] merged 8 commits intocode:mainfrom
microsoft:main
Mar 25, 2026
Merged

[pull] main from microsoft:main#1074
pull[bot] merged 8 commits intocode:mainfrom
microsoft:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 25, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

connor4312 and others added 8 commits March 24, 2026 16:44
* sessions - dim the top area of scrolled out of view chats

* Update src/vs/sessions/browser/media/style.css

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix wrapped title spacing on agent sessions welcome page

* line-height: 1

---------

Co-authored-by: Joaquín Ruales <1588988+jruales@users.noreply.github.com>
…migration (#304626)

* Add session provider interfaces and menu contributions for new session management

* Add DefaultCopilotChatSessionsProvider implementation

Implements ISessionsProvider for the default Copilot session types (CLI and Cloud).
Wraps existing IAgentSessionsService with AgentSessionAdapter that maps
IAgentSession to the new ISessionData interface with observables.

Includes workspace browsing (folder dialog + repo command), session listing,
and session actions (archive, delete, rename) that delegate to underlying services.

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

* Migrate WorkspacePicker to use sessions provider registry

Browse actions (Browse Folders, Browse Repositories, Browse Remotes) are now
sourced from registered ISessionsProvider instances instead of being hardcoded.
Removed direct dependencies on IFileDialogService, ICommandService,
IRemoteAgentHostService, and IQuickInputService — those are now encapsulated
in the provider's browseActions.

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

* Migrate NewChatWidget to use sessions provider registry

Replace hardcoded session type inference (isFolder→Background, isRepo→Cloud,
isRemoteAgentHost→dynamic) with provider registry lookup via
ISessionsProvidersService.getProvidersForWorkspace().

Removed dependencies on IRemoteAgentHostService and
getRemoteAgentHostSessionTarget — target resolution is now the provider's
responsibility.

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

* Replace instanceof picker rendering with declarative pickerVisibility

Add INewSessionPickerVisibility to INewSession interface — each session
implementation declares which pickers should be visible (localModel,
cloudModel, mode, permission, isolation, branch, hasToolbarOptionGroups).

NewChatWidget._setNewSession() now calls a single _renderSessionPickers()
that reads pickerVisibility instead of using instanceof checks against
AgentHostNewSession/RemoteNewSession/CopilotCLISession.

Removed the three type-specific methods:
- _renderAgentHostSessionPickers()
- _renderLocalSessionPickers()
- _renderRemoteSessionPickers()

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

* Migrate SessionsManagementService factory to use provider registry

Replace hardcoded if/else chain in createNewSessionForTarget() with a
provider registry lookup. The service now finds the provider that handles
the requested target type and delegates session creation to it.

Removed direct imports of CopilotCLISession, RemoteNewSession, and
AgentHostNewSession — the factory no longer needs to know about concrete
session implementations.

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

* Register isolation and branch pickers as menu actions via IActionViewItemService

DefaultCopilotChatSessionsProvider.registerMenuContributions() now:
- Registers Action2 entries for isolation and branch pickers into
  Menus.NewSessionRepositoryConfig with when: IsActiveSessionBackgroundProviderContext
- Registers IActionViewItemService factories that create the picker widgets
  as BaseActionViewItem wrappers

This enables a MenuWorkbenchToolBar to render the pickers automatically,
with visibility controlled by context keys rather than instanceof checks.

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

* Remove empty leftover files from previous refactoring

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

* Make IsolationPicker session-aware via ISessionsManagementService

IsolationPicker now observes the active session to determine git repo
availability instead of relying on the widget to call setHasGitRepo().
Removed setVisible() — visibility is self-managed based on internal state
(hasGitRepo + isolationOptionEnabled). The picker still fires onDidChange
for the widget to push isolation mode to INewSession.

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

* Remove widget orchestration of IsolationPicker visibility

IsolationPicker now self-manages visibility by observing the active session.
Removed all setVisible() and setHasGitRepo() calls from NewChatWidget —
the picker handles these internally.

The picker still fires onDidChange so the widget can push isolation mode
to INewSession.setIsolationMode().

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

* Make BranchPicker session-aware via ISessionsManagementService

BranchPicker now observes the active session to get the project's repository
and loads branches automatically. Self-manages visibility based on repository
availability. Removed setRepository() and setVisible() — the picker handles
these internally.

Removed all setRepository/setVisible calls from NewChatWidget for both
isolation and branch pickers. The widget only listens to their onDidChange
events to push state to INewSession.

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

* Make Mode and Permission pickers session-aware

ModePicker and PermissionPicker now observe ISessionsManagementService.newSession
to self-manage visibility based on the session's pickerVisibility.
ModePicker pushes mode to the session directly via its autorun.

Added newSession observable to ISessionsManagementService so pickers can
observe the current new session being configured.

Updated IsolationPicker and BranchPicker to use the new newSession observable
instead of the previous hack with private field access.

Removed all setVisible() calls for mode and permission pickers from
NewChatWidget — they are now fully self-managing.

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

* Make model pickers session-aware

CloudModelPicker now observes ISessionsManagementService.newSession to
self-manage visibility and session binding. Removed setVisible() and
manual setSession() calls from NewChatWidget.

Local model picker container visibility now driven by autorun observing
newSession.pickerVisibility.localModel instead of _renderSessionPickers.

_renderSessionPickers is now minimal — only handles extension-driven
toolbar pickers and git repo opening.

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

* Move git repo resolution to DefaultCopilotChatSessionsProvider

Git repository opening is now the provider's responsibility. When creating
a CLI session with a folder workspace, the provider resolves the git repo
and attaches it to the session's project. Pickers observe the session and
react automatically.

Removed _openRepository(), _repositoryLoading, _openRepositoryCts, and
IGitService dependency from NewChatWidget.

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

* Unify session interface: ISessionData replaces INewSession on public surface

ISessionsProvider.createNewSession() now returns ISessionData instead of
INewSession. Added setSessionOption(sessionId, key, value) for pickers
to write through the provider.

Extended ISessionData with:
- SessionStatus.Configuring for pre-send phase
- ISessionPickerVisibility for UI picker control
- workspace as IObservable (changes during configuration)

INewSession becomes provider-internal — not exposed on any service interface.

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

* Implement ISessionData in DefaultCopilotChatSessionsProvider

createNewSession() now returns ISessionData via NewSessionDataAdapter
which wraps INewSession internally. setSessionOption() routes option
changes to the underlying INewSession.

AgentSessionAdapter updated to match new ISessionData interface
(workspace as observable, pickerVisibility).

INewSession is now fully internal to the provider — not exposed
on any public interface.

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

* Switch all pickers to ISessionsProvidersService

All pickers now observe ISessionsProvidersService.activeSession (ISessionData)
instead of ISessionsManagementService.newSession (INewSession).

ModePicker uses sessionsProvidersService.setSessionOption() to push mode.
IsolationPicker reads workspace.repositories from ISessionData.
PermissionPicker and CloudModelPicker observe activeSession.pickerVisibility.

Removed newSession observable from ISessionsManagementService interface.

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

* Add new session provider service interfaces

* Move extension toolbar pickers to self-contained ExtensionToolbarPickers

Created ExtensionToolbarPickers class that observes ISessionsProvidersService
activeSession and dynamically renders extension-driven option group pickers
(ChatSessionPickerActionItem / SearchableOptionPickerActionItem) for Cloud
sessions.

Removed ~120 lines from NewChatWidget:
- _renderSessionPickers(), _renderToolbarPickers(), _renderToolbarPickerWidget()
- _clearToolbarPickers(), _clearAllPickers()
- _updateOptionContextKey(), _getOrCreateOptionEmitter()
- _toolbarPickerWidgets, _toolbarPickerDisposables, _optionEmitters, _optionContextKeys

NewChatWidget now has zero picker rendering logic — all pickers are
self-managing via session observation.

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

* Refine interfaces: remove pickerVisibility, canHandle, setSessionOption

Addressed design feedback:
- SessionStatus: renamed Configuring→Untitled, added InProgress and NeedsInput
- Removed ISessionPickerVisibility from ISessionData — pickers use menu
  when-clauses, not session-declared visibility
- Removed canHandle() from ISessionsProvider — workspace→provider mapping
  is implicit via browse actions
- Removed setSessionOption() — provider-internal wiring, not public API
- Removed registerMenuContributions() — providers register contributions
  statically via workbench contributions
- Removed NewSessions.WorkspaceMenu — workspace picker is a fixed widget
- Added getSessionTypesForWorkspace() to ISessionsProvidersService — the
  session type selector is a fixed picker that queries this

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

* Migrate sidebar and title bar to use ISessionsProvidersService

Title bar:
- Added ISessionsProvidersService injection
- _getActiveSessionLabel() prefers ISessionData.title from providers service
- _getActiveSessionIcon() prefers ISessionData.icon from providers service
- _getRepositoryLabel() prefers ISessionData.workspace.label from providers service
- Added autorun on sessionsProvidersService.activeSession for re-rendering
- Falls back to legacy ISessionsManagementService path when ISessionData unavailable

Sidebar:
- Added ISessionsProvidersService injection
- allowedProviders now derived from registered providers' session types
  instead of hardcoded [Background, Cloud]
- Removed hardcoded overrideExclude and providerLabelOverrides
- Removed AgentSessionProviders and isAgentHostTarget imports

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

* Move activeSession to ISessionsManagementService, remove from ISessionsProvidersService

Added activeSessionData: IObservable<ISessionData> to ISessionsManagementService.
Deprecated activeSession (IActiveSessionItem) — use activeSessionData instead.

Removed activeSession and openSession from ISessionsProvidersService — it's
a registry/aggregator, not a session state manager.

Title bar now reads from activeSessionService.activeSessionData instead of
sessionsProvidersService.activeSession. Removed ISessionsProvidersService
dependency from title bar.

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

* Remove visibility management from all pickers

Pickers are now dumb widgets — they render and handle interaction only.
Visibility is controlled by context keys and menu when-clauses, not by
autorun blocks toggling display:none.

Removed from all pickers:
- autorun blocks observing activeSession/newSession for visibility
- _updateVisibility() methods
- ISessionsProvidersService dependencies (no longer needed)

Pickers affected: ModePicker, PermissionPicker, IsolationPicker,
BranchPicker, CloudModelPicker, local model picker container.

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

* Move menu registrations to static scope, clean up empty files

Action2 registrations (isolation/branch pickers) are now at module scope
instead of inside registerMenuContributions(). IActionViewItemService
registrations moved to the provider's constructor.

Removed registerMenuContributions() method — it was no longer on the
ISessionsProvider interface and wasn't called.

Deleted recreated empty files.

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

* Add new sessions provider and service interfaces

* Implement ISessionsProvider for RemoteAgentHost

Created RemoteAgentHostSessionsProvider that implements ISessionsProvider
for each agent on a remote agent host connection. Provides:
- Session type: remote-{authority}-{provider}
- Browse action: remote FS folder dialog
- Session creation returning ISessionData

RemoteAgentHostContribution now registers a RemoteAgentHostSessionsProvider
per-agent via ISessionsProvidersService.registerProvider(), alongside the
existing IChatSessionsService registrations. Provider lifecycle is managed
by the agent store — automatically disposed when the agent disconnects.

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

* Fix all TypeScript compilation errors

Fixed across 9 files:
- Removed unused imports, fields, and methods
- Fixed SessionStatus enum references (Configuring→Untitled, Active→InProgress)
- Fixed ISessionsProvidersService.activeSession removal (use ISessionsManagementService)
- Fixed getProvidersForWorkspace→getSessionTypesForWorkspace
- Removed ISessionData.setProject call (provider-internal)
- Cast allowedProviders to AgentSessionProviders[]
- Removed ISessionPickerVisibility references

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

* Register DefaultCopilotChatSessionsProvider via workbench contribution

The provider was defined but never registered with ISessionsProvidersService.
Added DefaultSessionsProviderContribution that instantiates and registers
the provider at WorkbenchPhase.AfterRestored.

This fixes the missing browse actions in the workspace picker.

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

* Fix model picker visibility: local and cloud are mutually exclusive

Both model pickers were visible because visibility management was removed
but they aren't menu-contributed yet. Added autorun in NewChatWidget that
observes the active session's pickerVisibility to toggle local vs cloud
model picker. Restored setVisible() on CloudModelPicker.

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

* Register model pickers as menu actions with context-key visibility

Local model picker and cloud model picker are now registered as Action2
entries in NewSessions.SessionConfigMenu with when-clauses:
- Local model: when isActiveSessionBackgroundProvider

IActionViewItemService factories registered for the cloud model picker.
Model picker visibility in NewChatWidget now driven by sessionType check
instead of pickerVisibility.

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

* Fix model picker visibility: use sessionsManagementService for session creation

_createNewSession now routes through sessionsManagementService.createNewSessionForTarget
which properly sets activeSessionData, context keys (isActiveSessionBackgroundProvider),
and the _newSession observable. This fixes the model picker not showing because
activeSessionData was never set.

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

* Fix model picker not showing on reload

Default to showing local model picker when activeSessionData is undefined
(startup/reload). The default session type is CLI, so local model picker
should be visible until a Cloud session is explicitly created.

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

* Fix session type resolution for different workspace types

Repo workspaces should create Cloud sessions, local folders should create
CLI sessions. The previous getSessionTypesForWorkspace returned all types
without filtering by workspace. Restored workspace-type-based inference
in _createNewSession until workspace picker stores providerId.

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

* Hide permissions picker for Cloud sessions

Permissions picker visibility now tied to session type — only shown for
CLI (Background) sessions. Added autorun and menu action registration
with when: IsActiveSessionBackgroundProviderContext.

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

* Fix permissions picker: use autorun on activeSessionData for visibility

Permissions picker is still widget-owned (needed for reading permissionLevel
at send time). Visibility controlled by observing activeSessionData.sessionType
— only shown for CLI (Background) sessions.

Menu action + IActionViewItemService registration added for future transition
to fully menu-driven rendering once permission state is on ISessionData.

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

* Move permissionLevel to ISessionData, render via MenuWorkbenchToolBar

permissionLevel is now on ISessionData as an IObservable<ChatPermissionLevel>.
NewChatPermissionPicker writes to activeSessionData.permissionLevel when
the user changes the level. sendRequestForNewSession reads it from
activeSessionData instead of a widget-owned picker.

Permissions picker is now rendered via MenuWorkbenchToolBar for
NewSessions.SessionControlMenu — visibility controlled by
IsActiveSessionBackgroundProviderContext context key.

Removed _permissionPicker from NewChatWidget entirely.

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

* Fix permissions picker: use 'navigation' group for inline rendering

MenuWorkbenchToolBar only renders items in the 'navigation' group inline.
Items in other groups go to the overflow menu. Changed permissions picker
action from group 'permissions' to group 'navigation'.

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

* Fix startup race: wait for providers before creating initial session

On reload, the widget renders before DefaultCopilotChatSessionsProvider
is registered (AfterRestored phase). The initial session creation now
waits for onDidChangeProviders if no providers are available yet.

This fixes wrong pickers showing on reload (CLI pickers for a Cloud
session because the provider wasn't found).

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

* Hide mode picker for Cloud sessions

Mode picker visibility now tied to activeSessionData.sessionType —
only shown for CLI (Background) sessions, hidden for Cloud.

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

* Render mode and model pickers via MenuWorkbenchToolBar

Mode, local model, and cloud model pickers are now rendered via
MenuWorkbenchToolBar for NewSessions.SessionConfigMenu. Visibility
controlled by context keys:
- Mode + local model: when isActiveSessionBackgroundProvider

All registered with 'navigation' group for inline rendering.
IActionViewItemService factories create the picker widgets with
full DI (ILanguageModelsService for model list, etc.).

Removed autoruns for model/mode visibility from NewChatWidget.

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

* Remove dead model/mode picker code from newChatViewPane

Mode and model pickers are now created by the sessions provider's
IActionViewItemService factory and rendered by a MenuWorkbenchToolBar.
The widget no longer needs to own these pickers.

Removed:
- _currentLanguageModel, _modelPickerDisposable, _localModelPickerContainer fields
- _cloudModelPicker, _modePicker fields and their instantiation
- _modePicker.onDidChange listener
- _initDefaultModel() calls
- _currentLanguageModel.read(reader) autorun
- Model set block in _setNewSession
- Model restoration block in _restoreState
- Unused imports: IModelPickerDelegate, EnhancedModelPickerActionItem,
  IChatInputPickerOptions, CloudModelPicker, ModePicker,
  ILanguageModelChatMetadataAndIdentifier, ILanguageModelsService,
  observableValue, autorun

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

* Fix model picker showing 'Auto': initialize with default model on load

The IActionViewItemService factory creates the model picker with an empty
currentModel observable. If models aren't loaded yet, it shows 'Auto'.
Now listens for onDidChangeLanguageModels and sets the first available
model as default when models become available.

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

* Remove setVisible from CloudModelPicker — visibility is menu-driven

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

* Align model picker styling with other session pickers

Updated .sessions-chat-model-picker CSS to match .sessions-chat-picker-slot:
- font-size: 12px → 13px
- padding: 3px 6px → 3px 3px 3px 6px
- codicon: 12px → 14px (with flex-shrink: 0)
- Added chevron-down specific sizing (12px, margin-left: 6px)
- Added hover color change, overflow handling, white-space: nowrap

All pickers now share the same visual treatment.

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

* Style config toolbar to match session picker visuals

Updated CSS to target .sessions-chat-config-toolbar (the MenuWorkbenchToolBar
container for mode + model pickers) instead of .sessions-chat-model-picker.
Styles match .sessions-chat-picker-slot for consistent look across all pickers.

Also styles the .monaco-toolbar and .action-item within the config toolbar
to align properly.

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

* Disable model picker until models are available

The model picker action starts with enabled=false if no models are loaded
yet. When onDidChangeLanguageModels fires and models become available,
it sets enabled=true and selects the first model.

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

* Revert "Disable model picker until models are available"

This reverts commit 80c5d5e5956911b58c09ed357f047b14765349a3.

* Hide isolation picker when isolation setting is disabled

Added config-based context key check to the isolation picker's when clause:
config.github.copilot.chat.cli.isolationOption.enabled must not be false.

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

* Simplify isolation config check: use ContextKeyExpr.has()

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

* Fix compilation: add permissionLevel field declarations to NewSessionDataAdapter

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

* Fix isolation/branch picker: use 'navigation' group and equals() for config

- Changed group from 'isolation'/'branch' to 'navigation' for inline rendering
- Changed ContextKeyExpr.has() to ContextKeyExpr.equals(..., true) since
  has() returns true when the config key exists even if value is false

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

* Replace manual isolation/branch render with MenuWorkbenchToolBar

Isolation and branch pickers were being rendered twice — once by the widget
manually and once by MenuWorkbenchToolBar via IActionViewItemService.
Removed the manual render, keeping only the MenuWorkbenchToolBar for
NewSessions.RepositoryConfigMenu.

Widget still holds _isolationPicker/_branchPicker for state reading
(selectedBranch, onDidChange events) until state moves to ISessionData.

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

* Add branch and isolationMode observables to ISessionData implementations

- Add _branch and _isolationMode observableValue fields to NewSessionDataAdapter,
  setting them in setOption() alongside forwarding to _newSession
- Add branch and isolationMode observableValue fields to AgentSessionAdapter
- Add branch and isolationMode to RemoteAgentHostSessionsProvider.createNewSession()
- Inject ISessionsManagementService into IsolationPicker and BranchPicker,
  writing to activeSessionData on selection via ISettableObservable cast
- Remove _branchPicker, _isolationPicker, and _branchLoading from NewChatWidget,
  reading branch from activeSessionData instead

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

* Remove permissionLevel, branch, isolationMode from ISessionData implementations

These fields are provider-internal state, not part of the common ISessionData
interface. Removed from AgentSessionAdapter and RemoteAgentHostSessionsProvider.
Kept on NewSessionDataAdapter as provider-internal fields. Updated
sessionsManagementService to access permissionLevel via cast since it's no
longer on the interface.

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

* Add sessionWorkspaceHasRepository context key for picker visibility

DefaultCopilotChatSessionsProvider observes activeSessionData.workspace
and sets sessionWorkspaceHasRepository context key. Isolation and branch
picker when-clauses now require this key — they only show when a
repository is available in the active session's workspace.

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

* Fix cyclic dependency: move sessionWorkspaceHasRepository to SessionsManagementService

SessionsManagementService now owns the sessionWorkspaceHasRepository
context key, observing activeSessionData.workspace via autorun.
Removed ISessionsManagementService dependency from DefaultCopilotChatSessionsProvider.

Cycle was: Provider → ManagementService → ProvidersService → Provider.
Now: ManagementService manages the context key independently.

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

* Propagate active session to owning provider for context keys

Flow: SessionsManagementService → ISessionsProvidersService.setActiveSession()
→ owning ISessionsProvider.setActiveSession() → provider sets context keys

DefaultCopilotChatSessionsProvider.setActiveSession() observes the session's
workspace and sets sessionWorkspaceHasRepository context key.

SessionsManagementService no longer manages hasRepository context key —
that's the provider's responsibility.

Added setActiveSession()/clearActiveSession() to ISessionsProvider and
ISessionsProvidersService interfaces.

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

* Replace active session propagation with workbench contribution

Remove setActiveSession/clearActiveSession from ISessionsProvider interface,
ISessionsProvidersService interface, and their implementations in
SessionsProvidersService, DefaultCopilotChatSessionsProvider, and
RemoteAgentHostSessionsProvider.

Remove the autorun in SessionsManagementService that propagated active
session changes to providers.

Add DefaultCopilotActiveSessionContribution that observes the active
session directly and sets SessionWorkspaceHasRepositoryContext when the
active session belongs to the default-copilot provider.

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

* Fix sessionWorkspaceHasRepository to check for git repo

Check repo.workingDirectory (set by git service) instead of just
repositories.length. A workspace can have a repository URI without
an actual git repo (e.g., GitHub remote file).

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

* Refactor: merge CopilotCLISession and RemoteNewSession with ISessionData

Move CopilotCLISession and RemoteNewSession from newSession.ts into
defaultCopilotSessionsProvider.ts and make them implement both INewSession
and ISessionData directly, eliminating the NewSessionDataAdapter wrapper.

- CopilotCLISession and RemoteNewSession now carry ISessionData fields
  (sessionId, providerId, title, status, workspace, changes, etc.)
  alongside their existing INewSession functionality
- Remove NewSessionDataAdapter class — no longer needed
- createNewSession() returns the session directly without wrapping
- setSessionOption() routes through setSessionDataOption() on the session
- Add ICopilotNewSessionData interface for type-safe access to
  provider-specific observable fields (branchObservable, isolationModeObservable,
  permissionLevel, hasGitRepo)
- Update extensionToolbarPickers.ts and modelPicker.ts to import
  RemoteNewSession from its new location
- Update sessionsManagementService.ts to extract INewSession directly
  from the session data (no more _newSession indirection)
- Keep INewSession interface and AgentHostNewSession in newSession.ts

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

* Remove INewSession interface from the codebase

- Remove the exported INewSession interface from newSession.ts
- Remove 'implements INewSession' from AgentHostNewSession, CopilotCLISession,
  and RemoteNewSession classes
- Replace INewSession with file-local INewSessionConfig types in
  sessionsManagementService.ts and newChatViewPane.ts that capture only
  the configuration properties needed by each consumer
- Change createNewSessionForTarget return type from INewSession to ISessionData
- Change _newSessionObservable/newSession observable types to ISessionData
- Update ARCHITECTURE.md reference

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

* Fix: setProject now updates ISessionData workspace observable

CopilotCLISession.setProject() was only updating internal _project/_repoUri
fields but not the ISessionData.workspace observable. The
DefaultCopilotActiveSessionContribution couldn't detect workspace changes.

Now setProject() also updates _workspaceData so the workspace observable
reflects the current project.

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

* Move git repo resolution into CopilotCLISession

CopilotCLISession now resolves the git repository itself when setProject()
is called. Injects IGitService directly. Sets _hasGitRepo observable
based on whether gitService.openRepository() succeeds.

Removed _resolveGitRepository from DefaultCopilotChatSessionsProvider —
the session is self-contained. Removed IGitService from the provider.

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

* Move send flow to DefaultCopilotChatSessionsProvider

ISessionsProvider.sendRequest(sessionId) now owns the full send flow:
- Builds IChatSendRequestOptions from session internals
- Opens chat widget, sets permission level
- Loads session model with options
- Sends request via chatService
- Waits for agent session to appear
- Returns ISessionData

SessionsManagementService.sendRequestForNewSession() is now a thin
wrapper that delegates to sessionsProvidersService.sendRequest() and
sets the result as active session.

Removed ~120 lines from SessionsManagementService:
- doSendRequestForNewSession, openNewSession, loadNewSession
- loadProbableNewAgentSession, loadNewAgentSession
- INewSessionConfig interface

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

* Fix TypeScript compilation errors in sessionsManagementService

- Remove unused imports (Event, IDisposable, CancellationToken, etc.)
- Remove unused constructor services (uriIdentityService, chatSessionsService,
  chatWidgetService, chatService, languageModelsService, toolsService)
- Replace MutableDisposable<ISessionData> with plain field since ISessionData
  does not extend IDisposable
- Remove invalid setQuery call on ISessionData in createNewSessionForTarget
- Fix ISessionData branch in setActiveSession to use workspace.get() and
  sessionType instead of non-existent project, target, and onDidChange
- Remove unused DisposableStore and _newActiveSessionDisposables field

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

* Refine sessions provider architecture — manual improvements

Major changes:
- SessionWorkspace simplified to URI scheme constants only (class removed)
- ISessionsProvider interface refined:
  - createNewSession(workspace) takes ISessionWorkspace directly
  - Added setSessionType(), getSessionTypes(), setModel()
  - sendRequest() takes ISendRequestOptions (query + attachedContext)
  - ISessionType gains requiresWorkspaceTrust
  - ISendRequestOptions introduced
- ISessionData extended with modelId, mode, loading observables
- DefaultCopilotChatSessionsProvider emptied (rebuilt separately)
- Picker files consolidated:
  - Deleted: folderPicker, workspacePicker, branchPicker, modePicker,
    modelPicker, sessionTargetPicker
  - New: sessionTypePicker, sessionWorkspacePicker
- NewChatWidget significantly simplified — uses ISessionData directly,
  removed INewSessionConfig
- SessionsManagementService cleaned up
- Title bar and sidebar updated
- Deleted obsolete test files

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

* Rewrite SessionsListControl with WorkbenchObjectTree

Replace WorkbenchList with WorkbenchObjectTree<SessionListItem, FuzzyScore>
for the sessions list. Sessions are now rendered in a proper tree hierarchy
with section headers as collapsible parent nodes.

Key changes:
- Tree widget: WorkbenchObjectTree with FuzzyScore filter data
- Data types: ISessionSection gains an id field; SessionListItem exported
- Session item renderer: Two-row layout with icon, title, workspace,
  diff stats (+N/-N), status description, and relative timestamp
- Section header renderer: Uppercase label with session count
- Grouping: By date (Today/Yesterday/This Week/Older) or repository
- Sorting: By created or updated timestamp descending
- Tree options: No indent guides, hidden twisties, identity provider
- CSS: New .sessions-list-control container, diff stat colors, separator
  dots between detail parts, hidden empty detail spans
- Public API preserved: ISessionsListControlOptions (with deprecated
  ISessionsListOptions alias), all existing control methods

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

* Fix session list rendering: inline details with dot separators

Rebuilt details row to dynamically create elements with · separator
spans between diff stats and timestamp. Removed the has-detail/display:none
approach — details row is cleared and rebuilt each render cycle.

Removed margin-left:auto from time element so it stays inline.
Removed unused workspace/description template fields.

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

* Fix missing diff stats: handle summary changes format

AgentSession.changes can be a summary object { files, insertions, deletions }
instead of an array of IChatSessionFileChange. The _extractChanges method
now creates a synthetic entry from the summary so the renderer can show
+N -N diff statistics.

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

* Fix hidden diff stats: remove leftover has-detail CSS rules

The old CSS rules hid .session-diff, .session-time etc. without the
has-detail class. Since the renderer now creates elements dynamically
(without has-detail), these rules were hiding all detail content.

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

* Align font styles with original agent sessions view

- Added font-variant-numeric: tabular-nums to diff stats
- Set details row gap to 4px (matching original)
- Adjusted separator margin since gap handles spacing

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

* Fix icon size: match original 16px height, remove explicit width

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

* Fix spacing: match original layout exactly

- Replaced gap:8px with padding-left:6px on main column (matching original)
- Icon column uses flex-start + line-height:17px (matching original)
- Codicon inside icon gets font-size:12px, height:16px (matching original)
- Icon state classes (active/pulse) on container, not codicon span

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

* Fix hover margins, grouping, and icon size

- Added padding: 0 6px to scrollable element for horizontal margins
- Fixed grouping: use getRepositoryName() from agentSessionsViewer for
  proper repository name extraction from metadata (checks owner/name,
  repositoryNwo, repository, repositoryUrl, repositoryPath, etc.)

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

* Replicate old agent sessions viewer CSS into new sessions list control

Align the sessions list styling with the old agentsessionsviewer.css:
- Section header: label left-aligned, count right-aligned with margin-left auto
- Section header padding: 0 6px (aligned with session item text)
- Session item: padding 8px 6px, no border-radius on item (on list-row instead)
- List row: border-radius 6px on .monaco-list-row
- Icon: font-size 12px, height 16px, flex-centered
- Title row: line-height 17px, padding-bottom 4px
- Details row: gap 4px, font-size 12px, line-height 15px, max-height 15px
- Diff stats: tabular-nums, chat-specific green/red colors
- Selection/focus colors on section header labels
- Unset colors on selected items for proper theme contrast
- Needs-input pulse animation with 0.4 opacity at 50%
- Reduced motion support

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

* Fix import paths for agent host file system and URI schemes

* Fix repository metadata extraction to match sessionsManagementService

Align _buildWorkspace/_extractRepositoryFromMetadata in
CopilotChatSessionsProvider with the authoritative
getRepositoryFromMetadata logic:

- Cloud sessions: construct GitHub URI from owner/name/branch metadata
  fields instead of reading a pre-built 'repository' string
- CLI sessions: check workingDirectoryPath first, then fall back to
  repositoryPath + worktreePath (was using 'folder' + 'worktree')
- Use URI.file() for local paths instead of URI.parse()
- Add URI.isUri() validation on constructed URIs
- Fix unicode characters in section comments for hygiene

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

* Migrate aiCustomizationWorkspaceService from activeSession to activeSessionData

Replace all IActiveSessionItem usage with ISessionData:
- activeSession.read(reader) → activeSessionData.read(reader)
- getActiveSession() → activeSessionData.get()
- session.worktree/repository → workspace.repositories[0].workingDirectory/uri

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

* Migrate chat.contribution.ts from activeSession to activeSessionData

Replace IActiveSessionItem usage with ISessionData in OpenInVSCode action:
- activeSession.get() → activeSessionData.get()
- providerType → sessionType
- worktree/repository → workspace.repositories[0].workingDirectory/uri

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

* Migrate workspaceFolderManagement from activeSession to activeSessionData

Replace all IActiveSessionItem usage with ISessionData:
- activeSession.read(reader) → activeSessionData.read(reader)
- session.worktree → workspace.repositories[0].workingDirectory
- session.repository → workspace.repositories[0].uri
- session.worktreeBranchName → workspace.repositories[0].detail
- session.providerType → session.sessionType

Also fix pre-existing hygiene issues in sessionsListControl.ts:
- Merge duplicate tree.js import
- Use targetWindow.setInterval/clearInterval for multi-window support
- Replace unicode box-drawing characters with ASCII

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

* Migrate changesViewActions + fixCIChecksAction from activeSession to activeSessionData

- changesViewActions: use activeSessionData.read(reader) instead of
  activeSession.read(reader) + getActiveSession()
- fixCIChecksAction: use activeSessionData in both derived observable
  and run() method

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

* Migrate runScriptAction + sessionsConfigurationService from activeSession to activeSessionData

Replace all IActiveSessionItem usage with ISessionData across:
- runScriptAction.ts: IRunScriptActionContext, all method signatures,
  field accesses (worktree/repository/isUntitled → workspace/status)
- sessionsConfigurationService.ts: all interface methods, internal
  helpers (_getTasksJsonUri, _commitTasksFile, _handleActiveSessionChange)
- sessionsManagementService.ts: commitWorktreeFiles, getGitHubContext,
  getGitHubContextForSession, _parsePRNumberFromSession signatures
- sessionsConfigurationService.test.ts: makeSession() creates ISessionData
  with observables instead of IActiveSessionItem

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

* Migrate changesView from activeSession to activeSessionData

Replace all deprecated activeSession/getActiveSession usage:
- activeSessionResourceObs: use activeSessionData.read(reader)
- activeSessionRepositoryPromiseObs: read workspace.repositories[0].workingDirectory
- agentSessionType context key: use sessionType instead of providerType
- isMergeBaseBranchProtected: read from workspace.repositories[0].baseBranchProtected
- CI status widget: use activeSessionData for derived observables

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

* Add method to get workspace badge label for GitHub remote sessions

* Migrate remaining consumers from activeSession to activeSessionData

Migrate all remaining files that used the deprecated activeSession/
getActiveSession API:
- changesViewController.ts
- github.contribution.ts
- agentFeedback.contribution.ts + agentFeedbackEditorActions.ts
- fileTreeView.ts (resolveTreeRoot uses workspace.repositories[0])
- applyChangesToParentRepo.ts
- sessionsTerminalContribution.ts (getSessionCwd uses workspace)
- codeReviewService.ts + codeReview.contributions.ts
- sessionsViewPane.ts (both old and new views)
- remoteAgentHost.contribution.ts
- workbench.ts (IMinimalSessionsManagementService)
- Fix unicode box-drawing characters in sessionsListControl and sessionsViewPane

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

* Refactor collapse state handling in SessionsListControl

* Remove deprecated IActiveSessionItem, activeSession, and getActiveSession

Remove the deprecated active session API from ISessionsManagementService:
- Remove IActiveSessionItem interface
- Remove activeSession observable and getActiveSession() method
- Remove _activeSession field, doSetActiveSession, equalsSessionItem
- Simplify setActiveSession to set context keys and activeSessionData directly
- Fix customizationsToolbar.contribution.ts missed reference
- Update all test files to use ISessionData instead of IActiveSessionItem
- Fix unicode box-drawing characters

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

* Add pin and unpin session actions to Sessions View Pane

* Rename activeSessionData back to activeSession

Now that IActiveSessionItem is removed, rename activeSessionData to
activeSession across all 36 files for cleaner naming.

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

* Add event for session type changes in SessionsManagementService

* Enhance session management by adding session type tracking and updating logic

* Use ISessionData.changes instead of falling back to agent session model

Replace patterns that read activeSession.resource then look up
agentSessionsService.getSession() just to access .changes:

- changesViewActions.ts: use activeSession.changes.read(reader) directly
  instead of agentSession lookup + hasValidDiff
- changesViewController.ts: use activeSession.changes.read(reader) for
  activeSessionHasChangesObs, remove unused sessionsChangedSignal
- codeReview.contributions.ts: use ISessionData.changes in both
  RunSessionCodeReviewAction and CodeReviewToolbarContribution,
  remove IAgentSessionsService dependency from both

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

* Migrate codeReviewService from IAgentSessionsService to ISessionsManagementService

Replace all agent session service usage with sessions management service:
- Constructor: use onDidChangeSessions for PR review init + dispose
  (replaces model.onDidChangeSessions + onDidChangeSessionArchivedState)
- _registerSessionListeners: use onDidChangeSessions for cleanup of
  removed sessions and stale review versions; use getSessions() +
  ISessionData.changes instead of agentSessionsService.getSession()
- Remove IAgentSessionsService dependency entirely

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

* Add archived and read status to ISessionData interface

* Add archived field to ISessionsChangeEvent

Add 'archived' to the session change event so consumers can
distinguish between removed and archived sessions:
- ISessionsChangeEvent: add archived: readonly ISessionData[]
- CopilotChatSessionsProvider: listen for onDidChangeSessionArchivedState
  and fire archived events; include archived: [] in refresh events
- SessionsManagementService: handle archived in onDidChangeSessions
  to clear active session (replaces direct agentSessionsService listener)
- CodeReviewService: clean up reviews for archived sessions
- Add isArchived/isRead to test helpers and remote provider

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

* Add lastTurnEnd to ISessionData and use in changesViewController

Add lastTurnEnd observable to ISessionData so consumers can detect
turn completion without reaching into the agent session model:
- ISessionData: add lastTurnEnd: IObservable<Date | undefined>
- AgentSessionAdapter: track timing.lastRequestEnded reactively
- CopilotCLISession, RemoteNewSession: initialize as undefined
- RemoteAgentHostSessionsProvider: initialize as undefined
- changesViewController: use activeSession.lastTurnEnd.read(reader)
  instead of agentSessionsService.getSession().timing; remove
  IAgentSessionsService dependency entirely
- Update test helpers

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

* Enhance session item rendering with session type and update status icon logic

* Migrate .changes access from agent session model to ISessionData

Replace agentSessionsService.getSession().changes with
ISessionData.changes across multiple consumers:

- changesView.ts: activeSessionChangesObs reads from
  activeSession.changes.read(reader); code review toolbar uses
  activeSession.changes.read(reader)
- agentFeedbackService.ts: iterate sessionsManagementService.getSessions()
  instead of agentSessionsService.model.sessions; use ISessionData.changes
  for revealSessionComment; remove IAgentSessionsService dependency
- agentFeedbackEditorUtils.ts: getSessionForResource and
  getSessionChangeForResource prefer ISessionsManagementService
- agentFeedbackEditorWidgetContribution.ts: prefer ISessionData.changes

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

* Refactor session status handling to include NeedsInput state and remove unused CSS for read indicator

* Migrate sessionsTitleBarWidget to use sessions management service

- Use activeSessionService.onDidChangeSessions instead of
  agentSessionsService.model.onDidChangeSessions for re-rendering
- Rewrite _countUnreadSessions to use ISessionData observables
  (isArchived, status, isRead) instead of countUnreadSessions()
- Context menu still uses agentSessionsService for IMarshalledAgentSessionContext

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

* implement approval row

* fix handling sessions change event

* context menu events

* support description

* fix compilation

* fix compilation

* fixes

* more fixes

* add repository option handling in RemoteNewSession

* fix cloud session

* delete empty files

* clean up

* fix compilation

* fix grouping by time

* Add sessions provider architecture documentation to README.md

Add comprehensive architecture section with:
- Overview diagram showing UI → ManagementService → ProvidersService → Providers
- Core concepts: ISessionType, ISessionsProvider, ISessionData
- Example providers: CopilotChatSessionsProvider, RemoteAgentHostSessionsProvider
- Data flow diagrams: creating a new session, session change events
- Key files reference table

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

* Enhance architecture diagram with ISessionData and ISessionWorkspace

Show ISessionData observable properties and ISessionWorkspace
structure inline in the main diagram, plus note that UI components
read these observables for reactive updates.

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

* Move workspace remembering from provider to picker

Remove getWorkspaces() from ISessionsProvider — the picker now owns
all recent workspace storage:

- SessionWorkspacePicker: add recent workspace storage with per-provider
  key. Workspaces remembered on selection (list or browse).
- CopilotChatSessionsProvider: remove workspace storage, IStorageService,
  IUriIdentityService dependencies.
- ISessionsProvider: remove getWorkspaces() from interface.
- Fix copyright headers on files missing them.

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

* Make workspace picker multi-provider aware

Show browse actions and recent workspaces from all registered providers,
not just the active one:
- _getAllBrowseActions: collect from all providers
- _buildItems: show recent workspaces from all providers, grouped by
  provider when multiple exist
- Restore still prefers the active provider's last selected workspace

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

* Remove sessions provider picker from titlebar widget

The provider picker is no longer needed since the workspace picker
is now multi-provider aware and shows browse actions from all providers:
- Remove SessionsProviderPicker instantiation and import
- Remove provider label/icon rendering for untitled sessions
- Always show sessions picker on click (no conditional provider picker)
- Remove _isUntitledSession helper (was only used for provider display)

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

* Persist workspace icon in recent workspaces storage

Store the workspace icon ID alongside the URI so the picker shows
the correct icon (e.g., remote icon for agent host workspaces, repo
icon for GitHub repositories) instead of always falling back to the
URI-scheme-based default.

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

* Resolve workspace via provider instead of storing icon

Add resolveWorkspace(repositoryUri) to ISessionsProvider so the picker
delegates label/icon resolution to the provider that owns the workspace:

- ISessionsProvider: add resolveWorkspace(URI) → ISessionWorkspace
- ISessionsProvidersService: add resolveWorkspace(providerId, URI)
- CopilotChatSessionsProvider: implements using _labelFromUri/_iconFromUri
- RemoteAgentHostSessionsProvider: implements with remote icon + host label
- WorkspacePicker: _getRecentWorkspaces uses resolveWorkspace instead of
  local _labelFromUri/_iconFromUri; storage only has uri + providerId
- Remove _labelFromUri, _iconFromUri, iconId from picker

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

* Add provider separators for browse actions in workspace picker

Group browse actions by provider with labeled separators showing
the provider name, so users can distinguish between e.g. Copilot's
Browse Folders/Repositories and an Agent Host's Browse Remote Folders.

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

* fix test

* add pull request data to the session

* more changes

* more view parity

* more parity

* Remove provider separators from browse actions in workspace picker

Show all browse actions in a flat list with a single separator from
the recent workspaces, without per-provider labels.

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

* Migrate legacy recent workspaces from old storage format

Old CopilotChatSessionsProvider stored recent workspaces as
{ uri }[] without providerId. The picker now handles entries
missing providerId by defaulting to COPILOT_PROVIDER_ID, ensuring
existing recent workspaces are preserved after the migration.

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

* Fix workspace picker sorting: local folders first, then repos

Sort recent workspaces with local folders (file:// scheme) before
remote repositories, alphabetical within each group. Matches the
old CopilotChatSessionsProvider.getWorkspaces() sorting behavior.

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

* Fix recent workspaces migration from old storage format

Re-add migration logic that was lost: entries without providerId
in the storage are assigned COPILOT_PROVIDER_ID so old recent
workspaces are properly resolved.

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

* remove

* more clean up

* Refactor workspace selection and migration logic for improved storage handling

* fix e2e

* disable e2e (temp)

* remove unused file

* fix cyclic deps

* fix tests

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: BeniBenj <besimmonds@microsoft.com>
@pull pull bot locked and limited conversation to collaborators Mar 25, 2026
@pull pull bot added the ⤵️ pull label Mar 25, 2026
@pull pull bot merged commit d466d7d into code:main Mar 25, 2026
0 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants