diff --git a/src/components/thread/messages/ai.tsx b/src/components/thread/messages/ai.tsx index aeeb0ea..e86c821 100644 --- a/src/components/thread/messages/ai.tsx +++ b/src/components/thread/messages/ai.tsx @@ -114,64 +114,77 @@ export function AssistantMessage({ return (
- {isToolResult ? ( - - ) : ( -
- {contentString.length > 0 && ( -
- {contentString} -
- )} +
+ {isToolResult ? ( + <> + + {isAgentInboxInterruptSchema(threadInterrupt?.value) && + (isLastMessage || hasNoAIOrToolMessages) && ( + + )} + {threadInterrupt?.value && + !isAgentInboxInterruptSchema(threadInterrupt.value) && + isLastMessage ? ( + + ) : null} + + ) : ( + <> + {contentString.length > 0 && ( +
+ {contentString} +
+ )} - {!hideToolCalls && ( - <> - {(hasToolCalls && toolCallsHaveContents && ( - - )) || - (hasAnthropicToolCalls && ( - + {!hideToolCalls && ( + <> + {(hasToolCalls && toolCallsHaveContents && ( + )) || - (hasToolCalls && )} - - )} + (hasAnthropicToolCalls && ( + + )) || + (hasToolCalls && )} + + )} - {message && ( - - )} - {isAgentInboxInterruptSchema(threadInterrupt?.value) && - (isLastMessage || hasNoAIOrToolMessages) && ( - + {message && ( + )} - {threadInterrupt?.value && - !isAgentInboxInterruptSchema(threadInterrupt.value) && - isLastMessage ? ( - - ) : null} -
- thread.setBranch(branch)} - isLoading={isLoading} - /> - handleRegenerate(parentCheckpoint)} - /> -
-
- )} + {isAgentInboxInterruptSchema(threadInterrupt?.value) && + (isLastMessage || hasNoAIOrToolMessages) && ( + + )} + {threadInterrupt?.value && + !isAgentInboxInterruptSchema(threadInterrupt.value) && + isLastMessage ? ( + + ) : null} +
+ thread.setBranch(branch)} + isLoading={isLoading} + /> + handleRegenerate(parentCheckpoint)} + /> +
+ + )} +
); }