From a8c79185f64ff426b10b1c1136cd67d8b3dd4f99 Mon Sep 17 00:00:00 2001 From: Ryan Hopper-Lowe <46546486+ryanhopperlowe@users.noreply.github.com> Date: Tue, 26 Nov 2024 23:20:05 -0600 Subject: [PATCH] fix: unable to start a new thread when tool call in progress (#698) * fix: unable to start a new thread when tool call in progress - internally indicates chat is no longer running when switching threads Signed-off-by: Ryan Hopper-Lowe * chore: remove unused agent prop from Agent component Signed-off-by: Ryan Hopper-Lowe --------- Signed-off-by: Ryan Hopper-Lowe --- ui/admin/app/components/agent/Agent.tsx | 1 - ui/admin/app/components/chat/ChatContext.tsx | 1 + ui/admin/app/routes/_auth.agents.$agent.tsx | 39 ++++++++------------ 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/ui/admin/app/components/agent/Agent.tsx b/ui/admin/app/components/agent/Agent.tsx index f24acb87..7d6cfd20 100644 --- a/ui/admin/app/components/agent/Agent.tsx +++ b/ui/admin/app/components/agent/Agent.tsx @@ -17,7 +17,6 @@ import { ScrollArea } from "~/components/ui/scroll-area"; import { useDebounce } from "~/hooks/useDebounce"; type AgentProps = { - agent: AgentType; className?: string; onRefresh?: (threadId: string | null) => void; }; diff --git a/ui/admin/app/components/chat/ChatContext.tsx b/ui/admin/app/components/chat/ChatContext.tsx index d5d1661f..0c3e0b33 100644 --- a/ui/admin/app/components/chat/ChatContext.tsx +++ b/ui/admin/app/components/chat/ChatContext.tsx @@ -205,6 +205,7 @@ function useMessageSource(threadId?: Nullish) { return () => { source.close(); + setIsRunning(false); }; }, [threadId, addContent]); diff --git a/ui/admin/app/routes/_auth.agents.$agent.tsx b/ui/admin/app/routes/_auth.agents.$agent.tsx index 4ae89bda..0f7d8693 100644 --- a/ui/admin/app/routes/_auth.agents.$agent.tsx +++ b/ui/admin/app/routes/_auth.agents.$agent.tsx @@ -65,30 +65,23 @@ export default function ChatAgent() { return (
- - - + + + + + + + + - - - - - - - - - - + + + +
); }