feat(cli): TUI autocomplete sidebar + fuzzy match + arg hints + input history (P8-017)
- 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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user