copilot: remove InlineDocIntent and /doc command#312156
Conversation
There was a problem hiding this comment.
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
InlineDocIntentimplementation and unregistered it from the intent registry. - Removed the
/docchat 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
| "name": "intent [inline] - add documentation for this api", | ||
| "contentFilterCount": 0, | ||
| "passCount": 10, | ||
| "failCount": 0, | ||
| "score": 1 | ||
| "passCount": 0, | ||
| "failCount": 10, | ||
| "score": 0 |
There was a problem hiding this comment.
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:
Summary
Remove the
InlineDocIntent(/docslash 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:
slashDoc.*.stest.tsfiles (cpp, java, rb, ts) were ~95%+ focused on/docintent testing. The few incidental assertions for other intents (e.g., oneIntent.Explaincheck, oneIntent.Testscheck) were not robust standalone tests and were dropped rather than extracted.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.generateIntentTestcalls ininlineChatIntent.stest.ts('add comment'and'write jsdoc') that expectedInlineDocIntent.IDwere removed.Changes
docIntent.tsx- theInlineDocIntentclass,DocInvocation, andDocPromptInlineDocIntentfromallIntents.tsintent registry/doccommand contribution frompackage.jsonchat participantcopilot.workspace.doc.descriptionfrompackage.nls.jsonslashDoc.{cpp,java,rb,ts}.stest.tsinlineGenerateCode.stest.tsandinlineChatIntent.stest.ts