mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-22 07:41:23 -07:00
feat: wire up AskUserTool with dialog (#17411)
This commit is contained in:
@@ -18,6 +18,7 @@ import { theme } from '../../semantic-colors.js';
|
||||
import {
|
||||
type Config,
|
||||
SHELL_TOOL_NAME,
|
||||
ASK_USER_DISPLAY_NAME,
|
||||
type ToolResultDisplay,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { useInactivityTimer } from '../../hooks/useInactivityTimer.js';
|
||||
@@ -198,13 +199,28 @@ export const ToolInfo: React.FC<ToolInfoProps> = ({
|
||||
}
|
||||
}
|
||||
}, [emphasis]);
|
||||
|
||||
// Hide description for completed Ask User tools (the result display speaks for itself)
|
||||
const isCompletedAskUser =
|
||||
name === ASK_USER_DISPLAY_NAME &&
|
||||
[
|
||||
ToolCallStatus.Success,
|
||||
ToolCallStatus.Error,
|
||||
ToolCallStatus.Canceled,
|
||||
].includes(status);
|
||||
|
||||
return (
|
||||
<Box overflow="hidden" height={1} flexGrow={1} flexShrink={1}>
|
||||
<Text strikethrough={status === ToolCallStatus.Canceled} wrap="truncate">
|
||||
<Text color={nameColor} bold>
|
||||
{name}
|
||||
</Text>{' '}
|
||||
<Text color={theme.text.secondary}>{description}</Text>
|
||||
</Text>
|
||||
{!isCompletedAskUser && (
|
||||
<>
|
||||
{' '}
|
||||
<Text color={theme.text.secondary}>{description}</Text>
|
||||
</>
|
||||
)}
|
||||
</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user