Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(chat): continue interrupted turns with one tap #11716

Closedspaansba(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/11716/headopened View on GitHub

Showing 8 changed files with 92 additions and 8 deletions (loading 5).

x
0 of 8 viewed, 8 left
55 additions and 5 deletionsapps/mobile/src/features/threads/ThreadComposer.tsxModified
View file
@@ -109,6 +109,7 @@
useThreadSettingsSheetPresentation,
type NavigationWithFinishTransitioning,
} from "./use-thread-settings-sheet-presentation";
+import { resolveThreadComposerPrimaryAction } from "./threadComposerPrimaryAction";
​
/**
* Height of the collapsed composer (pill + vertical padding, excluding safe-area inset).
@@ -146,7 +147,7 @@
readonly onNativePasteText: (paste: ComposerTextPaste) => Promise<void>;
readonly onRemoveDraftImage: (imageId: string) => void;
readonly onStopThread: () => void;
- readonly onSendMessage: () => Promise<MessageId | null>;
+ readonly onSendMessage: (messageOverride?: string) => Promise<MessageId | null>;
/** `/usage-limits` resolves locally; the host decides where the report shows. Null clears it. */
readonly onShowUsageLimits: (report: UsageLimitsReport | null) => void;
readonly onUpdateModelSelection: (modelSelection: ModelSelection) => void;
@@ -297,10 +298,13 @@
() => composerStripAttachments(props.draftAttachments),
[props.draftAttachments],
- const showStopAction =
- !hasContent &&
- (props.selectedThread.session?.status === "running" ||
- props.selectedThread.session?.status === "starting");
+ const primaryAction = resolveThreadComposerPrimaryAction({
+ hasContent,
+ latestTurnState: props.selectedThread.latestTurn?.state ?? null,