@@ -898,18 +898,25 @@ function ChatInput({
898898function AssistantMessageBody ( {
899899 message,
900900 isStreaming,
901+ isLast,
901902 sessionId,
902903 onViewInNotebook,
903904} : {
904905 message : ChatMessage ;
905906 isStreaming : boolean ;
907+ isLast : boolean ;
906908 sessionId : string | null ;
907909 onViewInNotebook ?: ( entryId : string ) => void ;
908910} ) {
909911 const activities = message . activities ?? [ ] ;
910912 const hasReasoning = Boolean ( message . reasoning ?. trim ( ) ) ;
911913 const hasAnything =
912914 Boolean ( message . content ) || activities . length > 0 || hasReasoning ;
915+ // Some models occasionally end a turn right after a tool call with no
916+ // closing text, which used to leave the chat silently "done". Surface that
917+ // explicitly on the final bubble so the user knows the run ended.
918+ const endedWithoutReply =
919+ ! isStreaming && isLast && ! message . content && ( activities . length > 0 || hasReasoning ) ;
913920
914921 // Interview tool calls render as interactive forms, and notebook calls as
915922 // compact pointer chips, in stream order between the surrounding tool cards
@@ -948,6 +955,11 @@ function AssistantMessageBody({
948955 < Shimmer className = "text-sm" duration = { 1.5 } >
949956 Thinking...
950957 </ Shimmer >
958+ ) : endedWithoutReply ? (
959+ < p className = "text-xs italic text-muted-foreground" >
960+ The model finished this turn without a closing message. The tool
961+ results above are the outcome; ask a follow-up if you want a summary.
962+ </ p >
951963 ) : null }
952964 { message . citations && (
953965 < div className = "flex flex-wrap items-center gap-2" >
@@ -1358,13 +1370,14 @@ export const ChatTab = forwardRef<ChatTabHandle, ChatTabProps>(function ChatTab(
13581370 description = "I can research topics, write code, and analyze data."
13591371 />
13601372 ) : (
1361- messages . map ( ( message ) => (
1373+ messages . map ( ( message , i ) => (
13621374 < Message from = { message . role } key = { message . id } >
13631375 < MessageContent >
13641376 { message . role === "assistant" ? (
13651377 < AssistantMessageBody
13661378 message = { message }
13671379 isStreaming = { isStreaming }
1380+ isLast = { i === messages . length - 1 }
13681381 sessionId = { sessionId }
13691382 onViewInNotebook = { onViewInNotebook }
13701383 />
0 commit comments