Skip to content

feat(mod): keep the mod's messages in a /quantext pane - #24

Open
maxsoldev wants to merge 1 commit into
mainfrom
feat-messages-pane
Open

maxsoldev wants to merge 1 commit into
mainfrom
feat-messages-pane

Conversation

@maxsoldev

Copy link
Copy Markdown
Owner

Summary

A toast lasts a few seconds. Every toast of the mod is now also kept, and bare /quantext shows them in a pane.

 nudges (turn.step, session.measure) · /clear-tools notes · /quantext view steps
-  $.ui.toast(text)
+  say($, text)                          # packages/mod/src/messages.ts
+    $.ui.toast(text)                    # as before
+    $.state quantext.messages           # newest 50, newest first; unread += 1 unless the pane is shown
 /quantext view                          → the viewer, as before
-/quantext                               → "Usage: /quantext view"
+/quantext                               → opens or closes the "Quantext" pane (unread → 0)
 footer
-  qx $3.42 · ctx 182k · cache 96%
+  qx $3.42 · ctx 182k · cache 96% · 2 new
┌ Quantext ───────────────────────────────┐
│ 14:32 cache lost after 3 min, with no   │
│       compaction or model switch: …     │
│ 14:05 Cleared 41 tool outputs, kept 5   │
└─────────────────────────────────────────┘
  • Dock (beside the transcript): all 50; the engine scrolls. Inline (above the prompt, the frame grows with its rows): the newest 5.
  • Opened only when asked: a pane opened unasked is drawn from 144 columns and pushes the chat aside.
  • The list stays after /clear.

Evidence

  • test/messages.test.ts, 9 tests: a nudge is a toast and stays in the pane; newest first with its time; keeps 50; inline shows 5; empty pane says so; /quantext opens then closes; footer counts 2 new, /quantext resets it, a message while the pane is shown is not new; kept after /clear; usage text.
  • 3 footer tests now expect · 1 new: each one shows the large-context nudge while the pane is closed.
  • claude plugin test packages/mod: 66 pass. claude plugin validate: passes. pnpm check green.

Merge Danger

Door: two-way

The new $.state value has its own shape tag (messages-1); revert leaves it unread.

Blast Radius: mod UI

Not yet seen in a live terminal session, only through the test kit. The footer label gains · N new. feat commit: merging opens a 0.2.0 release PR.

A toast lasts a few seconds, and a nudge such as "cache lost ...
this call re-wrote 180k tokens" is worth reading later. Every toast
of the mod now goes through say() in messages.ts: it is still a
toast, and the newest 50 of the session are kept in $.state.

Bare /quantext opens or closes a pane with them, newest first, each
with its time. Inline above the prompt, where the frame grows with
its rows, it shows the newest 5. While the pane is closed the status
line counts the new ones ("· 2 new"); opening the pane resets it.
The list stays after /clear: the nudge from just before a /clear is
often the one to read again.

The pane opens only when asked: one opened unasked is drawn only from
144 columns and would push the chat aside.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant