Skip to content

feat(web): visually distinguish the user's own sent messages in the session terminal (per-role message color) #2996

Description

@cuprecupre

Summary

Add an opt-in way for Agent Orchestrator to visually distinguish the messages the user sends from the agent's output inside the session terminal — e.g. render my own turns in a distinct foreground color — independent of the underlying agent CLI's theme.

Motivation / problem

When following a long session in the AO terminal pane, there is no visual boundary between what I typed and what the agent produced. Both render with the same styling, so scanning back through a conversation to find "where did I ask X" is slow.

The only lever today for per-turn color is the agent CLI's own TUI theme (e.g. Codex /theme, Claude Code theme), which is not a substitute:

  • It colors everything (syntax highlighting, tool output, diffs), not just my turns — I can't opt into "highlight only my messages".
  • It is agent-specific and inconsistent across the different CLIs AO supports (Codex, Claude Code, Cursor, Aider, OpenCode…).
  • It emits truecolor (24-bit) ANSI baked into the PTY stream, so it is not something AO can retarget from its own terminal theme.

So the differentiation I want is not achievable via agent config — it needs to live in AO.

Current behavior

  • AO renders the agent inside a tmux + xterm.js pane fed by the agent's PTY.
  • Messages I send (dashboard message input / ao send) are injected into the agent's pane and echoed back by the agent, so from xterm's perspective my message is indistinguishable from agent output — same default foreground.
  • Result: no visual separation between my turns and the agent's.

Why AO is the right layer

AO already owns the user's message string at send time (the input box / ao send payload) and the moment of injection. That is exactly the signal needed to mark a user turn: the agent's raw PTY stream carries no reliable, cross-agent "this is the user" marker, but AO's send path does.

Proposal

Provide an opt-in setting to style the user's own turns distinctly in the session terminal. Implementation open; some options:

  1. App-side turn tagging — at send time AO knows the exact submitted text; tag the corresponding echoed region so xterm renders it with a configurable foreground color (or a left gutter bar / prefix glyph).
  2. Chat-log overlay — render user turns as distinct styled blocks layered over the terminal (closer to a chat transcript), leaving agent output untouched.
  3. Minimal — a single configurable "user message color" in Settings › Appearance, applied to detected user turns.

Color configurable in Settings › Appearance, subtle default, with an on/off toggle so users who prefer the raw terminal keep it.

Acceptance criteria

  • A setting exists to enable/disable distinct styling for the user's own messages.
  • When enabled, messages I send render visually distinct (color / gutter / prefix) from agent output in the live session terminal (and, ideally, in restored/scrollback history).
  • Behavior is independent of the agent's own theme and works across supported agent CLIs, degrading gracefully where turn boundaries can't be detected.
  • Agent output styling (ANSI / syntax colors) is unchanged.

Related

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions