Add inline YAML prompt override debug setting#308309
Open
dileepyavan wants to merge 3 commits intomainfrom
Open
Add inline YAML prompt override debug setting#308309dileepyavan wants to merge 3 commits intomainfrom
dileepyavan wants to merge 3 commits intomainfrom
Conversation
Contributor
Screenshot ChangesBase: Changed (4) |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an advanced Copilot Chat debug setting that allows overriding the agent prompt/tool YAML inline (via settings), and wires it into the tool-calling prompt build so inline YAML takes precedence over a YAML file override.
Changes:
- Introduces
github.copilot.chat.debug.promptOverrideString(inline YAML) and registers it in the configuration service + package.json. - Updates the tool-calling loop to apply prompt/tool overrides from either inline YAML or a configured file, preferring inline.
- Refactors prompt override logic to support parsing from a string source and adds tests for inline overrides + precedence.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/platform/configuration/common/configurationService.ts | Registers the new advanced debug config key for inline YAML prompt overrides. |
| extensions/copilot/src/extension/test/node/configurations.spec.ts | Adds coverage ensuring the new setting key is correctly registered under the advanced section. |
| extensions/copilot/src/extension/intents/node/toolCallingLoop.ts | Applies configured prompt overrides during prompt building, now supporting inline YAML + file with inline precedence. |
| extensions/copilot/src/extension/intents/node/test/promptOverride.spec.ts | Adds tests for inline YAML parsing, invalid YAML handling, and inline-over-file precedence. |
| extensions/copilot/src/extension/intents/node/promptOverride.ts | Implements applyConfiguredPromptOverrides and inline YAML parsing while keeping warning de-dup behavior. |
| extensions/copilot/package.json | Adds the new github.copilot.chat.debug.promptOverrideString advanced setting metadata and description. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 2
| logService: ILogService, | ||
| ): Promise<{ messages: Raw.ChatMessage[]; tools: LanguageModelToolInformation[] }> { | ||
| let config: PromptOverrideConfig; | ||
| ): Promise<PromptOverrideResult> { |
There was a problem hiding this comment.
The closing ")" in the applyPromptOverrides signature is indented one tab deeper than the surrounding function declarations, which looks like a formatting mistake and is inconsistent with the rest of this file. Please align the closing paren with export async function applyPromptOverrides( for readability and to match the existing style.
Suggested change
| ): Promise<PromptOverrideResult> { | |
| ): Promise<PromptOverrideResult> { |
extensions/copilot/src/extension/intents/node/promptOverride.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Summary
Adds a new advanced debug configuration option to override the agent prompt/tool YAML inline in settings as an alternative to providing a YAML file, and wires this into the tool-calling loop so inline overrides take precedence when both are set.
Changes
github.copilot.chat.debug.promptOverrideStringin the Copilot Chat advanced settings.github.copilot.chat.debug.promptOverrideStringtakes precedence overgithub.copilot.chat.debug.promptOverrideFile.Testing
npm run typecheckExample