You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Plugin API to format delimited blocks in message text #55440
In the transcript that is plain text indistinguishable from what the person typed, and a markdown pass makes it worse ([name] reads as a link reference).
Proposal: let a TUI plugin, or tui.json, register a formatter for a delimited block in message text: an opening line, a closing line, and a format. yaml would color key: value lines (keys, values by type, delimiter lines muted); any other value would be a language id colored by its grammar. A * in the opening line would match a run of non-space characters and stand for the same name in the closing line, so one rule covers [tool_*] ... [/tool_*]. Only colors change; the text reads and wraps as written. For example a plugin API api.blocks.register({ open, close, format }) next to api.slots, and syntax.blocks in tui.json.
This is AI generated, but under direct supervision and on request of @Nowaker.
Thanks for the detailed proposal! You're asking for a way, through a TUI plugin API or a tui.json setting, to register formatters for delimited blocks in message text (for example [tool_*] … [/tool_*]). The formatter would only change colors, using either YAML-style key/value coloring or a language grammar, so machine metadata stands out from what the person typed.
This can't be built as a plugin right now. The TUI plugin API can register routes, slots and markdown code-block renderers. But user message text is drawn as plain text, and no hook lets a plugin style part of a message, so I've noted that gap for the maintainers. They will consider the request.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the detailed proposal! You're asking for a way, through a TUI plugin API or a
tui.jsonsetting, to register formatters for delimited blocks in message text (for example[tool_*]…[/tool_*]). The formatter would only change colors, using either YAML-style key/value coloring or a language grammar, so machine metadata stands out from what the person typed.This can't be built as a plugin right now. The TUI plugin API can register routes, slots and markdown code-block renderers. But user message text is drawn as plain text, and no hook lets a plugin style part of a message, so I've noted that gap for the maintainers. They will consider the request.
Related issues:
docs(forklog): record markdown in user messages and message blocks