microsoft / microsoft/vscode-documentdb
Implement TerminalCompletionProvider for native IntelliSense in shell
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Summary
Migrate the Interactive Shell's tab completion from the current Pseudoterminal-based fallback to VS Code's native TerminalCompletionProvider API, which provides an IntelliSense-style popup in terminals.
Blocked by: microsoft/vscode#224505 — the TerminalCompletionProvider API is proposed as of April 2026. It was briefly finalized then reverted due to API shape feedback.
Background
PR #576 implemented a self-contained tab completion fallback directly in the Pseudoterminal (bash/zsh-style multi-column picker). This works well but has limitations compared to VS Code's native terminal suggest:
- No IntelliSense-style popup with icons, documentation, and keyboard navigation
- No trigger-on-type (
.and space) — requires explicit Tab press - Manual ANSI rendering instead of VS Code's native UI
What to Implement When the API Finalizes
Completion Triggers and Suggestions
| Trigger | Suggestions | Data Source |
|---|---|---|
| Empty line | show, use, exit, quit, cls, help, it, db |
Static list |
show |
dbs, databases, collections |
Static list |
use |
Known database names | SchemaStore or ClustersClient |
db. |
Known collection names + database methods | SchemaStore + ClustersClient + documentdb-shell-api-types |
db.<collection>. |
Method names (find, insertOne, etc.) |
documentdb-shell-api-types |
db.<collection>.find({}). |
Cursor methods (limit, skip, sort, etc.) |
documentdb-shell-api-types |
db.<collection>.find({ |
Field names from schema | SchemaStore |
Inside { $ |
DocumentDB API query operators | documentdb-constants |
Implementation Steps
- Check the final API shape for
TerminalCompletionProvider - Add to
enabledApiProposalsinpackage.jsonif needed - Create a new provider that reuses
ShellCompletionProvider's context detection and data sources - Map
CompletionCandidateto VS Code'sTerminalCompletionItem(add icons, documentation, sort order) - Register with trigger characters
.and(space) - Filter to DocumentDB shell terminals only (match terminal name or profile)
- Optionally remove the ANSI fallback picker (
ShellCompletionRenderer) and Tab key override - Consider keeping ghost text (
ShellGhostText) or replacing with VS Code's native inline suggestions
Reusable Components
The existing ShellCompletionProvider (context detection + candidate generation) is platform-neutral and can be reused directly. Only the rendering layer changes.
References
- VS Code tracking issue: microsoft/vscode#224505
- Current fallback implementation: PR #576
- Architecture docs:
docs/ai-and-plans/interactive-shell/9-shell-autocompletion.md
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/ai-and-plans/interactive-shell/9-shell-autocompletion.md and the existing ShellCompletionProvider, ShellCompletionRenderer, and ShellGhostText components from PR #576. Check the final VS Code TerminalCompletionProvider API and package.json enabledApiProposals once microsoft/vscode#224505 is resolved. Done means native completion is registered for DocumentDB shell terminals with the listed triggers and suggestions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- cli, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100