From 87ad9804f87575ccc2eed6ac467a2f90ed34d158 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Tue, 4 Aug 2026 15:19:15 -0700 Subject: [PATCH] feat(studio): composer follows the selection, and speaks for a whole one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Selecting an element now opens the composer on it — the selection was already the ask, and waiting for a second gesture on the thing just clicked was a step for nothing. A multi-selection carries through: the prompt names every co-selected element and widens its guardrail to "change every one of them", and the field says how many it is talking about. The harness and model lists are capped and scroll on their own instead of growing the composer, and they declare they own their wheel so the canvas underneath stays put. Adds usage telemetry for the whole surface — composer opened, run submitted, harness and model chosen, custom harness added — carrying the harness, model and element count, never the instruction text. --- .../components/editor/InlineAgentComposer.tsx | 17 +++++- .../src/components/editor/domEditing.test.ts | 43 +++++++++++++ .../editor/domEditingAgentPrompt.ts | 25 +++++++- packages/studio/src/hooks/useAskAgentModal.ts | 60 +++++++++++++++++-- .../studio/src/hooks/useDomEditSession.ts | 1 + 5 files changed, 138 insertions(+), 8 deletions(-) diff --git a/packages/studio/src/components/editor/InlineAgentComposer.tsx b/packages/studio/src/components/editor/InlineAgentComposer.tsx index 45cc1c1544..f2135fc442 100644 --- a/packages/studio/src/components/editor/InlineAgentComposer.tsx +++ b/packages/studio/src/components/editor/InlineAgentComposer.tsx @@ -262,7 +262,10 @@ export function InlineAgentComposer({ {pickerOpen && onSelectAgent && ( -
+
{addingAgent && onAddCustomAgent ? ( 0 && ( -
    +