Skip to content

feat(terminal): shade tool output and show a spinner while waiting - #15

Merged
minixalpha merged 5 commits into
mainfrom
claude/tool-output-shading
Aug 1, 2026
Merged

feat(terminal): shade tool output and show a spinner while waiting#15
minixalpha merged 5 commits into
mainfrom
claude/tool-output-shading

Conversation

@minixalpha

@minixalpha minixalpha commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Two terminal UX improvements to how tool activity is presented:

  • Two-tone tool shading. Echoed tool calls ([bash]$ ..., [read] ...) now sit on a lighter background shade (256-color gray 238) than their output (gray 236), so the command and what it printed read apart at a glance. print_tool is split into print_tool_use / print_tool_output over a shared _print_shaded helper.
  • Wait spinner. A braille-dots spinner animates in place while awaiting the model's reply or a running bash command, so long waits no longer look like a frozen terminal. A daemon thread redraws the line and erases it on stop, leaving no trace in the transcript; it draws nothing when stdout is not a TTY or NO_COLOR is set, and stop() is idempotent. The Agent> prompt is now printed only when the reply actually streams text, so tool-only turns no longer leave an empty prompt line.

Changes

  • src/nanopycodeagent/terminal.py — two shading shades, Spinner class (context manager, background thread).
  • src/nanopycodeagent/agent.py — use the split print helpers; wrap the model stream and bash runs in spinners; defer the Agent> prompt until the first streamed token.
  • tests/test_terminal.py — cover both shades and the spinner (TTY/non-TTY, idempotent stop, erase-on-stop).
  • docs/changelogs/0.6.x.md — new 0.6.x series file with the [Unreleased] entry (Added: spinner; Changed: two-tone shading), since these are features and the next release is a minor bump per SemVer.
  • docs/dev_notes/zh-CN/0.6.x.md + docs/dev_notes/en/0.6.x.md — new 0.6.x dev notes (Chinese source, generated English version).

Test plan

  • uv run pytest — 58 passed.

@minixalpha
minixalpha merged commit 6a0c3df into main Aug 1, 2026
2 checks passed
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