Repository navigation
agentHost: refresh Copilot instructions for new sessions - #350863
Draft
Martin Aeschlimann (aeschli) wants to merge 1 commit into
Draft
Martin Aeschlimann (aeschli) wants to merge 1 commit into
Martin Aeschlimann (aeschli) wants to merge 1 commit into
Conversation
Fixes #345480 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Process-wide SDK cache invalidation may affect existing conversations, while launcher mocks verify only RPC options, leaving disk freshness and cross-session effects dependent on human runtime validation.
No open issues 🎉
What changed in this PR
Addresses #345480 by refreshing the Copilot SDK’s instruction discovery cache when creating sessions, so new conversations can use instruction-file changes without a window reload.
Changes:
- Enables
refreshCustomInstructionsfor regular and ephemeral session creation while leaving resume options unchanged. - Extends launcher tests to verify the option is present for creates and absent for resumes.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts |
Adds refresh-option assertions for regular creates, ephemeral creates, and resumes. |
src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts |
Enables instruction-cache refresh in SDK create options, preserving existing instruction configuration. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #345480
Summary
New Copilot sessions now set
instructions.refreshCustomInstructionsto invalidate the SDK's process-wide instruction discovery cache before loading custom instructions. Changes to instruction files therefore reach new conversations without requiring a window reload. Resumed sessions are unchanged; the launcher test covers regular creates, ephemeral creates, and resumes.Testing
pnpm run compile-client— passed..\scripts\test.bat --run src\vs\platform\agentHost\test\node\copilotSessionLauncher.test.ts— passed (264 tests).pnpm run oxlint src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts— passed.git diff --check— passed.