Skip to content

Commit f8b4ece

Browse files
authored
fix: composer history, emoji search focus, usage ring, recap code, ask endings, invoke toasts, copy confirmation (#576)
- ↑/↓ browses past the newest message, and ↓ restores the mode before browsing (^541) - the emoji picker focuses its search so typing filters instead of reaching the composer (^495) - the usage ring sits above Send's hover halo so its center opens the popover (^571) - recaps render backticked spans as code (^522) - ace ask prints one ending for a stopped run (^592) - only a missing provider key offers Providers on a failed invoke (^519) - copying a message confirms with a toast (^566)
1 parent 49f0e66 commit f8b4ece

13 files changed

Lines changed: 92 additions & 32 deletions

‎.lane/memory/apps/app/src/composer.tsx/01M4YQG7BVWEFZPD56A2BA0VE9-mode-ace-mode-channels-id-an.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ anchor: function Composer
44
created: 2026-10-15T02:50:44Z
55
norm: '1'
66
sig: 6e0e6c5c8afbd01a
7-
body_hash: 5f7b73ecdc92491d
8-
raw_hash: 92a0017bb10f2de6
9-
vouched: 2026-10-19T20:57:54Z
7+
body_hash: f265dfc748a0c278
8+
raw_hash: dd0efcf54d33e479
9+
vouched: 2026-10-22T14:39:32Z
1010
lines: 99-282
1111
---
1212

‎.lane/memory/apps/app/src/composer.tsx/01M4ZSEZBJJ3AMEBTR7SH36FW4-models-are-read-only-while-t.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ anchor: function Composer
44
created: 2026-10-15T12:44:15Z
55
norm: '1'
66
sig: 6e0e6c5c8afbd01a
7-
body_hash: 5f7b73ecdc92491d
8-
raw_hash: 92a0017bb10f2de6
9-
vouched: 2026-10-19T20:57:54Z
7+
body_hash: f265dfc748a0c278
8+
raw_hash: dd0efcf54d33e479
9+
vouched: 2026-10-22T14:39:32Z
1010
lines: 101-290
1111
---
1212

‎.lane/memory/apps/app/src/composer.tsx/01M4ZYQVGB6C87WBEV12WPQ8PF-a-withdrawn-message-returns.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ anchor: function Composer
44
created: 2026-10-15T14:16:28Z
55
norm: '1'
66
sig: 6e0e6c5c8afbd01a
7-
body_hash: 5f7b73ecdc92491d
8-
raw_hash: 92a0017bb10f2de6
9-
vouched: 2026-10-19T20:57:54Z
7+
body_hash: f265dfc748a0c278
8+
raw_hash: dd0efcf54d33e479
9+
vouched: 2026-10-22T14:39:32Z
1010
lines: 104-326
1111
---
1212

‎.lane/memory/apps/host/src/cli.ts/01M4YY5SXJFQK8VXT78X1E0KAE-every-command-but-serve-must.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ anchor: function main
44
created: 2026-10-15T04:47:23Z
55
norm: '1'
66
sig: 7d5d3f63a3bddde4
7-
body_hash: fd9cef47cdc61076
8-
raw_hash: e9c988923aa657a6
9-
vouched: 2026-10-22T14:31:33Z
7+
body_hash: 42c616dba5adb167
8+
raw_hash: 1a7c366637365036
9+
vouched: 2026-10-22T14:45:22Z
1010
lines: 253-482
1111
---
1212

‎.lane/memory/apps/host/src/cli.ts/01M5J0BZWP8SCBK522YT2HMZDZ-ace-info-prints-agent-access.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ anchor: function main
44
created: 2026-10-22T14:31:16Z
55
norm: '1'
66
sig: 7d5d3f63a3bddde4
7-
body_hash: fd9cef47cdc61076
8-
raw_hash: e9c988923aa657a6
7+
body_hash: 42c616dba5adb167
8+
raw_hash: 1a7c366637365036
9+
vouched: 2026-10-22T14:45:22Z
910
lines: 332-614
1011
---
1112

‎.lane/memory/packages/ui/src/components/composer/chat-composer.tsx/01M53E0S8M7RPD1RK65J9NG78E-dictation-writes-only-betwee.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ anchor: function useComposer
44
created: 2026-10-16T22:41:13Z
55
norm: '1'
66
sig: 381929b0cbaf2245
7-
body_hash: 8f1d85407de87351
8-
raw_hash: 6588ffae72ff82db
7+
body_hash: 4dcfff341604590f
8+
raw_hash: 03d5450461fb3892
9+
vouched: 2026-10-22T14:39:32Z
910
lines: 597-1226
1011
---
1112

‎apps/app/src/composer.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,12 @@ export function Composer(
252252
const sent = new Set(attached);
253253
setAttached((current) => current.filter((value) => !sent.has(value)));
254254
} catch (error) {
255+
const { message } = error as Error;
256+
// Only a missing key is fixed in Providers; busy, access and size errors are not.
257+
const keys = invoke && onProviders && /provider key/i.test(message);
255258
toast.error(invoke ? "Could not invoke agent" : "Could not send message", {
256-
description: (error as Error).message,
257-
...(invoke && onProviders ? { action: { label: "Providers", onClick: onProviders } } : {}),
259+
description: message,
260+
...(keys ? { action: { label: "Providers", onClick: onProviders } } : {}),
258261
});
259262
} finally {
260263
sending.current = false;

‎apps/app/src/conversation.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ export function Conversation(
201201
);
202202
act({ op: "react", emoji, remove }, uid);
203203
}}
204-
onCopy={(uid) => void navigator.clipboard.writeText(byKey.get(uid)!.text)}
204+
onCopy={(uid) =>
205+
navigator.clipboard.writeText(byKey.get(uid)!.text).then(
206+
() => toast("Copied message"),
207+
(error) =>
208+
toast.error("Could not copy the message", { description: error.message }),
209+
)}
205210
onDelete={setDeleting}
206211
editable={editable}
207212
editing={edited?.key}

‎apps/host/src/cli.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ function clip(text: string, length: number): string {
133133
return line.length > length ? `${line.slice(0, length - 1)}…` : line;
134134
}
135135

136+
/** Whether `(run ended)` already printed, so `ask` doesn't print a second ending. */
137+
let ended = false;
138+
136139
function render(event: Event, info: ChannelInfo) {
137140
const tag = event.chat === 1 && info.chats.length === 1 ? "" : dim(`[${event.chat}] `);
138141
switch (event.kind) {
@@ -151,7 +154,9 @@ function render(event: Event, info: ChannelInfo) {
151154
case "result":
152155
return console.log(dim(`${tag} ${event.error ? "✗" : "←"} ${clip(event.text, 100)}`));
153156
case "run":
154-
return event.state === "end" && console.log(dim(`${tag} (run ended)`));
157+
if (event.state !== "end") return;
158+
ended = true;
159+
return console.log(dim(`${tag} (run ended)`));
155160
}
156161
}
157162

@@ -536,7 +541,7 @@ async function main() {
536541
process.exit(130);
537542
});
538543
const status = await session.request<string>({ op: "wait", submission });
539-
if (status === "unanswered") console.log(dim(" (stopped before answering)"));
544+
if (status === "unanswered" && !ended) console.log(dim(" (stopped before answering)"));
540545
return;
541546
}
542547
case "watch":

‎packages/ui/src/components/composer/chat-composer.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ function useComposer({
10711071
return true;
10721072
}
10731073
}
1074-
return history.handleKey(v, e, m => updateMode(m || ms[0]!.id));
1074+
return history.handleKey(v, e, m => updateMode(m || ms[0]!.id), modeRef.current);
10751075
}
10761076

10771077
function update(v: EditorView) {
@@ -1717,7 +1717,8 @@ function ComposerButtons({ state }: { state: ComposerState }) {
17171717
let { terminal, sendable, send, tip, stop, onStop, exit, edit, cancel, accessory } = state;
17181718
return (
17191719
<Composer.End>
1720-
{accessory}
1720+
{/* Above the actions' hover halo, which reaches over it. */}
1721+
{accessory && <span className="relative z-10 flex">{accessory}</span>}
17211722
<TooltipProvider>
17221723
{terminal
17231724
? (

0 commit comments

Comments
 (0)