-
Notifications
You must be signed in to change notification settings - Fork 18
feat(staged): make chat replies multiline and move Stop to the thinking row #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0ddebbc
d4eb884
a605199
f1e7a2c
16fbb0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,10 @@ | |
| argument previews. | ||
|
|
||
| Features: | ||
| - Text input always available at the bottom | ||
| - Send button when idle, Stop button when running | ||
| - Message queue: hitting Enter while running persists a follow-up for backend drain | ||
| - Text input always available at the bottom (Cmd/Ctrl+Enter sends, Enter adds a newline) | ||
| - Send button when idle, Queue button when running; Stop lives on the Thinking row | ||
| - While a pipeline runs, the composer is replaced by a labeled Stop button | ||
| - Message queue: sending while running persists a follow-up for backend drain | ||
| - Copy button on every message | ||
| - Tool calls show name + args preview; expand to see output | ||
| - Fixed-size modal with proper scrolling | ||
|
|
@@ -874,7 +875,8 @@ | |
| // ========================================================================= | ||
|
|
||
| function handleInputKeydown(e: KeyboardEvent) { | ||
| if (e.key === 'Enter' && !e.shiftKey && !e.altKey) { | ||
| // Multiline input: plain Enter inserts a newline; Cmd/Ctrl+Enter sends. | ||
| if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) { | ||
| e.preventDefault(); | ||
| handleSend(); | ||
| } | ||
|
|
@@ -1464,7 +1466,7 @@ | |
| .map((message) => message.id); | ||
| }); | ||
|
|
||
| let isPipelinePrelude = $derived(isLive && !!session?.pipeline && grouped.length === 0); | ||
| let isPipelineRunning = $derived(isLive && !!session?.pipeline); | ||
|
|
||
| function insertSlashCommand(command: AcpCommand) { | ||
| inputText = `/${command.name}${command.inputHint ? ' ' : ''}`; | ||
|
|
@@ -1961,6 +1963,22 @@ | |
| <div class="thinking" in:messageSlide> | ||
| <Spinner size={14} /> | ||
| <span>Thinking…</span> | ||
| <Button | ||
|
Comment on lines
1963
to
+1966
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a live non-pipeline session has no transcript groups, rendering takes the earlier Useful? React with 👍 / 👎. |
||
| variant="destructive" | ||
| size="sm" | ||
| class="ml-auto" | ||
| title="Stop session" | ||
| aria-label="Stop session" | ||
| onclick={handleCancel} | ||
| disabled={cancelling} | ||
| > | ||
| {#if cancelling} | ||
| <Spinner size={14} /> | ||
| {:else} | ||
| <CircleStop size={14} /> | ||
| {/if} | ||
| Stop | ||
| </Button> | ||
| </div> | ||
| {/if} | ||
|
|
||
|
|
@@ -2016,22 +2034,22 @@ | |
|
|
||
| <!-- Input area with queued messages and image previews --> | ||
| <div class="input-wrapper"> | ||
| {#if isPipelinePrelude} | ||
| {#if isPipelineRunning} | ||
| <div class="pipeline-stop-area"> | ||
| <span class="inline-flex" title="Stop workflow"> | ||
| <Button | ||
| variant="destructive" | ||
| size="icon" | ||
| class="size-9 shrink-0 rounded-[10px] [&_svg]:!size-4" | ||
| size="sm" | ||
| aria-label="Stop workflow" | ||
| onclick={handleCancel} | ||
| disabled={cancelling} | ||
| > | ||
| {#if cancelling} | ||
| <Spinner size={16} /> | ||
| <Spinner size={14} /> | ||
| {:else} | ||
| <CircleStop size={16} /> | ||
| <CircleStop size={14} /> | ||
| {/if} | ||
| Stop | ||
| </Button> | ||
| </span> | ||
| </div> | ||
|
|
@@ -2115,9 +2133,7 @@ | |
| onRemoveImage={removeReplyImage} | ||
| {isLive} | ||
| {sending} | ||
| {cancelling} | ||
| onSend={handleSend} | ||
| onStop={handleCancel} | ||
| > | ||
| {#snippet configPicker()} | ||
| <AcpFixedConfigPicker | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes Ctrl+Enter the documented send shortcut, but when the hashtag dropdown is open
HashtagInputstill consumesEnterwhenever!shiftKey && !metaKey, so on Windows/Linux Ctrl+Enter selects the highlighted hashtag instead of reaching this handler. Messages with an open#suggestion therefore cannot be sent with the advertised shortcut unless the user first dismisses the dropdown or uses the button.Useful? React with 👍 / 👎.