Commit Graph
1632 Commits
Author SHA1 Message Date
l0ng-ai b7c068ed7e fix(terminal): read Claude's custom commands through Host
The scan reached std::fs directly, which the host-boundary check rejects;
it now walks the pane's host, joining and canonicalizing through it, and its
test covers a link back up the commands tree.
2026-10-01 22:38:08 +08:00
l0ng-ai faca75dfbb refactor: carry a session's source on AgentEvent and tidy the review fixes
The Codex router reads source off the parsed event instead of parsing the
hook body again. The command scan reads each real directory once rather than
capping depth, labels capitalise through one helper (alias_label no longer
slices bytes), the live input rows are set where Covering is decided, and
the transcript is opened once per poll.
2026-10-01 22:28:01 +08:00
l0ng-ai da0add62e2 fix(core): route Codex reports past /new and codex -C, trust agent_settled only once seen
A session /new started goes to the Codex pane that had one; a report from
a directory no pane runs Codex in is matched among every Codex pane instead
of falling back to the app-server's. The Pi bridge no longer reads a
returned function from on() as proof agent_settled will come, and the Stop
hook re-reads the transcript only once it has grown.
2026-10-01 15:56:02 +08:00
l0ng-ai cd4ff91747 fix(terminal): keep the composer's reserved rows, pastes and screen scans in line with the box
Scrolling back no longer resizes the pane, outside pastes land in the box
when it covers the input, the screen is scanned only while the box is open,
the command scan stops 8 directories deep, effort labels capitalise by
character, and two doc comments sit on their own items again.
2026-10-01 15:56:01 +08:00
l0ng-ai ef14207145 fix(terminal): a screenshot pasted into the composer becomes an attachment 2026-10-01 15:28:01 +08:00
l0ng-ai 5fb15da5ef style(core): settle the clippy warnings the interrupt-key reader brought in
`is_interrupt_key` is only asked by the tests since the Grok Build change
went through `interrupts`, and two `let … else { return None }` read the
kitty-protocol key; the first is test-only now and the other two use `?`.
2026-10-01 15:28:01 +08:00
l0ng-ai 67356d0057 fix(terminal): cover Gemini's mode line and shortcuts hint along with its input
Gemini CLI 0.62 draws a mode line ("Shift+Tab to accept edits", "shell
mode enabled") over its input, with a rule of its own over it and the
`? for shortcuts` hint above that. The box covered the input from its
shaded block (or the rule right over its prompt) down, so the hint, the
rule and the mode line were left standing over the box.

The box now covers from the rule over that mode line, and from the hint
when it is there — the way it already does for Qoder, which draws the
same block; the two share the lookup. An input without a mode line over
it is covered from its own top as before.
2026-10-01 15:28:01 +08:00
l0ng-ai eb5e2ba83b fix(terminal): pick OpenCode's mentions from its own @ list so the files are attached
OpenCode attaches a file to a message only when it was picked from its
own `@` list (or handed over by an editor); the text of a mention is just
words to it. `@my notes.md` from the box, and `@plain.md` as well, reached
the model as text, which went looking for the file with its tools — and
the one with a space it had to find by globbing.

A message for OpenCode in a local pane is now cut at its `@` mentions of
paths that exist under the pane's directory (the longest run of up to four
words that names one), and each is sent the way a pick is made: a typed
`@`, the path pasted as the query with its spaces left out (a space would
close the list), and Enter once the list has had time to search. OpenCode
then shows `File  my notes.md` under the message. A space typed after it
closes a list that found nothing, so the Enter that sends is not taken by
it. An `@` that names nothing, commands and shell lines go as before.
2026-10-01 15:28:01 +08:00
l0ng-ai 9ca384c03c fix(terminal): lay the composer over Qoder's own input and speak to it the way Gemini is spoken to
Qoder (both the global and the CN build) docked the box under its pane,
its own input left standing above it: two inputs.

- Its input sits between the last two full-width rules, opening with
  ` > ` (` * ` in YOLO mode, ` ! ` in shell mode), with only its model line
  under the lower rule. Over the upper rule its mode line has a rule of its
  own, with the `? for shortcuts` hint above it; the box covers those too.
  Its `/` and `@` lists open under the lower rule with the selected row
  opening with `❯`, and its trust and sign-in prompts, `/model` and `/help`
  open under a single rule with no prompt; the box steps aside for them.
- It is a Gemini CLI fork and kept that input: keys in a burst are read
  against the input before the burst (`echo hi` typed came out
  `echo hiecho hi`), a typed leading `?` opens its shortcuts, the Enter
  right behind a paste is a newline, its `@` list takes an Enter that comes
  right after a mention, and its list spells a path with a space
  `@my\ notes.md`. It now gets Gemini's handling of all of these.
- Like Qwen Code it stays in shell mode after a `!` command; a plain
  message leaves it with Esc first. Text left in its input is cleared with
  Ctrl+U and Backspace. Its `/` menu offers its current commands.
2026-10-01 15:28:01 +08:00
l0ng-ai 63d90f1070 fix(terminal): paint the layer under the covering composer in the agent's own background
The layer laid over an agent's input was painted in the theme's
background. Grok Build, OpenCode and other agents that paint the screen
in a colour of their own were left with a strip of the theme's colour
around the box — a light band under Grok Build's dark screen.

The layer now takes the colour the agent paints the row over its input
in (the one most of its cells have), over the grid's columns only; the
pane's padding around them keeps the theme's. An agent that leaves the
terminal's own background, as Claude Code, Codex, Kimi Code and Copilot
do, keeps the layer as it was.

The box's own fill was a faint tint of the text colour, which showed
whatever was under it: on Grok Build's dark layer the box went dark and
its text could not be read. It is now that tint laid over the theme's
background, the same colour as before on the theme's own background.
2026-10-01 15:28:01 +08:00
l0ng-ai 23c205435d fix(terminal): take Qwen Code and CodeBuddy out of shell mode before a plain message
A `!` message is a shell command to Qwen Code and CodeBuddy, and both stay
in their shell mode after it has run, their prompt a `!`, until Esc takes
them out. The next message from the box ran as a command too
(`bash: ?: command not found`), and a second `!` message toggled the mode
off and went to the model.

With the box over the input, the prompt says which mode it is in: a plain
message now leaves shell mode with Esc first, and a `!` message sent in
it drops the `!` that would toggle it off. CodeBuddy's `!` prompt counts
as its input, so the box no longer steps aside for it.
2026-10-01 15:28:01 +08:00
l0ng-ai 0aa5e1fed5 fix(terminal): lay the composer over Copilot's, Qwen Code's, CodeBuddy's, Kimi Code's and OpenCode's own input
The box docked under these agents' panes, so their own inputs stayed on
screen above it: two inputs. They now get the covering box too.

- Copilot, Qwen Code and CodeBuddy rule their input off top and bottom,
  the prompt (`❯`; `>`, `*` or `!`; `>`) on the line right under the upper
  rule and the status rows under the lower one. Their approvals and
  pickers come framed or between rules of their own with the question on
  the first line, and their `/` and `@` lists open under the lower rule or,
  Copilot's, right over the upper one; the box steps aside for them. Qwen
  Code is drawn as Gemini's ruled input once was, but Gemini's looser test
  takes the `> model` row of Qwen Code's own `/` list for the prompt, so
  it gets the stricter one.
- With true colour Copilot shades its input instead — a `╻▄▄▄` and a
  `╹▀▀▀` edge around lines on a `┃` bar — and draws its lists shaded over
  it, the selected row opening with `❯ /`; a sent message has the time at
  its end.
- Kimi Code frames its input over its model line and context gauge. Its
  lists open under the frame, its approvals take the frame's place, and
  its welcome banner is a frame far up the screen.
- OpenCode draws its input on a bar closed by a `╹▀▀▀` edge over its key
  hints, in the middle of its home screen and at the bottom of a session.
  Its lists open on the same bar, each row closed by a `┃` at its right,
  and a permission request takes the input's place with no edge.

Text typed into one of these inputs before the box was laid over it is
emptied first, a line at a time with Ctrl+U and Backspace, placeholders
and offered suggestions not counted. CodeBuddy takes keys that arrive
together for a paste and does none of them, so it is sent them one at a
time.
2026-10-01 15:28:01 +08:00
l0ng-ai 8479386892 test(core): keep the closed-terminal write test from racing other tests' children
`a_terminal_with_its_other_end_gone_fails_the_write_at_once` failed about
one run in three alongside the other hook tests (never on its own): its
pty came from `openpty`, whose descriptors are inherited, and the Qoder,
CodeBuddy and Crush config tests spawn children on threads of their own.
A child that took a copy of the pane's end kept it open after the test
closed it, and the write went through.

Open both ends close-on-exec from the start, and since a child forked a
moment earlier still holds a copy until it gets to exec, retry a write
that went through after a short pause; every attempt must still return
within the timeout, which is what the test is for. 50 runs of the hook
tests in parallel now pass, where 13 of 40 failed before.
2026-10-01 15:28:01 +08:00
l0ng-ai 52727a448b fix(terminal): lay the composer over Crush's, Goose's and Amp's own input
The box docked under these agents' panes, so their own inputs stayed on
screen above it: two inputs. They now get the covering box too.

- Crush's editor opens on its `> ` prompt (`!` in yolo mode, `:::` while
  the chat has the keys) with each further line on `:::`, over a blank row
  and its key help. Its dialogs — the command palette, the model and
  session lists, a permission request — are framed over the screen with the
  editor left standing under them, and take the keys, so with a frame on
  screen the box steps aside.
- Goose prints its `> ` prompt under its context gauge, as the last thing
  on the screen, wherever its output ended. A turn's spinner and output,
  and a tool approval, are printed under the line sent, and the box steps
  aside for them until the next gauge and prompt. Its input is two rows
  where the box is about five, so the grid gives up the rest, as it does
  for Oh My Pi.
- Amp frames its input at the bottom of the screen, its mode in the top
  edge and the directory in the bottom one. Its palette and file list open
  framed and indented over the screen, and a notice in the input's place
  (out of credits) is a frame with nothing in its bottom edge; the box
  steps aside for both.

Text typed into one of these inputs before the box was opened over it
stays there, unseen, and the next message would run on after it. With
text left there the box now empties it first, a line at a time with
Ctrl+U and Backspace, as it empties Grok Build's with Ctrl+U.
2026-10-01 15:28:01 +08:00
l0ng-ai 6a86c6398a fix(terminal): stop a Crush turn with the two Escs it asks for
Crush takes a first Esc during a turn as a question — "esc press again to
cancel", in its key help — and stops only on a second one. Over its input
the box's Esc sent one, the question sat in the help under the box where
nobody read it, and the turn ran on. For Crush the box now sends both,
as separate writes: in one read the two are a single key to it.
2026-10-01 15:28:01 +08:00
l0ng-ai b7169bc4e1 fix(terminal): offer Goose's commands in the composer's menu
Goose takes typed slash commands — /model, /mode, /compact, /clear and
the rest of what its /help lists — but the box's `/` menu was empty for
it. It now lists them, as Goose 1.52 names them.
2026-10-01 15:28:01 +08:00
l0ng-ai 8a7fd8e04a fix(terminal): take only a hook's word that the agent is asking
The box stands aside and sends nothing while the pane's agent is waiting,
since whatever it sent would answer the question on screen. For an agent
without hooks — Amp, or Crush before its first tool — the pane is marked
waiting by any desktop notification, "Agent is ready" at the end of a turn
among them, and it stays marked. From the first finished turn on the box
stood aside for good, and messages went into the agent's own input
instead.

Waiting now holds the box back only when hooks reported it. Those agents'
own dialogs take their input's place on screen, and the box steps aside
for them off the screen as for any other.
2026-10-01 15:28:01 +08:00
l0ng-ai fde8a6304e fix(core): don't start a turn from a notification's waiting status
Before an agent's first hook, a desktop notification marks its pane
waiting. Crush raises one after every turn ("Agent's turn completed"), and
its only hook, PreToolUse, is reported as a finished tool, which moves a
waiting pane back to working: from the first tool of a session on, the
pane read as working for good, as Crush has no Stop to end it.

A status set by a notification now gives way to idle when the first hook
report arrives, so the report only records the session and its activity.
2026-10-01 15:28:01 +08:00
l0ng-ai cc44269ec6 fix(terminal): stop a Grok Build turn with its own interrupt key
Esc in the box covering an agent's input is that agent's Esc, the key
that stops a turn. Grok Build's Esc leaves a running turn running — its
stop key is Ctrl+C — and the daemon, reading any Esc during a turn as
an interrupt, then called the pane done while Grok still worked. The
box now sends Grok Build Ctrl+C, and the daemon no longer counts an Esc
as stopping a Grok Build turn.
2026-10-01 15:28:01 +08:00
l0ng-ai 8228503bb2 fix(terminal): send Oh My Pi, Grok Build and Prime Agent messages that end in a mention
Oh My Pi's and Grok Build's `@` lists open on a mention at the caret and
take the Enter that follows, so a message whose attachments or mention
closed it sat in their input, under the box, unsent. Like Gemini's and
Copilot's, their messages with an `@` now go with a space after them.

Prime Agent's list opens as a typed mention is typed and stays open past
the space after it: "read @a.txt " went out as "read @a.txt .git/". A
paste it reads whole, `!` and `/` included, so its messages are pasted.
2026-10-01 15:28:01 +08:00
l0ng-ai cbe35925c0 fix(terminal): spell mentions the way Pi and its forks read them
Pi, Oh My Pi and Prime Agent end a bare `@` mention at the first space,
and their own `@` lists put a path with one in double quotes,
`@"my notes.md"`; the composer put it in bare, so the mention named a
file that does not exist. Grok Build's list puts the path in as it is,
which the composer already did.

Oh My Pi reads a mentioned file — an image included — into the turn
itself, where a path in the message is just words for the model to go
and read, so its attachments now go as mentions.
2026-10-01 15:28:01 +08:00
l0ng-ai 719ac74b08 fix(terminal): lay the composer over Grok Build's own input
The box docked under Grok Build's pane, so its own framed input stayed on
screen above the box. Grok Build now gets the covering box too: its input
is the rounded frame whose first line opens with `❯`, with the key hints
under it. Its `/` and `/model` lists open over the frame between two
rules, and its dialogs are drawn across the frame's top edge; the box
steps aside for both, since they take the keys the box would send.

Grok Build keeps a command whose list was dismissed in its input, where
under the box nobody sees it and the next message was typed on after it:
`/modelReply …`. With text left there, the box now clears it with Ctrl+U
before sending.
2026-10-01 15:28:01 +08:00
l0ng-ai 35854a9edc fix(terminal): lay the composer over Prime Agent's own input
The box docked under Prime Agent's pane, so its own shaded input block
stayed on screen above the box. Prime Agent now gets the covering box
too: its input is a blank row, the ` >` prompt line with any further
lines indented under it, and another blank row, right over the footer
that ends the screen. The model picker draws its own ` >` search line
between rules, away from the footer, so the box steps aside for it.

The block and footer are a row shorter than the box, which cut the hint
line above it in half; the grid makes room for that row as it does for
Oh My Pi.
2026-10-01 15:28:01 +08:00
l0ng-ai 475dc5d874 fix(terminal): lay the composer over Oh My Pi's own input
The box docked under Oh My Pi's pane, so its own input stayed on screen
above the box. Oh My Pi now gets the covering box too. In its default
status-band shape, and in the rounded box, the input's first line opens
with `╰─ ` under the status line, and the box covers from that line
down; a dialog frame closes with `╰──…╯` and a tool approval or picker
takes the input's place, so the box steps aside for those. Its Pi and
Claude Code shapes are ruled like Pi's input and found the same way.

That input is two rows, where the box is about five, so laid over it the
box hid the last lines of the reply. For Oh My Pi the grid now gives up
the rows the box needs beyond the input, measured off the box as drawn
empty, and the agent draws its input that much higher.
2026-10-01 15:28:01 +08:00
l0ng-ai ce8d2fbe70 fix(terminal): offer Pi's, Oh My Pi's, Prime Agent's and Grok Build's commands
All four take typed slash commands, but the composer knew none of them:
`/` opened no menu and the placeholder offered only `@` files. List each
one's everyday commands as its installed version names them — Pi 0.99,
Oh My Pi 18.4 (`/exit`, `/retry`, `/todo`), Prime Agent 0.9 (`/effort`
rather than Pi's `/thinking`) and Grok Build 1.0 (`/mcps`, `/recap`).
2026-10-01 15:28:01 +08:00
l0ng-ai 18bb92c1ae fix(terminal): lay the composer over Pi's own input
The box docked under Pi's pane, so Pi's own ruled editor and its status
rows stayed on screen above it: two inputs. Pi now gets the covering box
Claude, Codex and Gemini have. Its editor is the lowest pair of
full-width rules — the upper one carries the spinner while a turn runs —
with the directory and usage rows under it, and the box covers from the
upper rule down. Pi's selectors take the editor's place between the same
rules but open on a blank row (or, for /settings, on a `>` search line)
and run on for several, so the box steps aside for them and comes back
once they close.
2026-10-01 15:28:01 +08:00
l0ng-ai 6be9dc9d5c fix(core): take Prime Agent's hook reports from its background daemon
Prime Agent runs each session in a detached daemon, started by the first
session and outliving it, and the daemon runs tty7's bridge there with
the environment of the TUI that asked for the session. The report names
the right pane, but its process never runs under that pane's shell, so
the daemon turned every one away and a Prime Agent pane never left idle.

A report about Prime Agent is now taken by the pane it names when that
pane is running Prime Agent.
2026-10-01 15:28:01 +08:00
l0ng-ai 8db82ab48d fix(core): keep Pi and Oh My Pi panes working through retries and approvals
agent_end closes every attempt, so a run Pi retries after a provider
error read as done while it was still retrying. The bridge now takes
Pi's agent_settled as the end of a run when the build sends it, and
Oh My Pi's auto_retry_start puts the pane back to working.

Oh My Pi asks before running a tool through tool_approval_requested and
tool_approval_resolved, not Pi's UI-prompt pair, so its pane said
working while the approval dialog waited. Those now report waiting and
restore the turn.
2026-10-01 15:28:01 +08:00
l0ng-ai d62c289377 fix(core): import Pi's extension types from its current package
Pi moved from @mariozechner/pi-coding-agent to
@earendil-works/pi-coding-agent. Current Pi resolves both names for
extensions, and the bridge's import is type-only, so it is erased before
an older Pi that knows only the old name loads it. A bridge already
written with the old name reads as stale and launch's refresh rewrites it.
2026-10-01 15:28:01 +08:00
l0ng-ai 7a06d56786 fix(terminal): hand Copilot and CodeBuddy their attachments as mentions
Copilot and CodeBuddy attach a file only from an `@` mention, and a path
after the message's text is just words to them: an attached image reached
neither model, which had to go and read it with a tool, behind a prompt.
Send each attachment as an `@` mention instead, which both attach to the
turn, an image as an image. Neither reads a mention back past a space, so
a path with one still goes as quoted words.
2026-10-01 15:28:01 +08:00
l0ng-ai f155fa59de fix(terminal): offer Copilot's, Qwen Code's, CodeBuddy's and Kimi Code's commands
All four take typed slash commands, but the composer knew none of them: `/`
opened no menu and the placeholder offered only `@` files. List each one's
everyday commands as its installed version names them: Copilot CLI 1.0,
Qwen Code 0.24, CodeBuddy Code 2.161 and Kimi Code 2.1, which has `/new`
rather than `/clear` and `/permission` in the singular.
2026-10-01 15:28:01 +08:00
l0ng-ai 8ca1d57a7f fix(terminal): spell a mention with a space the way Kimi Code does
Kimi Code's own `@` list puts in a path with a space as `@"my notes.md"`,
the way Claude Code spells it. The composer's menu put in `@my notes.md`,
which Kimi reads as a mention of `my` followed by a word.
2026-10-01 15:28:01 +08:00
l0ng-ai e90ed33c0d fix(terminal): paste messages to Kimi Code so they are sent
Kimi Code takes keys arriving faster than anyone types for an unbracketed
paste, and the Enter right behind a typed line for one of its newlines: a
one-line message from the composer sat in Kimi's input with an empty line
under it, never sent. Paste every message instead. Kimi knows a bracketed
paste for one, sends on the Enter after it at once, and still reads a
pasted leading `!`, `?` or `/` as typed.
2026-10-01 15:28:01 +08:00
l0ng-ai aae6b12196 fix(terminal): hand CodeBuddy a leading ! as a key of its own
CodeBuddy switches into bash mode only on a `!` typed into its empty input
by itself, as Claude Code does. Arriving in one burst with the rest of the
line it is just a character, so "!git status" went to the model as a
request to run the command, behind a permission prompt.
2026-10-01 15:28:01 +08:00
l0ng-ai 7e616cbf60 fix(terminal): leave Copilot's file list behind before pressing Enter
With the caret at the end of an `@` word Copilot lists matching files, and
Enter takes the list's pick instead of sending, so a message that closed on
a mention (one picked from the composer's own `@` menu ends that way) sat in
Copilot's input unsent. End such a message with a space, as for Gemini.
2026-10-01 15:28:01 +08:00
l0ng-ai f04c3e1ae7 fix(terminal): speak to Qwen Code the way Gemini is spoken to
Qwen Code is a fork of Gemini CLI and kept its input, but the composer
treated it as an agent with none of Gemini's traps:

- a typed leading `?` opened its shortcuts and was lost;
- a message closing on an `@` mention sat in the input, its Enter taken
  by the file list;
- a mention or attachment with a space in its path went out as words it
  cannot read back.

Give it Gemini's handling: pasted, with the shell-mode `!` as a key of its
own, a space after a closing mention, the longer wait before Enter, and
attachments and `@` picks spelled with Gemini's escaping, plus the comma
Qwen escapes too.
2026-10-01 15:28:01 +08:00
l0ng-ai c4d73b4bc2 fix(terminal): paste messages to Copilot instead of typing them
Typed into Copilot's empty input, a leading `?` is the key that opens its
help: "?why" went out as "why". Paste every message, as for Codex and
Gemini. Copilot still reads a pasted leading `!` as its shell mode, and
already got the longer wait before Enter that a paste needs.
2026-10-01 15:28:00 +08:00
l0ng-ai 8597112fe1 fix(core): don't let a hook wait on a terminal whose pane has gone
An agent's session-end hook that falls back to the tty after its pane
closed opened the terminal device blocking. With the pty's other end gone
that open waits for a carrier that never comes, and on macOS it waits
holding the lock every lookup under /dev needs: the hook never exits, the
agent cannot finish exiting, and every new shell, ps and tty on the machine
hangs behind them until the hook is killed.

Open the device without waiting, then switch it back to blocking writes so
a busy terminal still gets the whole sequence; a terminal with no other end
fails the write at once.
2026-10-01 15:28:00 +08:00
l0ng-ai 868388a315 fix(terminal): don't answer pixel-size queries from a replayed pane
A reattach replays the pane's ring through the grid with query replies
muted, but the mute list missed `TextAreaSizeRequest`: alacritty hands
`CSI 14t` to the listener as its own event (the view owns the pixel
size) rather than as a `PtyWrite`. Every `CSI 14t` a TUI had sent was
answered again on each app restart, and the `CSI 4;h;w t` replies landed
on whatever reads the pane now — at a shell prompt, after the TUI that
asked had quit, zsh printed them as `;840;873t;840;873t...`.

Mute it with the other replies; live queries are still answered.
2026-10-01 15:28:00 +08:00
l0ng-ai a9d1e6442f fix(terminal): hand OpenCode and Amp their attachments as pastes of their own
Both attach an image only from a paste that is nothing but its path; a
path after the message's text stays words, so an image attached in the
composer never reached the model. They now get the text, then each path
as a paste by itself after a typed space, and Enter once the last one has
had time to land. OpenCode shows the file as a part of the message and
Amp lists it under Images, as a drop onto their own input would.
2026-10-01 15:28:00 +08:00
l0ng-ai f9b21d730c fix(terminal): offer OpenCode's commands in the composer's menu
OpenCode takes slash commands typed at its input, pasted ones included,
but the composer's `/` menu listed none for it and its placeholder left
out the commands hint. List the ones its own menu opens with, in its
words. Amp keeps an empty list: its `/` opens a command palette that a
message cannot drive.
2026-10-01 15:28:00 +08:00
l0ng-ai f822b29a86 fix(terminal): stand the docked composer as far in from the bottom as from the sides
Docked under the grid, the box sits inside the pane's padding, and only
the side inset took it off: the box stood 20px up from the pane's bottom
and 16px in from its sides, where it covers an agent's input 16px from
all three.
2026-10-01 15:28:00 +08:00
l0ng-ai ece189b344 fix(terminal): paste messages to OpenCode and Amp instead of typing them
OpenCode reads a burst of typed keys against the input as it was before
the burst, the way Gemini does: the `!` in "PONG! ok" switched it into
shell mode and the rest of the line ran as a shell command. Amp takes a
typed leading `?` for its shortcuts key and drops it, and a typed
leading `/` opens its command palette while the rest of the burst lands
in the input underneath, so Enter ran whatever the palette listed first.

Both now get every message as one bracketed paste, which each reads
intact and sends on the Enter that follows. A leading `!` still reaches
OpenCode as a key of its own, the only way it switches into shell mode;
Amp reads its `$` shell prefix off a paste.
2026-10-01 15:28:00 +08:00
l0ng-ai 2f4d9820ff fix(core): show no effort level for a Claude model that takes none
A new Claude session names its model but not its effort level, so the
hook fell back to the settings' level - and a session started on Haiku
showed "High" until its first turn ended. The hook now checks Claude
Code's own model catalog (its cache, read only) first: a model it lists
without effort options is reported with an empty level. A model it does
not list, or no catalog at all, falls back to the settings as before.
2026-10-01 15:28:00 +08:00
l0ng-ai 15bcf292b2 fix(core): name tty7's Gemini hooks so Gemini shows "tty7" while they run
While a hook runs Gemini CLI shows "Executing Hook: <name>" above its
input, and a hook without a name is shown by its whole command - the
quoted path of the tty7 binary and its arguments. tty7's Gemini entries
now carry "name": "tty7".

An install from before reads as outdated - its hooks' names are checked
along with their commands - so the launch-time refresh and the settings
page's Update rewrite it in place, one entry per event as before. Other
agents' entries get no name and are judged as before.
2026-10-01 15:28:00 +08:00
l0ng-ai a6ddca66e2 fix(terminal): spell a mention with a space the way Claude and Codex read it
A file picked from the composer's @ menu went in raw for Claude Code and
Codex, so "my notes.md" came out as "@my notes.md":

- Claude Code ends a bare mention at the first whitespace, so it looked
  for "my" and the file never reached the turn. A path with a space now
  goes in double quotes, @"my notes.md", the form Claude's own list puts
  in and its parser reads back as one file.
- Codex hands mentions to the model as plain text, and its own list puts
  in the path alone: without the @, in double quotes when it has a space
  in it. The composer now does the same.

Checked for real: Claude 2.1.286 with no tools answers from @"my notes.md"
and not from @my notes.md or @my\ notes.md; Codex 0.158's list inserts
"my notes.md". Attachments are unchanged; both agents read one with a
space in its path.
2026-10-01 15:28:00 +08:00
l0ng-ai a4cf59923b fix(terminal): paste messages to Gemini instead of typing them
Gemini CLI judges each key of a typed burst against its input as it was
before the burst, so to it the input is still empty at every key. A "?"
anywhere in a typed line is taken for the key that opens its shortcuts
on an empty input and dropped ("what? yes" arrived as "what yes"), and a
"!" for the one that switches it into shell mode, which also clears what
came before it: "hi! there" became a shell command " there", one Enter
away from running.

Gemini now gets every message as a bracketed paste, like Codex, with a
leading "!" still sent as a key of its own - as for Claude Code - so a
message that starts with one keeps opening shell mode.
2026-10-01 15:28:00 +08:00
l0ng-ai 46272fc6d4 fix(terminal): offer Gemini's current commands in the composer's menu
Gemini CLI now names its session browser /resume, with /chat kept as an
alias, and /clear starts a new session rather than only clearing the
screen. Offer /resume under its own name, say what /clear does now, and
add /model and /init, which the menu left out.
2026-10-01 15:28:00 +08:00
l0ng-ai 775baf246e fix(terminal): hand Gemini its attachments and mentions so it reads them
Three things kept files from reaching a Gemini turn from the composer:

- Attachments went after the text as shell words. Gemini turns a drop
  into @ mentions itself, but only a paste that is nothing but paths;
  after the message's text a path is just words, and the model never saw
  the file. Gemini now gets its attachments as the mentions it would have
  made.
- A mention picked from the @ menu was spelled raw. Gemini ends a mention
  at the first unescaped space, so "my notes.txt" became "@my". Mentions
  for Gemini are escaped the way its own escapePath does it.
- With the caret at the end of an @ word Gemini lists matching files, and
  Enter takes the list's pick instead of sending, so a message closed by
  a mention - every message with an attachment - sat in the input under
  the box, unsent. A message with a mention now ends in a space, which
  closes the list; slash commands are left alone.
2026-10-01 15:28:00 +08:00
l0ng-ai 9f9ced6411 fix(terminal): give Gemini time to read a paste before pressing Enter
Gemini CLI takes an Enter that comes within 40ms of a bracketed paste as
a line break. It starts that window once it has read the whole paste, so
the 50ms the composer left between the paste and the Enter was not
enough for a long message: a 41-line message sat in Gemini's input as
"[Pasted Text: 41 lines]" plus an empty line, hidden under the box, and
was never sent. Gemini now waits as long after a paste as Copilot does;
a 400-line, 32KB message goes through whole and is submitted once.
2026-10-01 15:28:00 +08:00