Skip to content

Color terminal-command prompt input like a running tool#471

Merged
alejandro-ao merged 9 commits into
mainfrom
feat/bang-input-highlight
Jul 24, 2026
Merged

Color terminal-command prompt input like a running tool#471
alejandro-ao merged 9 commits into
mainfrom
feat/bang-input-highlight

Conversation

@alejandro-ao

@alejandro-ao alejandro-ao commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

When the prompt input starts with ! (or !!) — meaning submitting will run a shell command instead of messaging the model — the entire input text and the prompt's left border are now rendered in the theme's running-tool accent color, and the τ prompt prefix becomes a matching $ (roles.tool.border: amber #8a7a52 in tau-dark, #a16207 in tau-light, #ffd000 in high-contrast). Previously only the !/!! prefix itself was tinted with the theme accent color.

How it improves user experience

The ! prefix is easy to type accidentally or forget about while composing a longer command. Coloring the whole input, its left border, and a $ prompt prefix the same orange/amber as a tool while it is running gives an immediate, glanceable signal that the submission will execute in the shell, consistent with colors the user already associates with tool execution. Multi-line commands are fully colored too, and the color is derived from the active theme so custom themes stay consistent.

Issues

No tracking issue — small UX polish.

Manual validation

  1. Run uv run tau (or python main.py equivalent / tau) and focus the prompt.
  2. Type !pwd — the whole input and its left border turn amber/orange, and the τ prefix becomes a $ as soon as ! is the first character.
  3. Add a second line (!echo a then newline + echo b) — both lines stay colored.
  4. Delete the ! or type a normal message — input returns to the default prompt color.
  5. While the agent runs, the prefix keeps the usual running animation; it returns to $ when idle in shell mode.
  6. Compare with a running tool row in the transcript — the input color matches the running tool's accent color.
  7. Switch themes (tau-dark, tau-light, high-contrast) and repeat — the input follows each theme's running-tool color.

Checks

  • uv run pytest — 1145 passed
  • uv run ruff check . — passed
  • uv run ruff format --check . — passed
  • uv run mypy — no issues

When the prompt starts with ! or !!, style the entire input (not just
the prefix) with the theme's running-tool accent color so it is obvious
the submission will execute a shell command.
Match the new terminal-command input coloring: the prompt's left border
in shell mode now uses the theme's running-tool accent color instead of
the theme accent, via a new tau-tool-running CSS variable.
Swap the tau prompt prefix for a dollar sign, tinted with the theme's
running-tool accent color, whenever the input is a terminal command.
The running animation still takes precedence while the agent works.
@alejandro-ao
alejandro-ao marked this pull request as ready for review July 24, 2026 16:18
@alejandro-ao
alejandro-ao merged commit ff35f16 into main Jul 24, 2026
2 checks passed
@alejandro-ao
alejandro-ao deleted the feat/bang-input-highlight branch July 24, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant