From 6490ad7c7b80cd11743e3f9a88e093e9243c9975 Mon Sep 17 00:00:00 2001 From: Dimitri Kennedy Date: Thu, 9 Nov 2023 18:28:29 -0500 Subject: [PATCH] dont load on other non run operations --- .changeset/silent-gorillas-explode.md | 5 +++++ packages/next-assistants/src/client/hooks/use-thread.ts | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/silent-gorillas-explode.md diff --git a/.changeset/silent-gorillas-explode.md b/.changeset/silent-gorillas-explode.md new file mode 100644 index 0000000..0c48b8a --- /dev/null +++ b/.changeset/silent-gorillas-explode.md @@ -0,0 +1,5 @@ +--- +"next-assistants": patch +--- + +dont set loading on all operations diff --git a/packages/next-assistants/src/client/hooks/use-thread.ts b/packages/next-assistants/src/client/hooks/use-thread.ts index d70c048..5620f78 100644 --- a/packages/next-assistants/src/client/hooks/use-thread.ts +++ b/packages/next-assistants/src/client/hooks/use-thread.ts @@ -120,7 +120,6 @@ export function useThread({ } const handleOperation = async (operation, successCallback?: (result) => void) => { - setLoading(true) try { const result = await operation()