Commit 6e9f718
committed
fix(UX): improve prompt completions for VS Code slash commands
Addresses three UX issues with MCP prompt argument completions:
1. Database discovery: completeDatabasePath now scans $HOME/codeql/databases/
as a default search location, and recursively discovers directories
containing codeql-database.yml (including .testproj dirs) in the workspace.
2. Language auto-derivation: For prompts where queryPath is provided,
language is now optional and auto-derived from the nearest
codeql-pack.yml's codeql/<lang>-all or codeql/<lang>-queries dependency.
Schema field ordering now puts queryPath before language so VS Code
prompts for the query first. Affected schemas: explainCodeqlQuerySchema,
documentCodeqlQuerySchema, workshopCreationWorkflowSchema,
qlLspIterativeDevelopmentSchema.
3. Query path completion filtering: completeQueryPath now skips .github,
dist, coverage, and build directories in addition to node_modules, .git,
and .tmp — preventing workshop examples and build artifacts from
cluttering the VS Code dropdown.
New tests: 19 unit tests covering all three fixes.
Updated tests: 9 existing tests updated to reflect language being optional.1 parent 2105a41 commit 6e9f718
6 files changed
Lines changed: 795 additions & 120 deletions
File tree
- server
- dist
- src/prompts
- test/src/prompts
0 commit comments