* refactor: update session cache to use IChatData and simplify session handling
* feat: add setTitle and setStatus methods to CopilotCLISession and RemoteNewSession
* feat: implement chat ID replacement and handling for session updates
* refactor: remove chat ID replacement logic and related methods from session management
* refactor: streamline session handling by removing resource swap logic and enhancing session cache management
* feat: implement session commit event and related interfaces for chat sessions
* refactor: enhance session management by implementing cache wait logic for committed sessions
* refactor: improve chat session handling by adding immediate group model updates for new chats
* refactor: simplify chat handling by removing immediate group model updates for temporary chats
* refactor: enhance Copilot session handling by adding resource management and improving session cache updates
* refactor: streamline resource handling in CopilotCLISession and RemoteNewSession classes
* refactor: add support for session replacement events in session management
* refactor: add internal documentation for session replacement events in sessions provider
* refactor: improve session replacement handling by using async/await for better readability
* refactor: simplify session replacement handling by removing unnecessary asynchronous wrapper and improving cache management
* refactor: enhance session management by updating active session on provider session replacement
* refactor: update session replacement event properties for clarity
* refactor: add updateWorkspace method to CopilotCLISession and RemoteNewSession for improved workspace management
* refactor: inline replace session event type and fix session cache update
- Remove IChatReplaceSessionEvent interface, inline the type as
{ from: IChatData; to: IChatData } in provider and service interfaces
- Restore setActiveSession call in sendRequest after provider returns
- Fix _refreshSessionCache to properly narrow existing cache entries
by instanceof (AgentSessionAdapter vs temp sessions) for update calls
- Restore _currentNewSession guard in removal loop to prevent firing
removed event for the in-flight temp session
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: restore setActiveSession call after sendRequest completes
After awaiting sendRequest (which resolves with the committed session), explicitly call setActiveSession so the committed session is always set as active. The onDidReplaceSession handler also sets it, but having it here as well ensures correctness when the handler fires before the group model is updated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: sync temp session data from agent session and guard active session replacement
Update CopilotCLISession.update() to propagate workspace, title, status, updatedAt, changes, and description from the agent session. Add mutable description and changes observables. Restore instanceof guard in removal loop to prevent premature cleanup of temp sessions. Only replace active session in onDidReplaceSession when the replaced session was actually active.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: dispose temp session and fire removal event on commit/error
Dispose the CopilotCLISession/RemoteNewSession temp session and emit
an onDidChangeSessions removal delta when the temp is replaced by the
committed adapter or when an error occurs. This prevents disposable
leaks and lets consumers (e.g. SessionsManagementService) clean up
group-model/cache state for the removed chat.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add argument parsing, suite filtering, and grep support to integration test scripts
- Add --run, --runGlob, --grep, --suite, and --help argument parsing
- --suite selects extension host test suites (comma-separated, glob patterns)
- --grep forwards test name filter to all runners via MOCHA_GREP env var
- Validate --suite filter matches at least one known suite
- Add MOCHA_GREP support to testrunner.js, CSS and HTML test runners
- Seed user settings to suppress dock bounce notifications
- Always apply *.integrationTest.js glob for node.js tests
- Add integration-tests skill documentation
* Address Copilot review feedback
- Quote cd $ROOT, rm -rf $VSCODEUSERDATADIR, rmdir %VSCODEUSERDATADIR%
- Quote --runGlob pattern to prevent premature glob expansion
- Use GREP_ARGS array for safe grep forwarding in .sh
- Use conditional call with proper quoting for grep in .bat
- Deduplicate suite list into KNOWN_SUITES variable
- Remove unused EXTRA_ARGS and ARGS variables from .bat
* Fix Windows CI: remove unnecessary enabledelayedexpansion
The original script used plain 'setlocal'. Adding 'enabledelayedexpansion'
may affect path resolution behavior on Windows CI. Since no delayed
expansion (\!var\!) syntax is used, revert to the original 'setlocal'.
* Fix Windows CI: capture %~dp0 before call :label corrupts it
In Windows batch, 'call :label' can change what %~dp0 resolves to.
Our should_run_suite subroutine uses 'call :should_run_suite', which
caused %~dp0 to resolve to the wrong directory for extension paths
that appear after the subroutine call. Capture the script directory
once at startup into %SCRIPT_DIR% and use it everywhere.
Historically we've tracked edits in the ChatEditingSession, which is
owned by the editor and _very_ internal and _very_ complex, for Reasons.
In the agent host world, the agent host now owns edits.
This is a minimal implementation of an IChatEditingSession that is used
for the agent host. It does not have keep/undo (the writing has been
on the wall for that for a while) which removes a large chunk of
complexity. Nevertheless, it can deliver diffs, undo/redo and restore
state.
Diffs still happen client-side, but this could be optimized in the
future.
Closes#305332
* test: add tests for external harness replacement behavior
* feat: enhance external customization item handling with storage inference and instruction enrichment
* refactor: remove workspaceSubpaths from chat session customization metadata
* Copilot CLI session 6be53c25-3ac3-44c2-97f1-846de07165de changes
* refactor: extract shared buildInstructionListItem and document provider API
Extract the instruction classification logic (applyTo parsing, badge
generation, groupKey assignment) into a shared buildInstructionListItem
method used by both the built-in and provider item paths.
Remove the instruction-specific enrichInstructionItemsFromProvider in
favor of inline logic in fetchItemsFromProvider that delegates to the
shared helper.
Add a section to the chat-customizations-editor skill documenting the
chatSessionCustomizationProvider proposed API flow.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review — disposal fallback and agent instruction grouping
Fix disposal fallback: when an external harness that overrides a static
one is disposed, keep the active harness on the same id since the static
harness is restored. Only fall back to all[0] when no harness with that
id remains.
Fix agent instruction grouping: buildInstructionListItem now detects
well-known agent instruction files (AGENTS.md, CLAUDE.md, CLAUDE.local.md,
copilot-instructions.md) and assigns groupKey 'agent-instructions' so
they appear under the correct header for both built-in and provider items.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* revert: remove skill file edits to avoid merge conflict
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: enhance AICustomizationListWidget with grouping and badge support for external customization items
* feat: add user data profile service and infer storage from URI in AICustomizationListWidget
* Copilot CLI session 8af2fd4a-10fe-4bba-b408-f1b90cebc8dc changes
* docs: add chatSessionCustomizationProvider API chain to customizations editor skill
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review feedback
- Remove duplicate sectionToIcon, reuse getSectionIcon instance method
- Use Map for O(1) groupKey lookups instead of O(n²) includes/find
- Check active project root in inferStorageFromUri for Sessions window
- Set pluginUri on provider items and use it for storage inference
- Remove redundant plugin check from inferStorageFromUri (handled by caller)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve merge conflict with origin/main. Remove duplicate re-export
from chatInputCompletions.ts (line 72) per review feedback. Update
notebook.chat.contribution.ts to import directly from
chatInputCompletionUtils.ts.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>