From 53925d2e2beaaff41959d017a112edaa365595e7 Mon Sep 17 00:00:00 2001 From: majdyz Date: Wed, 15 Apr 2026 16:15:22 +0700 Subject: [PATCH] fix(frontend): hide mode/model toggles during session, show as read-only when non-default --- .../components/ChatInput/ChatInput.tsx | 30 +++++++++++-------- .../ChatInput/components/ModeToggleButton.tsx | 15 ++++++---- .../components/ModelToggleButton.tsx | 19 ++++++++---- 3 files changed, 42 insertions(+), 22 deletions(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx index b6fedb722e..1a00f8def6 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx @@ -218,18 +218,24 @@ export function ChatInput({ onFilesSelected={handleFilesSelected} disabled={isBusy} /> - {showModeToggle && !isStreaming && ( - - )} - {showModeToggle && !isStreaming && ( - - )} + {showModeToggle && + !isStreaming && + (!hasSession || copilotChatMode === "extended_thinking") && ( + + )} + {showModeToggle && + !isStreaming && + (!hasSession || copilotLlmModel === "advanced") && ( + + )} {showDryRunToggle && (!hasSession || isDryRun) && ( void; + readOnly?: boolean; } -export function ModeToggleButton({ mode, onToggle }: Props) { +export function ModeToggleButton({ mode, onToggle, readOnly = false }: Props) { const isExtended = mode === "extended_thinking"; return (