@@ -1376,6 +1376,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
13761376 isEnvironmentUnavailable : boolean ;
13771377 hasSendableContent : boolean ;
13781378 canResume : boolean ;
1379+ resumeModelName : string | null ;
13791380 preserveComposerFocusOnPointerDown ?: boolean ;
13801381 isEditingQueuedMessage : boolean ;
13811382 onSubmitMessage : React . MouseEventHandler < HTMLButtonElement > ;
@@ -1419,6 +1420,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
14191420 isPreparingWorktree = { props . isPreparingWorktree }
14201421 hasSendableContent = { props . hasSendableContent }
14211422 canResume = { props . canResume }
1423+ resumeModelName = { props . resumeModelName }
14221424 preserveComposerFocusOnPointerDown = { props . preserveComposerFocusOnPointerDown ?? false }
14231425 isEditingQueuedMessage = { props . isEditingQueuedMessage }
14241426 onSubmitMessage = { props . onSubmitMessage }
@@ -1543,6 +1545,8 @@ export interface ChatComposerProps {
15431545 isConnecting : boolean ;
15441546 isSendBusy : boolean ;
15451547 canResume : boolean ;
1548+ /** The model the resumable run used; resuming with a different composer model continues with it. */
1549+ resumeRunModelSelection : ModelSelection | null ;
15461550 isRevertingCheckpoint ?: boolean ;
15471551 sendDisabledReason : string | null ;
15481552 isPreparingWorktree : boolean ;
@@ -1724,6 +1728,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
17241728 isConnecting,
17251729 isSendBusy,
17261730 canResume,
1731+ resumeRunModelSelection,
17271732 isRevertingCheckpoint = false ,
17281733 sendDisabledReason : externalSendDisabledReason ,
17291734 isPreparingWorktree,
@@ -3001,6 +3006,13 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
30013006 ) ;
30023007 const showResumeAction =
30033008 canResume && ! composerDraftHasUserContent ( composerDraft ) && ! isEditingQueuedMessage ;
3009+ const resumeModelName =
3010+ showResumeAction &&
3011+ resumeRunModelSelection !== null &&
3012+ ( resumeRunModelSelection . instanceId !== selectedModelSelection . instanceId ||
3013+ resumeRunModelSelection . model !== selectedModelSelection . model )
3014+ ? resolveContextWindowModelDisplayName ( selectedModelSelection , modelOptionsByInstance )
3015+ : null ;
30043016 const collapsedComposerPrimaryActionDisabled =
30053017 phase === "running" ||
30063018 isSendBusy ||
@@ -3010,11 +3022,13 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
30103022 projectSelectionRequired ||
30113023 environmentUnavailable !== null ||
30123024 ( ! composerSendState . hasSendableContent && ! showResumeAction ) ;
3013- const collapsedComposerPrimaryActionLabel = showResumeAction
3014- ? "Resume thread"
3015- : props . resumeCompactionTokens !== null
3016- ? "Open composer to compact and send"
3017- : "Send message" ;
3025+ const collapsedComposerPrimaryActionLabel = resumeModelName
3026+ ? `Continue with ${ resumeModelName } `
3027+ : showResumeAction
3028+ ? "Resume thread"
3029+ : props . resumeCompactionTokens !== null
3030+ ? "Open composer to compact and send"
3031+ : "Send message" ;
30183032 const showMobilePendingAnswerActions =
30193033 isMobileViewport && ! isComposerCollapsedMobile && pendingPrimaryAction !== null ;
30203034
@@ -7596,6 +7610,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
75967610 isPreparingWorktree = { isPreparingWorktree }
75977611 hasSendableContent = { composerSendState . hasSendableContent }
75987612 canResume = { showResumeAction }
7613+ resumeModelName = { resumeModelName }
75997614 preserveComposerFocusOnPointerDown = { isMobileViewport || isComposerResting }
76007615 isEditingQueuedMessage = { isEditingQueuedMessage }
76017616 onSubmitMessage = { handleSubmitMessage }
0 commit comments