fix(cli): TUI polish — Ctrl+T, React keys, clipboard, version (#205)
Some checks failed
ci/woodpecker/push/ci Pipeline failed

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #205.
This commit is contained in:
2026-03-17 02:40:18 +00:00
committed by jason.woltje
parent bf668e18f1
commit 3f8553ce07
6 changed files with 94 additions and 6 deletions

View File

@@ -95,7 +95,12 @@ export class CommandRegistry {
getAll(): CommandDef[] {
const gateway = this.gatewayManifest?.commands ?? [];
return [...LOCAL_COMMANDS, ...gateway];
// Local commands take precedence; deduplicate gateway commands that share
// a name with a local command to avoid duplicate React keys and confusing
// autocomplete entries.
const localNames = new Set(LOCAL_COMMANDS.map((c) => c.name));
const dedupedGateway = gateway.filter((c) => !localNames.has(c.name));
return [...LOCAL_COMMANDS, ...dedupedGateway];
}
getLocalCommands(): CommandDef[] {