Skip to content

[FEATURE]: Plugin API to format delimited blocks in message text #55440

Open

Description

@Nowaker

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Tools and plugins that send prompts on a user's behalf often wrap machine metadata in a delimited block at the top of the message, for example:

[vibeterm_metadata]
call: vibeterm_spawn_session
process_id: 2597181
sent_at: 2026-10-14T13:04:13.949Z
[/vibeterm_metadata]

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.

Activity

  1. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    Contributor

    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.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions