From 4f75b65d523adbf35929f9a2748eb910ddbbecc8 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Fri, 10 Apr 2026 04:32:06 +0800 Subject: [PATCH] fix(main.tsx): add type field to local UIMessage type --- langgraph/src/main.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/langgraph/src/main.tsx b/langgraph/src/main.tsx index 5a8f145..bda8055 100644 --- a/langgraph/src/main.tsx +++ b/langgraph/src/main.tsx @@ -4,7 +4,8 @@ import { LoadExternalComponent } from "@langchain/langgraph-sdk/react-ui"; import type { Message } from "@langchain/langgraph-sdk"; // UIMessage is not exported directly — use a local shape -type UIMessage = { id: string; name: string; props: Record; metadata?: { message_id?: string } }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type UIMessage = { id: string; type: string; name: string; props: Record; metadata?: { message_id?: string } }; import { useState, useRef, useEffect } from "react"; import ComponentMap from "./agent-uis/index.tsx"; import "./index.css";