Skip to content

Commit

Permalink
fix: only deprecate the null usage of switchToThread (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 18, 2024
1 parent db4c0fd commit 3a27782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/react/src/context/stores/AssistantActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export type AssistantActionsState = Readonly<{
/**
* @deprecated Use `switchToNewThread` instead. This will be removed in 0.6.0.
*/
switchToThread: (threadId: string | null) => void;
switchToThread(threadId: null): void;
switchToThread(threadId: string): void;

switchToNewThread: () => void;
registerModelConfigProvider: (provider: ModelConfigProvider) => Unsubscribe;
}>;
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/runtimes/core/AssistantRuntime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type AssistantRuntime = ThreadRuntimeWithSubscribe & {
/**
* @deprecated Use `switchToNewThread` instead. This will be removed in 0.6.0.
*/
switchToThread: (threadId: string | null) => void;
switchToThread(threadId: null): void;
switchToThread(threadId: string): void;
registerModelConfigProvider: (provider: ModelConfigProvider) => Unsubscribe;
};

0 comments on commit 3a27782

Please sign in to comment.