Skip to content

Opencode Message

A line of an opencode-like conversation: your words on a tinted row with an accent rail, the agent's answer set in to match.

On this page

Examples

The shared grammar with the look fixed: the same as <CliMessage preset="opencode-like" />, so it reads as the opencode-like look on its own or inside a session. Every part in all eight looks is on Agent CLI.

Installation

npx knowns-ui@latest add agent-cli-opencode
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

role
"user" | "agent" | "note"
Who says it.
text
string
The words. Backticks in agent text mark code.
streaming
boolean
Defaultfalse
A caret at the end while it streams.
tone
"muted" | "warn"
Default"muted"
A note's colour.

When to use

When to use

  • Quoting a prompt and its answer the way the opencode-like look prints them.

When not to use

  • A chat thread in your own app's style: use Agent CLI.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Opencode Message to my app and wire it to my own data.
  • I need quoting a prompt and its answer the way the opencode-like look prints them. Set that up with the Knowns UI Opencode Message.
  • Which Opencode Message props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "opencode-message" }) and search_docs({ query: "opencode message" }).

Need help?

Stuck on Opencode Message, or found something off? We read every message.