Conversation
There was a problem hiding this comment.
Pull request overview
This PR cleans up and renames internal chat “prompt/instructions” variable identifiers and related helper naming, aligning terminology toward a “customizations index” and new prompt-file variable kind prefixes.
Changes:
- Renamed the automatic “instructions list” prompt-text variable creation to “customizations index”.
- Updated
PromptFileVariableKindstring prefixes and prompt-text variable id/name/modelDescription to match new naming. - Refactored ext host prompt reference conversion to reuse
toPromptFileVariableEntry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.ts | Renames the generated prompt-text variable from “instructions list” to “customizations index”. |
| src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.ts | Updates prompt/instruction variable kind IDs and prompt-text variable metadata. |
| src/vs/workbench/api/common/extHostChatSessions.ts | Switches prompt-file reference conversion to shared helper (toPromptFileVariableEntry). |
You can also share your feedback on Copilot code review. Take the survey.
| if (URI.isUri(value) && ref.name.startsWith(`prompt:`)) { | ||
| if (ref.id.startsWith(PromptFileVariableKind.Instruction)) { | ||
| return toPromptFileVariableEntry(value, PromptFileVariableKind.Instruction); | ||
| } | ||
| if (ref.id.startsWith(PromptFileVariableKind.InstructionReference)) { | ||
| return toPromptFileVariableEntry(value, PromptFileVariableKind.InstructionReference); | ||
| } | ||
| if (ref.id.startsWith(PromptFileVariableKind.PromptFile)) { | ||
| return toPromptFileVariableEntry(value, PromptFileVariableKind.PromptFile); | ||
| } | ||
| } |
There was a problem hiding this comment.
convertReferenceToVariable computes range from ref.range, but the new prompt-file branch returns toPromptFileVariableEntry(...) without preserving that range. This drops the offset-range information for explicitly typed prompt variables and can break dynamic-variable tracking/highlighting. Consider merging range into the returned entry (or extending toPromptFileVariableEntry to accept an optional range).
Related PR: microsoft/vscode-copilot-chat#4298