From 88914ccba6dac086c368f8131f8455f494fdff70 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 26 May 2026 19:53:21 +0700 Subject: [PATCH] Fix draft mode chip for non-thinking models Keep the desktop controls row alive when desktop extras exist, so draft mode chips still render even when a model has no thinking options.\n\nRestore the replacement draft e2e assertion for the mode chip now that it renders again. --- packages/app/e2e/client-slash-commands.spec.ts | 5 +---- packages/app/src/composer/agent-controls/index.tsx | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/app/e2e/client-slash-commands.spec.ts b/packages/app/e2e/client-slash-commands.spec.ts index ffdfeccbc..9954b01cd 100644 --- a/packages/app/e2e/client-slash-commands.spec.ts +++ b/packages/app/e2e/client-slash-commands.spec.ts @@ -126,10 +126,7 @@ async function expectReplacementDraftMatchesPreviousSetup(page: Page): Promise { diff --git a/packages/app/src/composer/agent-controls/index.tsx b/packages/app/src/composer/agent-controls/index.tsx index a5a060cb6..1d3be1e25 100644 --- a/packages/app/src/composer/agent-controls/index.tsx +++ b/packages/app/src/composer/agent-controls/index.tsx @@ -195,17 +195,20 @@ function resolveHasAnyControl({ canSelectModel, thinkingOptions, features, + hasDesktopExtras, }: { providerOptions: AgentControlOption[] | undefined; canSelectModel: boolean; thinkingOptions: AgentControlOption[] | undefined; features: AgentFeature[] | undefined; + hasDesktopExtras: boolean; }) { return ( Boolean(providerOptions?.length) || canSelectModel || Boolean(thinkingOptions?.length) || - Boolean(features?.length) + Boolean(features?.length) || + hasDesktopExtras ); } @@ -440,6 +443,7 @@ function ControlledAgentControls({ canSelectModel, thinkingOptions, features, + hasDesktopExtras: desktopExtras !== null && desktopExtras !== undefined, }); const modelDisabled = disabled;