fix(main.tsx): add type field to local UIMessage type

This commit is contained in:
gongzhiyong
2026-04-10 04:32:06 +08:00
parent 844aaa8dcc
commit 4f75b65d52
+2 -1
View File
@@ -4,7 +4,8 @@ import { LoadExternalComponent } from "@langchain/langgraph-sdk/react-ui";
import type { Message } from "@langchain/langgraph-sdk"; import type { Message } from "@langchain/langgraph-sdk";
// UIMessage is not exported directly — use a local shape // UIMessage is not exported directly — use a local shape
type UIMessage = { id: string; name: string; props: Record<string, unknown>; metadata?: { message_id?: string } }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
type UIMessage = { id: string; type: string; name: string; props: Record<string, unknown>; metadata?: { message_id?: string } };
import { useState, useRef, useEffect } from "react"; import { useState, useRef, useEffect } from "react";
import ComponentMap from "./agent-uis/index.tsx"; import ComponentMap from "./agent-uis/index.tsx";
import "./index.css"; import "./index.css";