From 87f95ca40354ff31d85d9696d2183df2a548566e Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Fri, 16 Aug 2024 23:23:16 -0700 Subject: [PATCH] feat: pass abortController to tool call execute function (#669) --- .../src/components/ui/assistant-ui/thread.tsx | 6 +++--- .../src/context/providers/ThreadProvider.tsx | 3 +-- packages/react/src/context/stores/Thread.ts | 7 ------- .../composer/useComposerSend.tsx | 2 +- .../src/primitives/composer/ComposerInput.tsx | 4 ++-- .../react/src/runtimes/edge/EdgeChatAdapter.ts | 2 +- .../runtimes/edge/converters/toCoreMessages.ts | 2 +- .../edge/converters/toLanguageModelMessages.ts | 17 ++++++++--------- .../src/runtimes/edge/createEdgeRuntimeAPI.ts | 4 +++- .../runtimes/edge/streams/toolResultStream.ts | 10 +++++++--- packages/react/src/types/ModelConfigTypes.ts | 3 +++ 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/react-playground/src/components/ui/assistant-ui/thread.tsx b/packages/react-playground/src/components/ui/assistant-ui/thread.tsx index 3aebff8a0..7ff31ad51 100644 --- a/packages/react-playground/src/components/ui/assistant-ui/thread.tsx +++ b/packages/react-playground/src/components/ui/assistant-ui/thread.tsx @@ -104,7 +104,7 @@ const Composer: FC = () => { const { useThread, useThreadActions, useComposer, useThreadMessages } = useThreadContext(); - const unstable_canAppendNew = useThread((t) => t.unstable_canAppendNew); + const isRunning = useThread((t) => t.isRunning); const hasValue = useComposer((c) => c.value.length > 0); const performAdd = () => { @@ -167,7 +167,7 @@ const Composer: FC = () => {