From 7071ead0620ea3f39df251d43e848948d165cd56 Mon Sep 17 00:00:00 2001 From: MT-Fire <798521692@qq.com> Date: Sun, 29 Mar 2026 00:11:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E5=90=8C=E6=AD=A5=20agent=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=B4=E9=83=A8=E5=B9=B6=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agents/[agent_name]/chats/[thread_id]/page.tsx | 10 +++++----- frontend/src/app/workspace/agents/new/page.tsx | 7 ++++--- frontend/tsconfig.json | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/page.tsx index 64c1d3be..47f8a895 100644 --- a/frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/page.tsx +++ b/frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/page.tsx @@ -1,7 +1,6 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-nocheck "use client"; +import type { UseStream } from "@langchain/langgraph-sdk/react"; import { BotIcon, PlusSquare } from "lucide-react"; import { useParams, useRouter } from "next/navigation"; import { useCallback } from "react"; @@ -23,6 +22,7 @@ import { useAgent } from "@/core/agents"; import { useI18n } from "@/core/i18n/hooks"; import { useNotification } from "@/core/notification/hooks"; import { useLocalSettings } from "@/core/settings"; +import type { AgentThreadState } from "@/core/threads"; import { useThreadStream } from "@/core/threads/hooks"; import { textOfMessage } from "@/core/threads/utils"; import { env } from "@/env"; @@ -82,6 +82,7 @@ export default function AgentChatPage() { const handleStop = useCallback(async () => { await thread.stop(); }, [thread]); + const legacyThread = thread as unknown as UseStream; return ( @@ -104,7 +105,7 @@ export default function AgentChatPage() {
- +
@@ -129,7 +130,7 @@ export default function AgentChatPage() {
@@ -158,7 +159,6 @@ export default function AgentChatPage() { ; const header = (
@@ -199,7 +200,7 @@ export default function NewAgentPage() { diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 1d50bfb6..285f49e7 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -38,7 +38,8 @@ "**/*.tsx", "**/*.cjs", "**/*.js", - ".next/types/**/*.ts" + ".next/types/**/*.ts", + ".next/dev/types/**/*.ts" ], "exclude": ["node_modules", "generated", "imports"] }