summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/App.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/App.tsx')
-rw-r--r--packages/cli/src/ui/App.tsx70
1 files changed, 30 insertions, 40 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx
index 42b0ae5b..724036e2 100644
--- a/packages/cli/src/ui/App.tsx
+++ b/packages/cli/src/ui/App.tsx
@@ -52,15 +52,7 @@ export const App = ({ config }: AppProps) => {
[history],
);
- const isWaitingForToolConfirmation = history.some(
- (item) =>
- item.type === 'tool_group' &&
- item.tools.some((tool) => tool.confirmationDetails !== undefined),
- );
- const isInputActive =
- streamingState === StreamingState.Idle &&
- !initError &&
- !isWaitingForToolConfirmation;
+ const isInputActive = streamingState === StreamingState.Idle && !initError;
const { query, handleSubmit: handleHistorySubmit } = useInputHistory({
userMessages,
@@ -88,39 +80,37 @@ export const App = ({ config }: AppProps) => {
</Box>
)}
- {initError &&
- streamingState !== StreamingState.Responding &&
- !isWaitingForToolConfirmation && (
- <Box
- borderStyle="round"
- borderColor={Colors.AccentRed}
- paddingX={1}
- marginBottom={1}
- >
- {history.find(
- (item) => item.type === 'error' && item.text?.includes(initError),
- )?.text ? (
+ {initError && streamingState !== StreamingState.Responding && (
+ <Box
+ borderStyle="round"
+ borderColor={Colors.AccentRed}
+ paddingX={1}
+ marginBottom={1}
+ >
+ {history.find(
+ (item) => item.type === 'error' && item.text?.includes(initError),
+ )?.text ? (
+ <Text color={Colors.AccentRed}>
+ {
+ history.find(
+ (item) =>
+ item.type === 'error' && item.text?.includes(initError),
+ )?.text
+ }
+ </Text>
+ ) : (
+ <>
<Text color={Colors.AccentRed}>
- {
- history.find(
- (item) =>
- item.type === 'error' && item.text?.includes(initError),
- )?.text
- }
+ Initialization Error: {initError}
</Text>
- ) : (
- <>
- <Text color={Colors.AccentRed}>
- Initialization Error: {initError}
- </Text>
- <Text color={Colors.AccentRed}>
- {' '}
- Please check API key and configuration.
- </Text>
- </>
- )}
- </Box>
- )}
+ <Text color={Colors.AccentRed}>
+ {' '}
+ Please check API key and configuration.
+ </Text>
+ </>
+ )}
+ </Box>
+ )}
<Box flexDirection="column">
<HistoryDisplay history={history} onSubmit={submitQuery} />