Add Copilot agent body language features by aeschli · Pull Request #343021 · microsoft/vscode · GitHub
Skip to content

Add Copilot agent body language features - #343021

Merged
Martin Aeschlimann (aeschli) merged 2 commits into
mainfrom
aeschli/agent-file-copilot-body
Oct 21, 2026
Merged

Martin Aeschlimann (aeschli) merged 2 commits into
mainfrom
aeschli/agent-file-copilot-body

Conversation

@aeschli

Copy link
Copy Markdown
Contributor

Summary

Adds Copilot-specific *.agent.md body language features on top of #342887.

  • Completes the seven case-sensitive Copilot body placeholders:
    • {{cwd}}
    • {{homedir}}
    • {{configDir}}
    • {{grepToolName}}
    • {{globToolName}}
    • {{shellToolName}}
    • {{shellCommandExamples}}
  • Adds placeholder parsing, hovers, and semantic highlighting.
  • Marks unknown Copilot placeholders unused.
  • Stops suggesting Local #file: and #tool: references for Copilot targets.
  • Marks authored Local references unused with harness-specific guidance.
  • Gives tool-set references a specific diagnostic explaining that Copilot requires individual tools in frontmatter.
  • Preserves Local, prompt, instruction, skill, and Claude body behavior.

This PR is stacked on #342887 and is part of #342854.

Testing

  • npm run build-fast -- --client-only — passed
  • npm run typecheck-client — passed
  • Targeted ESLint for changed body-language providers and tests — passed
  • .\scripts\test.bat --run src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptBodyAutocompletion.test.ts --run src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptHovers.test.ts --run src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptValidator.test.ts --run src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.test.ts — passed, 220 tests

@aeschli
Martin Aeschlimann (aeschli) added this pull request to stack #342888 October 20, 2026 21:23
roblourens
roblourens previously approved these changes Oct 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Placeholder completion filtering and replacement ranges need correction before the feature works reliably.

2 open issues
What changed in this PR

Extends harness-aware agent editing with Copilot-specific body syntax, building on the agent schema support.

Changes:

  • Adds seven placeholders with completion, hover, parsing, and highlighting support.
  • Marks unknown placeholders and unsupported Local references unused.
  • Adds focused language-provider tests.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​promptSyntax/​languageProviders/​promptValidator.test.ts Tests unsupported body syntax diagnostics.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​promptSyntax/​languageProviders/​promptHovers.test.ts Tests placeholder and reference hovers.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​promptSyntax/​languageProviders/​promptDocumentSemanticTokensProvider.test.ts Tests placeholder highlighting.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​promptSyntax/​languageProviders/​promptBodyAutocompletion.test.ts Tests Copilot completion results.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​promptFileParser.ts Parses body placeholders.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​languageProviders/​promptValidator.ts Adds Copilot body diagnostics.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​languageProviders/​promptHovers.ts Adds harness-specific body guidance.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​languageProviders/​promptFileAttributes.ts Defines supported placeholders.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​languageProviders/​promptDocumentSemanticTokensProvider.ts Highlights Copilot placeholders.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​languageProviders/​promptBodyAutocompletion.ts Adds harness-aware placeholder suggestions.

Review effort: Balanced

roblourens
roblourens previously approved these changes Oct 20, 2026
Complete, highlight, hover, and validate Copilot body placeholders while suppressing unsupported Local file and tool reference syntax.

Refs #342854

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep placeholder suggestions visible through Monaco filtering and replace existing identifier and closing-brace suffixes without duplication.

Refs #342854

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants