Skip to content

Commit cdb5c7b

Browse files
t3dotggclaude
andcommitted
refactor(mobile): render the switch divider directly
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent c0e10be commit cdb5c7b

2 files changed

Lines changed: 5 additions & 27 deletions

File tree

‎apps/mobile/src/features/threads/ThreadFeed.tsx‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ import {
1616
} from "../../lib/enrichedLinkPresentation";
1717
import { ThreadContextDivider } from "./thread-context-divider";
1818
import { useAtomValue } from "@effect/atom-react";
19-
import {
20-
modelSwitchesAtom,
21-
ThreadHandoffDivider,
22-
ThreadHandoffRow,
23-
ThreadModelSwitchRow,
24-
} from "./thread-handoff-row";
19+
import { modelSwitchesAtom, ThreadHandoffDivider, ThreadHandoffRow } from "./thread-handoff-row";
2520
import { GuestBubbleTint, GuestMessageName } from "./guestMessageStyle";
2621
import { ThreadGuestPendingMessage, useThreadGuestShare } from "./ThreadGuestShareBar";
2722
import { LinkRequestCard } from "./LinkRequestCard";
@@ -3607,11 +3602,13 @@ export const ThreadFeed = memo(function ThreadFeed({
36073602
>
36083603
<ThreadMediaVisibility>
36093604
{modelSwitch ? (
3610-
<ThreadModelSwitchRow
3605+
<ThreadHandoffDivider
36113606
environmentId={props.environmentId}
3612-
modelSwitch={modelSwitch}
3607+
endpoints={{ from: [modelSwitch.from], to: modelSwitch.to }}
36133608
iconColor={iconSubtleColor}
36143609
surfaceColor={screenColor}
3610+
label={modelSwitch.label}
3611+
showEffort={modelSwitch.effortChanged}
36153612
/>
36163613
) : null}
36173614
{renderFeedEntry(info, {

‎apps/mobile/src/features/threads/thread-handoff-row.tsx‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,6 @@ export function modelSwitchesAtom(environmentId: EnvironmentId, threadId: Thread
6868
});
6969
}
7070

71-
export function ThreadModelSwitchRow(props: {
72-
environmentId: EnvironmentId;
73-
modelSwitch: ModelSwitch;
74-
iconColor: ColorValue;
75-
surfaceColor: string;
76-
}) {
77-
const { from, to, label, effortChanged } = props.modelSwitch;
78-
return (
79-
<ThreadHandoffDivider
80-
environmentId={props.environmentId}
81-
endpoints={{ from: [from], to }}
82-
iconColor={props.iconColor}
83-
surfaceColor={props.surfaceColor}
84-
label={label}
85-
showEffort={effortChanged}
86-
/>
87-
);
88-
}
89-
9071
export function ThreadHandoffRow(props: {
9172
environmentId: EnvironmentId;
9273
projectedItem: OrchestrationV2ProjectedTurnItem;

0 commit comments

Comments
 (0)