- Add argument completions for /thinking command with all 6 levels (off, minimal, low, medium, high, xhigh) and descriptions - Add descriptions to all GSD 2nd-level subcommand completions across 14 subcommand groups (auto, mode, parallel, setup, prefs, remote, next, history, undo, export, cleanup, knowledge, doctor, dispatch) - Add 35 new tests for autocomplete and fuzzy matching systems
2.2 KiB
2.2 KiB
Plan: Autocomplete QOL Improvements
Goal
Maximize quality-of-life for the autocomplete system by adding missing argument completions, improving discoverability with descriptions, and adding test coverage.
Changes
1. Add /thinking argument completions (interactive-mode.ts)
- Add
getArgumentCompletionsto thethinkingbuiltin command - Values:
off,minimal,low,medium,high,xhighwith descriptions - Location:
setupAutocomplete()in interactive-mode.ts, after the/modelblock
2. Add descriptions to GSD 2nd-level subcommand completions (commands.ts)
- Currently
/gsd auto --verboseshows label only, no description - Add descriptions to all 2nd-level completion items across:
autoflags: --verbose, --debugmodesubcommands: global, projectparallelsubcommands: start, status, stop, pause, resume, mergesetupsubcommands: llm, search, remote, keys, prefsprefssubcommands: global, project, status, wizard, setup, import-clauderemotesubcommands: slack, discord, status, disconnectnextflags: --verbose, --dry-runhistoryflags: --cost, --phase, --model, 10, 20, 50undo: --forceexportflags: --json, --markdown, --html, --html --allcleanupsubcommands: branches, snapshotsknowledgesubcommands: rule, pattern, lessondoctormodes: fix, heal, auditdispatchphases: research, plan, execute, complete, reassess, uat, replan
3. Add test coverage for autocomplete.ts and fuzzy.ts
- Test file:
packages/pi-tui/src/tests/autocomplete.test.ts - Cover: slash command completion, argument completion, @ file prefix extraction, path prefix extraction, apply completion
- Test file:
packages/pi-tui/src/tests/fuzzy.test.ts - Cover: basic matching, scoring, word boundaries, gap penalties, token splitting, alphanumeric swaps
Files Modified
packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts— thinking completionssrc/resources/extensions/gsd/commands.ts— 2nd-level descriptionspackages/pi-tui/src/tests/autocomplete.test.ts— new test filepackages/pi-tui/src/tests/fuzzy.test.ts— new test file
Testing
- Run existing test suite to verify no regressions
- Run new test files
- Build to verify TypeScript compiles