[Markdown Editor (experimental)] AI plugins cannot recognize active file context
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Problem Description
VS Code offers two built-in Markdown editors:
1. **Text Editor - Built-in** (default)
2. **Markdown Editor (experimental) - Built-in**
With "Text Editor", AI extensions like Claude Code, Copilot, and Coder (Alibaba) can automatically detect the currently edited Markdown file and add it to the conversation context.
However, when switching to "Markdown Editor (experimental)", none of these AI extensions can detect the active file. Claude Code, Copilot, and others all fail to recognize the current file, making it impossible to add file content to the conversation.
## Steps to Reproduce
1. Set VS Code default Markdown editor to "Markdown Editor (experimental)"
- Setting: `"markdown.editor": "experimental"`
2. Open any .md file in VS Code
3. Try to ask Claude Code / Copilot to read the current file
4. AI plugin reports it cannot detect/identify the current file
## Expected Behavior
AI plugins should be able to recognize the currently open Markdown file regardless of which editor is used.
## Environment
- VS Code version: (please fill in)
- OS: Windows 11
- Extensions: Claude Code, Copilot, etc.
## Notes
Preliminary analysis: Markdown Editor (experimental) may use a different file URI scheme or editor context mechanism, causing AI plugins' `vscode.window.activeTextEditor` or `vscode.workspace.textDocuments` to fail to retrieve the correct document object.
Contributor guide
Assessment
This issue has not been assessed yet.