Repository navigation
feat(tui): --banner-file replaces the startup banner, with animated frames - #4578
ALLiDoizCode wants to merge 2 commits into
Conversation
…rames Embedders can already rename the TUI with --app-name, but the art drawn on an empty conversation is fixed. --banner-file draws a text file in its place. A line holding only a form feed separates frames; several frames play in a loop on the shared animation tick, one every 100ms, until the conversation starts. The page subscribes to the tick only while an animated banner is visible and marks a tick dirty only on a frame change. Signed-off-by: Jonathan Green <dev.jonathan.green@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push. Commits that are not verified: See GitHub’s guide on signing commits for setup instructions. I’ve added |
A banner larger than the chat area was left out, as the default one is. Art read from a file is now cut down around its center instead, so a backdrop sized for a large terminal fills a small one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonathan Green <dev.jonathan.green@gmail.com>
|
Please don't make claude as co-author (and use docker agent, you'll see it's awesome :) ) |
aheritier
left a comment
There was a problem hiding this comment.
sign your commits and remove claude as co-author ( we don't care of it, we all use agents )
|
👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push.\n\nCommits that are not verified: |
What
A new
runflag,--banner-file <path>, draws the art in a text file where the full TUI draws the Docker Agent banner on an empty conversation.\f) separates frames. A file with several frames plays them in a loop, one every 100ms, until the conversation starts.Why
Projects that ship an agent on top of docker-agent can already put their name on the TUI with
--app-name, but the opening screen still says DOCKER AGENT. The only thing that takes the banner's place today iswelcome_message, which is Markdown drawn once, so art has to go in a code block and cannot move.We hit this in spaceturtle, whose banner is an animated pixel turtle. We currently carry this change as a patch on v1.150.0 and would rather not.
How
pkg/tui/banner: aBannertype (Default,Parse,Load,FrameAt).Lines,WidthandHeightstay for the lean TUI and existing tests.pkg/tui/page/chat:WithBanner. The page subscribes to the shared animation runtime only while an animated banner is visible, marks a tick dirty only when the frame index changes, and gives the subscription up once the conversation replaces the banner. A static banner never subscribes.pkg/tui:WithBanner, passed throughchatPageOptsso new tabs get it too.cmd/root: the flag, loaded before the TUI starts so a bad file is an error, not a silent fallback. Files over 16 MiB are refused.Testing
go testonpkg/tui/...andcmd/root,golangci-lint runon the changed packages andgo run ./lint .pass locally. I did not run the whole oftask test.Not done
🤖 Generated with Claude Code