From b1fbf798e068c65c3c7808806ae7ac89f382f527 Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Fri, 26 Jul 2024 17:03:47 -0700 Subject: [PATCH] fix: isRunning should be optional (#588) --- packages/react-ai-sdk/src/rsc/VercelRSCAdapter.tsx | 2 +- .../src/runtimes/external-store/ExternalStoreAdapter.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-ai-sdk/src/rsc/VercelRSCAdapter.tsx b/packages/react-ai-sdk/src/rsc/VercelRSCAdapter.tsx index e2ad65358..4da56665d 100644 --- a/packages/react-ai-sdk/src/rsc/VercelRSCAdapter.tsx +++ b/packages/react-ai-sdk/src/rsc/VercelRSCAdapter.tsx @@ -7,7 +7,7 @@ type RSCMessageConverter = { }; type VercelRSCAdapterBase = { - isRunning: boolean; + isRunning?: boolean | undefined; messages: T[]; onNew?: (message: AppendMessage) => Promise; diff --git a/packages/react/src/runtimes/external-store/ExternalStoreAdapter.tsx b/packages/react/src/runtimes/external-store/ExternalStoreAdapter.tsx index 52e4c0aca..aad9713fd 100644 --- a/packages/react/src/runtimes/external-store/ExternalStoreAdapter.tsx +++ b/packages/react/src/runtimes/external-store/ExternalStoreAdapter.tsx @@ -12,8 +12,8 @@ type ExternalStoreMessageConverterAdapter = { }; type ExternalStoreAdapterBase = { - threadId?: string; - isRunning?: boolean; + threadId?: string | undefined; + isRunning?: boolean | undefined; messages: T[]; setMessages?: ((messages: T[]) => void) | undefined; onNew: (message: AppendMessage) => Promise;