From 4885f4ad1b15efe8def536d930d3bf081f4b591b Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Wed, 16 Sep 2026 00:01:02 -0700 Subject: [PATCH] refactor(native-chat): remove retry UI Remove unused retry functionality for failed message delivery from the native chat status component. The retryableOutboxEntry state is no longer managed, so the retry button and associated handling can be safely removed. --- .../NativeChatStructuredSession.tsx | 2 -- .../NativeChatStructuredSessionStatus.tsx | 33 ------------------- 2 files changed, 35 deletions(-) diff --git a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx index b0eda5197de..0da97ba0eba 100644 --- a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx +++ b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx @@ -299,8 +299,6 @@ export function NativeChatStructuredSession( sessionId={props.sessionId} error={controller.error} composerError={composerError} - retryableOutboxEntry={null} - onRetry={controller.retry} isVisible={props.isVisible} backgroundTasks={controller.backgroundTasks} stopBackgroundTask={controller.stopBackgroundTask} diff --git a/src/renderer/src/components/native-chat/NativeChatStructuredSessionStatus.tsx b/src/renderer/src/components/native-chat/NativeChatStructuredSessionStatus.tsx index d591bf62e67..02bc9936f67 100644 --- a/src/renderer/src/components/native-chat/NativeChatStructuredSessionStatus.tsx +++ b/src/renderer/src/components/native-chat/NativeChatStructuredSessionStatus.tsx @@ -1,10 +1,6 @@ import { useState } from 'react' -import { RotateCcw } from 'lucide-react' -import type { StructuredAgentSessionOutboxEntry } from '../../../../shared/structured-agent-session-outbox' -import { Button } from '@/components/ui/button' import { NativeChatBackgroundTasksStatus } from './NativeChatBackgroundTasksStatus' import type { StructuredSessionBackgroundTasksView } from './structured-session-background-tasks-view' -import { translate } from '@/i18n/i18n' type StoppingBackgroundTasks = { sessionId: string @@ -18,8 +14,6 @@ export function NativeChatStructuredSessionStatus(props: { sessionId: string error: string | null composerError: string | null - retryableOutboxEntry: StructuredAgentSessionOutboxEntry | null - onRetry: (clientMessageId: string) => void isVisible: boolean backgroundTasks: StructuredSessionBackgroundTasksView stopBackgroundTask: (taskId?: string) => Promise @@ -60,33 +54,6 @@ export function NativeChatStructuredSessionStatus(props: { return ( <> - {props.retryableOutboxEntry ? ( -
- - {props.retryableOutboxEntry.state === 'unconfirmed' - ? translate( - 'auto.components.native.chat.NativeChatStructuredSession.1f772bb5d0', - 'Message delivery is unconfirmed.' - ) - : translate( - 'auto.components.native.chat.NativeChatStructuredSession.93ef441197', - 'Message was not sent.' - )} - - -
- ) : null} {props.error || props.composerError ? (

{props.error ?? props.composerError}