feat: context-aware completions with dynamic resource names
- Hide attach-server/detach-server from --help (only relevant with --project) - --project shows only project-scoped commands in tab completion - Tab after resource type fetches live resource names from API - --project value auto-completes from existing project names - Stop offering resource types after one is already selected Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -148,8 +148,8 @@ export function createProgram(): Command {
|
||||
log: (...args: string[]) => console.log(...args),
|
||||
getProject: () => program.opts().project as string | undefined,
|
||||
};
|
||||
program.addCommand(createAttachServerCommand(projectOpsDeps));
|
||||
program.addCommand(createDetachServerCommand(projectOpsDeps));
|
||||
program.addCommand(createAttachServerCommand(projectOpsDeps), { hidden: true });
|
||||
program.addCommand(createDetachServerCommand(projectOpsDeps), { hidden: true });
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user