@@ -1379,6 +1379,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
13791379 isEnvironmentUnavailable : boolean ;
13801380 hasSendableContent : boolean ;
13811381 canResume : boolean ;
1382+ resumeModelName : string | null ;
13821383 preserveComposerFocusOnPointerDown ?: boolean ;
13831384 isEditingQueuedMessage : boolean ;
13841385 onSubmitMessage : React . MouseEventHandler < HTMLButtonElement > ;
@@ -1423,6 +1424,7 @@ const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(
14231424 isPreparingWorktree = { props . isPreparingWorktree }
14241425 hasSendableContent = { props . hasSendableContent }
14251426 canResume = { props . canResume }
1427+ resumeModelName = { props . resumeModelName }
14261428 preserveComposerFocusOnPointerDown = { props . preserveComposerFocusOnPointerDown ?? false }
14271429 isEditingQueuedMessage = { props . isEditingQueuedMessage }
14281430 onSubmitMessage = { props . onSubmitMessage }
@@ -1549,6 +1551,8 @@ export interface ChatComposerProps {
15491551 isConnecting : boolean ;
15501552 isSendBusy : boolean ;
15511553 canResume : boolean ;
1554+ /** The model the resumable run used; resuming with a different composer model continues with it. */
1555+ resumeRunModelSelection : ModelSelection | null ;
15521556 isRevertingCheckpoint ?: boolean ;
15531557 sendDisabledReason : string | null ;
15541558 isPreparingWorktree : boolean ;
@@ -1733,6 +1737,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
17331737 isConnecting,
17341738 isSendBusy,
17351739 canResume,
1740+ resumeRunModelSelection,
17361741 isRevertingCheckpoint = false ,
17371742 sendDisabledReason : externalSendDisabledReason ,
17381743 isPreparingWorktree,
@@ -3035,6 +3040,13 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
30353040 ) ;
30363041 const showResumeAction =
30373042 canResume && ! composerDraftHasUserContent ( composerDraft ) && ! isEditingQueuedMessage ;
3043+ const resumeModelName =
3044+ showResumeAction &&
3045+ resumeRunModelSelection !== null &&
3046+ ( resumeRunModelSelection . instanceId !== selectedModelSelection . instanceId ||
3047+ resumeRunModelSelection . model !== selectedModelSelection . model )
3048+ ? resolveContextWindowModelDisplayName ( selectedModelSelection , modelOptionsByInstance )
3049+ : null ;
30383050 const collapsedComposerPrimaryActionDisabled =
30393051 phase === "running" ||
30403052 isSendBusy ||
@@ -3044,11 +3056,13 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
30443056 projectSelectionRequired ||
30453057 environmentUnavailable !== null ||
30463058 ( ! composerSendState . hasSendableContent && ! showResumeAction ) ;
3047- const collapsedComposerPrimaryActionLabel = showResumeAction
3048- ? "Resume thread"
3049- : props . resumeCompactionTokens !== null && ! props . keepFullHistory
3050- ? "Open composer to compact and send"
3051- : "Send message" ;
3059+ const collapsedComposerPrimaryActionLabel = resumeModelName
3060+ ? `Continue with ${ resumeModelName } `
3061+ : showResumeAction
3062+ ? "Resume thread"
3063+ : props . resumeCompactionTokens !== null && ! props . keepFullHistory
3064+ ? "Open composer to compact and send"
3065+ : "Send message" ;
30523066 const showMobilePendingAnswerActions =
30533067 isMobileViewport && ! isComposerCollapsedMobile && pendingPrimaryAction !== null ;
30543068
@@ -7690,6 +7704,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
76907704 isPreparingWorktree = { isPreparingWorktree }
76917705 hasSendableContent = { composerSendState . hasSendableContent }
76927706 canResume = { showResumeAction }
7707+ resumeModelName = { resumeModelName }
76937708 preserveComposerFocusOnPointerDown = { isMobileViewport || isComposerResting }
76947709 isEditingQueuedMessage = { isEditingQueuedMessage }
76957710 onSubmitMessage = { handleSubmitMessage }
0 commit comments