feat(suggest): on-demand next-prompt suggestion deck (orb → fan → stack)#950
Open
edwin-zvs wants to merge 12 commits into
Open
feat(suggest): on-demand next-prompt suggestion deck (orb → fan → stack)#950edwin-zvs wants to merge 12 commits into
edwin-zvs wants to merge 12 commits into
Conversation
Turn-end sessions can now deal a hand of generated next prompts on demand. A corner orb on the session view (C-x s or click) asks the daemon via the new session.suggest IPC; generation runs on the session's own harness — smith via a --suggest-mode one-shot, natively forking harnesses (claude/codex/opencode/grok/pi) via a hidden fork probe that reuses the provider prompt cache over the full history — and the clamped hand broadcasts as an ephemeral, never-persisted SessionEvent::Suggestions. The TUI renders it as a quarter-arc verb fan and per-verb card stack; accepting sends through session.input. Typing always wins: any printable key closes the overlay and takes its normal route.
…cle fan Clicks over the orb / open overlay were piped into mouse-grabbing child PTYs (claude fullscreen) before construct's hit-testing ran, so the orb never opened by mouse. The deck now gets a carve-out ahead of forward_mouse_to_child, like the session-title menu and URL clicks. The fan formula anchored chips on fixed rows and only bent a few columns, rendering as a near-vertical column hugging the right edge. Chips now sweep a real 15°–85° arc (aspect-corrected radii): the top pick sits left of the orb, the last verb above it, one chip per row, with a compact stair fallback for short panes.
Contributor
Author
|
Fixed two issues found trying it live on the TUI:
Updated fan (v2 video): |
The fan grows upward from the orb, so Up now walks up the arc (toward higher indices) and Down walks back toward the orb; the stack keeps list semantics. The orb sheds the reversed-block look: while generating it breathes through a diamond morph (◇◈◆✦) with creeping dots after a plain-language 'thinking', a dealt hand shows ✦ with the brief pulse, and the resting orb plays a short glint sweep every few seconds so it feels alive without being busy.
Resting it watches the session — (◕‿◕) suggest — blinking every few seconds and winking on every third cycle. While generating its moon-phase eyes spin (◐‿◐)(◓‿◓)(◑‿◑)(◒‿◒) with creeping dots, a dealt hand gets sparkle eyes (✦‿✦), and the open state smiles (^‿^) ✕.
Replaces the one-row glyph with a software-shaded sphere in the ASCII-shader style (luminance → char ramp): an 11×5-cell ball lit by an orbiting light with diffuse + specular shading on a phosphor gradient of the theme accent, specular bleaching toward white. Cells outside the silhouette stay untouched, so the sprite is transparent against the pane. The face composites on top as dark glyphs over the shaded cell color: blinks and winks at rest, moon-phase eyes spin while thinking (the light also orbits faster), sparkle eyes when a hand is dealt, happy eyes while open. Small panes keep the one-row kaomoji fallback; the fan/stack now anchor to the orb's bottom row so both orb forms share the same arc origin.
Contributor
Author
|
The orb is now a shaded ASCII ball with a face — software-rendered in the ASCII-shader style: per-cell diffuse + specular lighting from an orbiting light, luminance mapped onto a resting / thinking / fan open (v3 video): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What
An on-demand "suggestion deck" for any harness session (spec
0109): when a session is awaiting input, a corner orb appears on the session view. Click it (orC-x s) and the daemon generates a hand of suggested next prompts — one top pick plus 3–4 generated verb directions, each holding concrete prompt cards. The hand renders as a quarter-arc verb fan from the corner; picking a verb opens its card stack; accepting anything sends the text through the ordinarysession.inputpath.Design decisions (see
specs/0109-suggestion-deck.md)[suggest] enabled = falsedisables it entirely.--suggest-modeprocess one-shot (mirrors--title-mode). Natively-forking harnesses (claude / codex / opencode / grok / pi) generate through a hidden fork probe of the target session: the harness resumes its own native conversation, so the provider's prompt cache already covers the full history — the request is one appended message, and the model predicts from complete context instead of a rendered tail. Other harnesses get a fresh hidden probe fed a rendered transcript tail. Probes areSessionKind::UsageProbe(hidden) and deleted after use.SessionEvent::Suggestionsis broadcast-only, never persisted (same treatment asAgentStatus). Any new turn / user message / terminal state invalidates the hand, and a monotonic per-session generation counter discards stale in-flight results.SuggestionHand::parse_loose(protocol crate) does the loose-in/strict-out parse + clamping for every generator.Surface
SuggestionHand/Verb/Card,SessionEvent::Suggestions,session.suggestIPC, shared prompt + parserrequest_suggestions+ smith one-shot / fork-probe generation,[suggest]configC-x s, arrows, ⏎, ⌫, esc) + full mouse support,ToggleSuggestionskey action--suggest-modeDemo (real end-to-end: smith session → orb → fan → stack → send → new turn)
▶ demo video
Verb fan (labels fully generated from the session):

Card stack for the "recount" verb:

(Media is pinned at commit
679012b, removed from the branch tip in the next commit.)Testing
cargo test --workspace: green (1070 cli + daemon + e2e all pass)session.suggestacksstarted:true, hidden probe never appears inconstruct list, and a real smith session produced a structurally-valid hand (top + 4 verbs × 2 cards) that broadcast to a subscribed clientFollow-ups (not in this PR)
subscribe.events)cache_controlbreakpoints in the smith one-shot path🤖 Generated with Claude Code