* Inner App component that uses the terminal size context
({ createExtensionHost, ...extensionHostOptions }: TUIAppProps)
| 72 | * Inner App component that uses the terminal size context |
| 73 | */ |
| 74 | function AppInner({ createExtensionHost, ...extensionHostOptions }: TUIAppProps) { |
| 75 | const { |
| 76 | initialPrompt, |
| 77 | initialTaskId, |
| 78 | initialSessionId, |
| 79 | continueSession, |
| 80 | workspacePath, |
| 81 | extensionPath, |
| 82 | user, |
| 83 | provider, |
| 84 | apiKey, |
| 85 | model, |
| 86 | mode, |
| 87 | nonInteractive = false, |
| 88 | debug, |
| 89 | exitOnComplete, |
| 90 | reasoningEffort, |
| 91 | ephemeral, |
| 92 | version, |
| 93 | } = extensionHostOptions |
| 94 | |
| 95 | const { exit } = useApp() |
| 96 | |
| 97 | const { |
| 98 | messages, |
| 99 | pendingAsk, |
| 100 | isLoading, |
| 101 | isComplete, |
| 102 | hasStartedTask: _hasStartedTask, |
| 103 | error, |
| 104 | fileSearchResults, |
| 105 | allSlashCommands, |
| 106 | availableModes, |
| 107 | taskHistory, |
| 108 | currentMode, |
| 109 | tokenUsage, |
| 110 | routerModels, |
| 111 | apiConfiguration, |
| 112 | currentTodos, |
| 113 | } = useCLIStore() |
| 114 | |
| 115 | // Access UI state from the UI store |
| 116 | const { |
| 117 | showExitHint, |
| 118 | countdownSeconds, |
| 119 | showCustomInput, |
| 120 | isTransitioningToCustomInput, |
| 121 | showTodoViewer, |
| 122 | pickerState, |
| 123 | setIsTransitioningToCustomInput, |
| 124 | } = useUIStateStore() |
| 125 | |
| 126 | // Compute context window from router models and API configuration |
| 127 | const contextWindow = useMemo(() => { |
| 128 | return getContextWindow(routerModels, apiConfiguration) |
| 129 | }, [routerModels, apiConfiguration]) |
| 130 | |
| 131 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
nothing calls this directly
no test coverage detected