fix: render interrupt after tool result
Fix GenericInterruptView not rendering after tool result followed by interrupt Previously, the GenericInterruptView failed to render when an interrupt occurred immediately after a tool result message.
This commit is contained in:
@@ -114,10 +114,22 @@ export function AssistantMessage({
|
||||
|
||||
return (
|
||||
<div className="group mr-auto flex items-start gap-2">
|
||||
{isToolResult ? (
|
||||
<ToolResult message={message} />
|
||||
) : (
|
||||
<div className="flex flex-col gap-2">
|
||||
{isToolResult ? (
|
||||
<>
|
||||
<ToolResult message={message} />
|
||||
{isAgentInboxInterruptSchema(threadInterrupt?.value) &&
|
||||
(isLastMessage || hasNoAIOrToolMessages) && (
|
||||
<ThreadView interrupt={threadInterrupt.value} />
|
||||
)}
|
||||
{threadInterrupt?.value &&
|
||||
!isAgentInboxInterruptSchema(threadInterrupt.value) &&
|
||||
isLastMessage ? (
|
||||
<GenericInterruptView interrupt={threadInterrupt.value} />
|
||||
) : null}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{contentString.length > 0 && (
|
||||
<div className="py-1">
|
||||
<MarkdownText>{contentString}</MarkdownText>
|
||||
@@ -170,9 +182,10 @@ export function AssistantMessage({
|
||||
handleRegenerate={() => handleRegenerate(parentCheckpoint)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user