Files
mcpctl/.taskmaster/tasks/task_103.md

48 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

# Task ID: 103
**Title:** Add Shell Completions for ProxyModel Commands
**Status:** cancelled
**Dependencies:** 89 ✗, 90 ✗, 91 ✗, 92 ✗, 93 ✗, 94 ✗, 95 ✗, 96 ✗, 97 ✗, 100 ✓, 101 ✓, 102 ✓
**Priority:** low
**Description:** Extend shell completions to include all new proxymodel-related commands, resources, and flags.
**Details:**
Update `src/cli/src/completions.ts` to add completions for:
```typescript
// Resource types
const RESOURCE_TYPES = [...existing, 'proxymodels', 'stages'];
// Command completions
const COMMANDS = {
'get': ['proxymodels', 'stages', ...existing],
'describe': ['proxymodel', 'stage', ...existing],
'create': ['proxymodel', 'stage', ...existing],
'delete': ['proxymodel', 'stage', ...existing],
'proxymodel': ['validate'],
'cache': ['list', 'clear', 'stats'],
};
// Dynamic completions for proxymodel/stage names
async function completeProxymodelName(partial: string): Promise<string[]> {
const models = await loadProxyModels();
return [...models.keys()].filter(n => n.startsWith(partial));
}
async function completeStageName(partial: string): Promise<string[]> {
const stages = listStages();
return stages.map(s => s.name).filter(n => n.startsWith(partial));
}
```
Generate completion scripts for bash, zsh, and fish.
**Test Strategy:**
Manual test: completions work in bash/zsh/fish for all new commands. Test proxymodel name completion, stage name completion, subcommand completion.