Skip to content

cleanup for prompt file variables#4298

Open
aeschli wants to merge 3 commits intomainfrom
aeschli/uniform-dolphin-389
Open

cleanup for prompt file variables#4298
aeschli wants to merge 3 commits intomainfrom
aeschli/uniform-dolphin-389

Conversation

@aeschli
Copy link
Contributor

@aeschli aeschli commented Mar 9, 2026

Fixes microsoft/vscode#300113

  • allow read access to all attached prompt and instruction files
  • do not attach empty instruction files

Copilot AI review requested due to automatic review settings March 9, 2026 14:09
@aeschli aeschli enabled auto-merge March 9, 2026 14:09
@aeschli aeschli self-assigned this Mar 9, 2026
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates prompt-variable identification and path comparison utilities to better distinguish prompt files, instruction files, and the customizations index across prompt rendering and tool access checks.

Changes:

  • Replaced ad-hoc prompt variable ID checks with shared helpers (isCustomizationsIndex, PromptFileVariablePrefix) across prompts, tools, and resolvers.
  • Switched URI normalization/equality checks in tool file-access logic to extUriBiasedIgnorePathCase APIs.
  • Updated prompt variable filtering so the customizations index is handled alongside prompt instructions (and excluded from normal attachment rendering / CLI prompt variables).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/extension/tools/node/toolUtils.ts Normalizes and compares URIs using extUriBiasedIgnorePathCase; treats prompt instruction files as “non-external” attachments.
src/extension/prompts/node/panel/customInstructions.tsx Renders customizations index text via isCustomizationsIndex and keeps instruction files handled via isPromptInstruction.
src/extension/prompts/node/panel/chatVariables.tsx Skips rendering prompt instructions, prompt files, and customizations index as regular attachments.
src/extension/prompts/node/agent/agentPrompt.tsx Looks up the instruction index via isCustomizationsIndex for skill reminders.
src/extension/prompt/common/chatVariablesCollection.ts Introduces PromptFileVariablePrefix and renames/repurposes the index helper to isCustomizationsIndex.
src/extension/intents/node/editCodeIntent.ts Updates prompt-instruction variable handling to use new prefixes.
src/extension/chatSessions/vscode-node/copilotCLIPromptReferences.ts Updates internal prompt variable kind strings (used for prompt-file detection).
src/extension/chatSessions/copilotcli/node/copilotcliPromptResolver.ts Excludes instruction variables and customizations index from CLI prompt variable resolution.
src/extension/chatSessions/copilotcli/common/copilotCLIPrompt.ts Uses PromptFileVariablePrefix.PromptFile when synthesizing prompt-file variable IDs.

You can also share your feedback on Copilot code review. Take the survey.

jrieken
jrieken previously approved these changes Mar 9, 2026
@aeschli aeschli disabled auto-merge March 9, 2026 20:13
@aeschli aeschli added this pull request to the merge queue Mar 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personal CLAUDE.md is attached even though its empty

4 participants