Skip to content

HUD: markdown mode, --font-size and --file - #641

Merged
umputun merged 14 commits into
masterfrom
hud-markdown
Sep 23, 2026
Merged

umputun merged 14 commits into
masterfrom
hud-markdown

Conversation

@umputun

@umputun umputun commented Sep 23, 2026

Copy link
Copy Markdown
Owner

opt-in --markdown mode for session hud, plus --font-size and --file, so a controller agent can keep a multiline status panel in a HUD instead of the chat. Plain text remains the default, with its 256-character cap, and old clients and tree read-back keep working.

markdown mode

  • rendered through Foundation AttributedString(markdown:): headings, bold, italic, strikethrough, nested lists, code blocks, block quotes, rules, and GFM tables framed in box-drawing borders
  • the message cap goes from 256 to 4096 characters, with newlines and tabs allowed. The detail keeps the plain rules
  • text wraps at 60 columns, left-aligned as one block. A row too wide ends in …, and rows past the panel's height give way to a dim … N more, itself clipped in a narrow panel
  • a message that renders nothing visible is refused like an empty one
  • update must repeat --markdown, or the panel returns to plain text

font size and file

  • --font-size PT (6-72) on open sets the panel's own font size. Omitted, the panel uses the session's size at open. It stays fixed for the panel's life, and update rejects it
  • the panel re-measures itself on a window resize or divider drag, and keeps its font size across config reloads
  • --file FILE reads the message from a UTF-8 file, once per command

control API

  • the tree's hud node reads back markdown, and fontSize when one was requested. An inherited size is omitted. Both carry to a mirrored HUD

…les, refuse empty markdown

- restore a HUD's creation font size after every per-surface config rebuild and global reload
- draw markdown tables with full box borders and a header rule
- size a thematic break to the widest row, at least three glyphs after a container prefix
- refuse a markdown message that renders nothing visible
- normalize CRLF line endings from --file
Copilot AI lite review requested due to automatic review settings September 23, 2026 02:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit 8e710a6 into master Sep 23, 2026
8 checks passed
@umputun
umputun deleted the hud-markdown branch September 23, 2026 02:54
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.

2 participants