From ebe8411e7e00aa82dfd4365c62e3271bd0161849 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Sat, 13 Jun 2026 20:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20compact=20device=20guar?= =?UTF-8?q?d=20alert=20(#15776)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HeterogeneousChatInput/index.tsx | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/index.tsx b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/index.tsx index 3eab8a7c70..ee3f90cd1e 100644 --- a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/index.tsx +++ b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/index.tsx @@ -92,13 +92,14 @@ const HeterogeneousChatInput = memo(() => { } return ( - - - {desc} + + + - - } - /> - + } + /> + + + ); + }; + + const renderCloudConfigGuard = () => { + if (isDeviceExecution || isConfigured) return null; + + return ( + + + + {t('heteroAgent.cloudNotConfigured.action')} + + } + /> + + ); }; // Device execution doesn't use the cloud sandbox, so it doesn't need cloud // credentials — only the sandbox path gates on `isConfigured`. const inputDisabled = (!isConfigured && !isDeviceExecution) || deviceBlocked; + const hasGuard = deviceBlocked || (!isConfigured && !isDeviceExecution); return ( - {!isDeviceExecution && !isConfigured && ( - - - - {t('heteroAgent.cloudNotConfigured.desc')} - - - } - /> - - - )} + {renderCloudConfigGuard()} {renderDeviceGuard()} } leftActions={leftActions} rightActions={rightActions} sendButtonProps={{ disabled: inputDisabled, shape: 'round' }} + skipScrollMarginWithList={!hasGuard} onEditorReady={(instance) => { // Sync to global ChatStore for compatibility with other features useChatStore.setState({ mainInputEditor: instance });