Thanks to visit codestin.com
Credit goes to github.com

Skip to content

copilot: remove InlineDocIntent and /doc command#312156

Draft
jrieken wants to merge 1 commit intomainfrom
joh/remove-doc-intent
Draft

copilot: remove InlineDocIntent and /doc command#312156
jrieken wants to merge 1 commit intomainfrom
joh/remove-doc-intent

Conversation

@jrieken
Copy link
Copy Markdown
Member

@jrieken jrieken commented Apr 23, 2026

Summary

Remove the InlineDocIntent (/doc slash command) from the Copilot extension entirely - implementation, registration, package.json contribution, localization string, and all dedicated tests.

Session Context

Key decisions from the development session:

  • Delete dedicated test files entirely: The slashDoc.*.stest.ts files (cpp, java, rb, ts) were ~95%+ focused on /doc intent testing. The few incidental assertions for other intents (e.g., one Intent.Explain check, one Intent.Tests check) were not robust standalone tests and were dropped rather than extracted.
  • Remove doc query objects from multi-query tests: In inlineGenerateCode.stest.ts, the 'add doc' and 'document the functions with jsdoc' query steps within multi-turn test scenarios were removed, keeping the remaining queries intact.
  • Remove intent classification tests: Two generateIntentTest calls in inlineChatIntent.stest.ts ('add comment' and 'write jsdoc') that expected InlineDocIntent.ID were removed.

Changes

  • Deleted docIntent.tsx - the InlineDocIntent class, DocInvocation, and DocPrompt
  • Removed InlineDocIntent from allIntents.ts intent registry
  • Removed /doc command contribution from package.json chat participant
  • Removed copilot.workspace.doc.description from package.nls.json
  • Deleted 4 dedicated test files: slashDoc.{cpp,java,rb,ts}.stest.ts
  • Cleaned up doc-related test cases from inlineGenerateCode.stest.ts and inlineChatIntent.stest.ts
  • Updated simulation baselines and outcome files

Copilot AI review requested due to automatic review settings April 23, 2026 15:43
Copy link
Copy Markdown
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

This PR removes the Copilot extension’s inline documentation intent (InlineDocIntent) and the /doc slash command end-to-end (intent implementation/registration, command contribution + localization, and the dedicated simulation tests/baselines tied to /doc).

Changes:

  • Removed the InlineDocIntent implementation and unregistered it from the intent registry.
  • Removed the /doc chat command contribution and its localized description string.
  • Deleted /doc-focused simulation tests and updated simulation baselines/outcome request manifests accordingly.
Show a summary per file
File Description
extensions/copilot/src/extension/intents/node/docIntent.tsx Deletes the InlineDocIntent implementation and prompt/invocation logic.
extensions/copilot/src/extension/intents/node/allIntents.ts Removes InlineDocIntent from the intent registration list.
extensions/copilot/package.json Removes the /doc command contribution from the editor chat participant commands.
extensions/copilot/package.nls.json Removes the localized string key for the /doc command description.
extensions/copilot/test/intent/inlineChatIntent.stest.ts Removes intent-classification tests that expected InlineDocIntent.ID.
extensions/copilot/test/inline/inlineGenerateCode.stest.ts Removes multi-turn query steps that relied on the doc intent.
extensions/copilot/test/inline/slashDoc.cpp.stest.ts Deletes dedicated /doc simulation tests for C++.
extensions/copilot/test/inline/slashDoc.java.stest.ts Deletes dedicated /doc simulation tests for Java.
extensions/copilot/test/inline/slashDoc.rb.stest.ts Deletes dedicated /doc simulation tests for Ruby.
extensions/copilot/test/inline/slashDoc.ts.stest.ts Deletes dedicated /doc simulation tests for TypeScript.
extensions/copilot/test/simulationTests.ts Stops importing the deleted /doc simulation test suites.
extensions/copilot/test/simulation/baseline.json Removes /doc scenario summaries and updates intent baseline scores after intent removal.
extensions/copilot/test/outcome/-doc-inline.json Removes the recorded request list for the deleted /doc suite.
extensions/copilot/test/outcome/intent-inline.json Removes recorded requests for deleted intent scenarios.
extensions/copilot/test/outcome/generate-inline.json Updates recorded request lists to match the updated generate scenarios.
extensions/copilot/test/outcome/generate-inlinechatintent-inline.json Updates recorded request lists to match the updated InlineChatIntent generate scenarios.
extensions/copilot/test/outcome/notebook-generate-inline.json Updates recorded request lists after scenario/query adjustments.
extensions/copilot/test/outcome/notebook-generate-runtime-inline.json Updates recorded request lists after scenario/query adjustments.
extensions/copilot/test/outcome/notebook-edit-inline.json Updates recorded request lists after scenario/query adjustments.
extensions/copilot/src/extension/inlineChat/node/inlineChatConstants.ts Removes this constants file (now unused).

Copilot's findings

  • Files reviewed: 20/20 changed files
  • Comments generated: 1

Comment on lines 3703 to +3707
"name": "intent [inline] - add documentation for this api",
"contentFilterCount": 0,
"passCount": 10,
"failCount": 0,
"score": 1
"passCount": 0,
"failCount": 10,
"score": 0
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

These intent baseline entries for documentation requests now score 0/10 after removing the doc intent. Since /doc/InlineDocIntent is removed, the underlying intent fixture (extensions/copilot/test/intent/inline-chat.json) still marking many requests as Intent: "doc" will make these scenarios permanently fail. Consider either reclassifying those requests to an existing intent (likely edit) or removing them from the intent fixtures so the baseline reflects supported behavior.

See below for a potential fix:


Copilot uses AI. Check for mistakes.
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.

2 participants