From 05f3e2845e2fe4aa97069efa502a8e4fa555669a Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 29 Apr 2026 13:09:12 +0200 Subject: [PATCH] feat: relocate context picker, refine chat input + flow card radii - Move the @ context-picker Popover from above the textarea (in AIChatInput) to the bottom-left of the chat input controls row in AIChatDisplay, immediately to the left of the Flow mode selector. AIChatInput now exports addContextToSelection so the parent can drive the same validated add path. The badges-only row above the textarea only renders when there is at least one selected context (no empty bar). AIChatInput drops its now-unused Popover and AvailableContextList imports; AIChatDisplay picks them up plus AppAvailableContextList for the APP-mode list. - Replace the raw send/stop button with a Button variant="subtle" iconOnly, keeping the rounded-full 28x28 hit area via btnClasses, the ArrowUp/Square icon swap, and the disabled-when-empty / cancel-when- loading behavior. - Shrink the textarea: rows={3} -> rows={2} on all three textareas (ContextTextarea, the APP-mode textarea, the default-mode textarea) and bump min-height down from 3rem to 1.75rem so the textarea starts as a single visible line and grows with content via autosize. - Refine chat input box radius to rounded-xl, match the textarea via border-radius: 0.75rem, and add pt-1 above the textarea for a touch of breathing room from the card's top edge. - /design-sandbox: switch the right pane's flow editor card from rounded-xl to rounded-md so the flow card sits tighter while the chat input keeps the softer rounded-xl. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../copilot/chat/AIChatDisplay.svelte | 66 ++++++++++++++----- .../copilot/chat/AIChatInput.svelte | 52 ++------------- .../copilot/chat/ContextTextarea.svelte | 5 +- .../(logged)/design-sandbox/+page.svelte | 2 +- 4 files changed, 60 insertions(+), 65 deletions(-) diff --git a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte index 770dcf7b59..47e726b937 100644 --- a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte +++ b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte @@ -19,6 +19,9 @@ import ProviderModelSelector from './ProviderModelSelector.svelte' import ChatMode from './ChatMode.svelte' import DatatableCreationPolicy from './DatatableCreationPolicy.svelte' + import Popover from '$lib/components/meltComponents/Popover.svelte' + import AvailableContextList from './AvailableContextList.svelte' + import AppAvailableContextList from './AppAvailableContextList.svelte' import Markdown from 'svelte-exmarkdown' import { aiChatManager, AIMode } from './AIChatManager.svelte' import AIChatInput from './AIChatInput.svelte' @@ -173,9 +176,9 @@ {/if}
-
+
{:else} + {#if aiChatManager.mode === AIMode.SCRIPT || aiChatManager.mode === AIMode.FLOW || aiChatManager.mode === AIMode.APP} + + {#snippet trigger()} +
+ @ +
+ {/snippet} + {#snippet content({ close })} + {#if aiChatManager.mode === AIMode.APP} + { + aiChatInput?.addContextToSelection(element) + close() + }} + /> + {:else} + { + aiChatInput?.addContextToSelection(element) + close() + }} + onSelectWorkspaceItem={(element) => { + aiChatInput?.addContextToSelection(element) + close() + }} + /> + {/if} + {/snippet} +
+ {/if} {#if aiChatManager.mode === AIMode.APP} @@ -278,26 +318,22 @@
{#if !disabled} - + /> {/if}
diff --git a/frontend/src/lib/components/copilot/chat/AIChatInput.svelte b/frontend/src/lib/components/copilot/chat/AIChatInput.svelte index b7632335b3..eabeacc25f 100644 --- a/frontend/src/lib/components/copilot/chat/AIChatInput.svelte +++ b/frontend/src/lib/components/copilot/chat/AIChatInput.svelte @@ -1,6 +1,4 @@