diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.tsx b/packages/client/ui-chat/src/client/chat/MessageItem.tsx index 7e282a1bd7..7c30c1b7db 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.tsx +++ b/packages/client/ui-chat/src/client/chat/MessageItem.tsx @@ -39,6 +39,14 @@ interface RetryCountdown { seconds: number } +function failureMessage( + message: string, + code: unknown, + t: ChatViewSlotProps['t'], +): string { + return code === 'AUTH' ? t('message.failure.auth') : message +} + function ModelRetryItem({ node, active, t }: { node: ModelRetryNode active: boolean @@ -98,7 +106,7 @@ function ModelRetryItem({ node, active, t }: {
{node.code}}
diff --git a/packages/client/ui-chat/src/client/conversation-nodes/turn-error.ts b/packages/client/ui-chat/src/client/conversation-nodes/turn-error.ts
index cee7c5c9dc..f4b0695f0b 100644
--- a/packages/client/ui-chat/src/client/conversation-nodes/turn-error.ts
+++ b/packages/client/ui-chat/src/client/conversation-nodes/turn-error.ts
@@ -3,7 +3,7 @@ import type {
ConversationMatch, ConversationNodeContext, ConversationNodeDefinition,
} from '@deepseek-ai/dsh-client-ui-conversation/client'
import type { TurnErrorNode } from '../contract/snapshot.ts'
-import { displayFailureMessage } from '@deepseek-ai/dsh-client-ui-conversation/client'
+import { displayFailure } from '@deepseek-ai/dsh-client-ui-conversation/client'
import { chatNode } from './common.ts'
declare module '../contract/chat-nodes.ts' {
@@ -32,11 +32,12 @@ function lastStep(context: ConversationNodeContext