From 9eca429a291e406929a522ecb7594ebd81a01f70 Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Sun, 26 Apr 2026 15:37:16 +0800 Subject: [PATCH] fix the lint errors in the frontend --- frontend/src/app/workspace/agents/new/page.tsx | 8 +++++--- frontend/src/core/threads/hooks.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/workspace/agents/new/page.tsx b/frontend/src/app/workspace/agents/new/page.tsx index 8b24e8494..a98fe8f9b 100644 --- a/frontend/src/app/workspace/agents/new/page.tsx +++ b/frontend/src/app/workspace/agents/new/page.tsx @@ -282,9 +282,11 @@ export default function NewAgentPage() { void handleSaveAgent()} - disabled={ - !!agent || thread.isLoading || setupAgentStatus !== "idle" - } + disabled={[ + Boolean(agent), + thread.isLoading, + setupAgentStatus !== "idle", + ].some(Boolean)} > {setupAgentStatus === "requested" diff --git a/frontend/src/core/threads/hooks.ts b/frontend/src/core/threads/hooks.ts index aceb291c3..ef605d832 100644 --- a/frontend/src/core/threads/hooks.ts +++ b/frontend/src/core/threads/hooks.ts @@ -2,7 +2,7 @@ import type { AIMessage, Message, Run } from "@langchain/langgraph-sdk"; import type { ThreadsClient } from "@langchain/langgraph-sdk/client"; import { useStream } from "@langchain/langgraph-sdk/react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { toast } from "sonner"; import type { PromptInputMessage } from "@/components/ai-elements/prompt-input";