From 303865438faba95d09450dd42905ea3d41f1eaa8 Mon Sep 17 00:00:00 2001 From: shine1i Date: Mon, 2 Feb 2026 15:03:01 +0100 Subject: [PATCH] refactor: replace depreceated `useAssistantRuntime` with `useAui`, update runtime API calls across chat features for consistency --- .../src/components/assistant-ui/thread.tsx | 20 ++++++------- .../src/features/chat/runtime-provider.tsx | 28 ++++++------------- .../src/features/chat/shared-composer.tsx | 12 ++++---- 3 files changed, 22 insertions(+), 38 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx index 400fcb6c81..3bcaaea105 100644 --- a/studio/frontend/src/components/assistant-ui/thread.tsx +++ b/studio/frontend/src/components/assistant-ui/thread.tsx @@ -19,9 +19,7 @@ import { MessagePrimitive, SuggestionPrimitive, ThreadPrimitive, - useComposerRuntime, - useMessageRuntime, - useThreadRuntime, + useAui, } from "@assistant-ui/react"; import { motion } from "framer-motion"; import { @@ -359,9 +357,7 @@ const UserActionBar: FC = () => { }; const EditComposer: FC = () => { - const threadRuntime = useThreadRuntime(); - const composerRuntime = useComposerRuntime(); - const messageRuntime = useMessageRuntime(); + const aui = useAui(); return ( @@ -379,18 +375,18 @@ const EditComposer: FC = () => {