Builtin Library
README.md
show.text
Show the user text you produced — a write-up, a plan, code, a JSON value —
in the editor, in a new, closable panel beside whatever they have open,
where they can read, review and edit it. format is the file extension that
picks the viewer: md renders markdown, json pretty-prints, luau /
yaml / wgsl highlight, txt is plain. A table is pretty-printed as
JSON. The text is written to a scratch file under /zero/source/tmp/show/
(never saved or synced); the panel is editable, so read path back to see
what the user changed.
show.text { content = "# Plan", format = "md", title = "Plan" }
Returns { panel, path, mode, title, formatted? }.