diff --git a/apps/mobile/src/features/threads/thread-handoff-row.tsx b/apps/mobile/src/features/threads/thread-handoff-row.tsx index 7158a9968bcc..a6ac68ed7535 100644 --- a/apps/mobile/src/features/threads/thread-handoff-row.tsx +++ b/apps/mobile/src/features/threads/thread-handoff-row.tsx @@ -94,13 +94,14 @@ export function ThreadHandoffRow(props: { const endpoints = useAtomValue(endpointsAtom); if (item.type !== "handoff" || endpoints === null) return null; const color = item.status === "failed" ? "#e11d48" : props.iconColor; + const label = endpoints.isRecoveredContext ? gt("Recovered context") : gt("Context handoff"); return ( ); @@ -116,6 +117,7 @@ export function ThreadHandoffDivider(props: { }) { const config = useAtomValue(serverEnvironment.configValueAtom(props.environmentId)); const { endpoints } = props; + const showFromEndpoints = !endpoints.isRecoveredContext && endpoints.from.length > 0; const endpointProps = { providers: (config?.providers ?? []).map((provider) => { const rawConfig = config?.settings.providerInstances[provider.instanceId]?.config; @@ -141,20 +143,22 @@ export function ThreadHandoffDivider(props: { failed={props.failed} > - {endpoints.from.map((endpoint, index) => ( - - - {index < endpoints.from.length - 1 ? ( - - , - - ) : null} - - ))} - {endpoints.from.length > 0 ? ( + {showFromEndpoints + ? endpoints.from.map((endpoint, index) => ( + + + {index < endpoints.from.length - 1 ? ( + + , + + ) : null} + + )) + : null} + {showFromEndpoints ? ( ) : null} diff --git a/apps/web/src/components/chat/V2LifecycleRow.tsx b/apps/web/src/components/chat/V2LifecycleRow.tsx index 940e741b9c48..1b2621a2f5c8 100644 --- a/apps/web/src/components/chat/V2LifecycleRow.tsx +++ b/apps/web/src/components/chat/V2LifecycleRow.tsx @@ -669,36 +669,45 @@ export function HandoffRow(props: { readonly failed?: boolean; }) { const gt = useGT(); - const { from: fromEndpoints, to } = props.endpoints; + const { from: fromEndpoints, to, isRecoveredContext } = props.endpoints; const settings = useAtomValue(serverEnvironment.settingsValueAtom(props.environmentId)); const derived = deriveProviderInstanceEntries(props.providers); const entries = settings ? applyProviderInstanceSettings(derived, settings, null) : derived; + const showFromEndpoints = !isRecoveredContext && fromEndpoints.length > 0; return ( - {fromEndpoints.map((endpoint, index) => ( - - - {index < fromEndpoints.length - 1 ? ( - - ))} - {fromEndpoints.length > 0 ? ( + )) + : null} + {showFromEndpoints ? (