feat(cli): TUI autocomplete sidebar + fuzzy match + arg hints + input history (P8-017)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

- Add CommandAutocomplete component with filtered command list, aliases, arg hints
- Add useInputHistory hook with ring buffer (max 50), up/down navigation, saved input restore
- Wire InputBar with autocomplete state (show on /), Tab/Enter to fill, Escape to dismiss
- Wire up/down arrows: autocomplete navigation when open, history navigation when closed
- Pass allCommands prop from app.tsx commandRegistry to InputBar
- Add 8 pure-logic tests for useInputHistory covering edge cases and caps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 22:22:44 -05:00
parent ff27e944a1
commit 48f5629eeb
5 changed files with 388 additions and 14 deletions

View File

@@ -13,7 +13,7 @@ import { useViewport } from './hooks/use-viewport.js';
import { useAppMode } from './hooks/use-app-mode.js';
import { useConversations } from './hooks/use-conversations.js';
import { useSearch } from './hooks/use-search.js';
import { executeHelp, executeStatus } from './commands/index.js';
import { executeHelp, executeStatus, commandRegistry } from './commands/index.js';
export interface TuiAppProps {
gatewayUrl: string;
@@ -267,6 +267,7 @@ export function TuiApp({
isStreaming={socket.isStreaming}
connected={socket.connected}
placeholder={inputPlaceholder}
allCommands={commandRegistry.getAll()}
/>
</Box>
);