feat: remove redundant cancel message translations and improve message rendering

This commit is contained in:
DragonnZhang 2026-02-26 15:35:52 +08:00
parent 53a3727328
commit 54a861062c
11 changed files with 6 additions and 19 deletions

View file

@ -29,7 +29,7 @@ export const InfoMessage: React.FC<InfoMessageProps> = ({ text }) => {
</Box>
<Box flexGrow={1}>
<Text wrap="wrap" color={theme.status.warning}>
<RenderInline text={text} />
<RenderInline text={text} textColor={theme.status.warning} />
</Text>
</Box>
</Box>

View file

@ -330,7 +330,7 @@ export const ToolConfirmationMessage: React.FC<
bodyContent = (
<Box flexDirection="column" paddingX={1} marginLeft={1}>
<Text color={theme.text.link}>
<RenderInline text={infoProps.prompt} />
<RenderInline text={infoProps.prompt} textColor={theme.text.link} />
</Text>
{displayUrls && infoProps.urls && infoProps.urls.length > 0 && (
<Box flexDirection="column" marginTop={1}>

View file

@ -8,6 +8,7 @@ import type React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../../colors.js';
import { RenderInline } from '../../utils/InlineMarkdownRenderer.js';
import { theme } from '../../semantic-colors.js';
interface WarningMessageProps {
text: string;
@ -24,7 +25,7 @@ export const WarningMessage: React.FC<WarningMessageProps> = ({ text }) => {
</Box>
<Box flexGrow={1}>
<Text wrap="wrap" color={Colors.AccentYellow}>
<RenderInline text={text} />
<RenderInline text={text} textColor={theme.status.warning} />
</Text>
</Box>
</Box>