This commit is contained in:
bracesproul
2025-03-10 14:05:23 -07:00
parent 29d8ba5163
commit e76caab576
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import { cn } from "@/lib/utils";
import { ToolCalls, ToolResult } from "./tool-calls"; import { ToolCalls, ToolResult } from "./tool-calls";
import { MessageContentComplex } from "@langchain/core/messages"; import { MessageContentComplex } from "@langchain/core/messages";
import { Fragment } from "react/jsx-runtime"; import { Fragment } from "react/jsx-runtime";
import { isAgentInboxInterrupt } from "@/lib/is-hitl"; import { isAgentInboxInterruptSchema } from "@/lib/agent-inbox-interrupt";
import { ThreadView } from "../agent-inbox"; import { ThreadView } from "../agent-inbox";
function CustomComponent({ function CustomComponent({
@@ -118,7 +118,7 @@ export function AssistantMessage({
)) || )) ||
(hasToolCalls && <ToolCalls toolCalls={message.tool_calls} />)} (hasToolCalls && <ToolCalls toolCalls={message.tool_calls} />)}
<CustomComponent message={message} thread={thread} /> <CustomComponent message={message} thread={thread} />
{isAgentInboxInterrupt(interrupt?.value) && ( {isAgentInboxInterruptSchema(interrupt?.value) && (
<ThreadView interrupt={interrupt.value[0]} /> <ThreadView interrupt={interrupt.value[0]} />
)} )}
<div <div

View File

@@ -1,6 +1,6 @@
import { HumanInterrupt } from "@langchain/langgraph/prebuilt"; import { HumanInterrupt } from "@langchain/langgraph/prebuilt";
export function isAgentInboxInterrupt( export function isAgentInboxInterruptSchema(
value: unknown, value: unknown,
): value is HumanInterrupt[] { ): value is HumanInterrupt[] {
return ( return (