From 6889974c054b3c2e54685831fbcf6ccdae47dfd4 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 24 Jul 2026 14:30:07 +0800 Subject: [PATCH] fix: smooth the preview-to-build transition (#39495) --- .../configure/__tests__/page.spec.tsx | 54 +++++++++++++++++++ .../configure/components/composer-session.tsx | 23 +++----- .../components/preview/chat-runtime.tsx | 3 ++ .../components/preview/chat-session.tsx | 11 ++-- .../use-agent-configure-build-draft.ts | 2 +- .../use-agent-configure-session-controller.ts | 28 +++++----- 6 files changed, 89 insertions(+), 32 deletions(-) diff --git a/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx b/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx index 2d462575853..00418b9b62a 100644 --- a/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx +++ b/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx @@ -370,6 +370,7 @@ vi.mock('../components/preview/build-chat', async () => { clearChatList?: boolean conversationId?: string | null controllerRef?: Ref<{ stop: () => void }> + disabled?: boolean onConversationComplete?: (conversationId: string) => void onConversationIdChange?: (conversationId: string) => void onBeforeSpeechToText?: () => Promise @@ -397,6 +398,7 @@ vi.mock('../components/preview/build-chat', async () => {