detached 6a41664

tui: show binary version in the welcome banner for 1 second

splash variant of the welcome line:
  ▌ i'm zot (0.0.6). yet another coding agent harness.
reverts to:
  ▌ i'm zot. yet another coding agent harness.
after welcomeVersionDuration (1s). a one-shot AfterFunc fires
i.invalidate() so the banner refreshes on its own even if the
user has not typed anything by then.

dev builds without ldflags-injected version still print "(0.0.0)"
during the splash; release tags propagate through the makefile
into main.version normally.

bundles a small printhelp tagline tweak that was already staged.
commit
6a4166429ecf9f660d1fc087699c39e3d5495257
author
patriceckhart · · 2026-04-19 11:22 UTC
parent
154420e
signature
unsigned
refs
tag: v0.0.20
3 files · +32 -4
M internal/agent/args.go +1 -1
@@ -184,7 +184,7 @@ func ParseArgs(in []string) (Args, error) {
184184
185185 // PrintHelp writes the help text to w (stderr by default).
186186 func PrintHelp(version string) {
187- fmt.Fprintf(os.Stderr, `zot %s — lightweight terminal coding agent
187+ fmt.Fprintf(os.Stderr, `zot %s — Yet another coding agent harness.
188188
189189 usage:
190190 zot interactive tui
@@ -184,7 +184,7 @@ func ParseArgs(in []string) (Args, error) {
184 184
185 // PrintHelp writes the help text to w (stderr by default).185 // PrintHelp writes the help text to w (stderr by default).
186 func PrintHelp(version string) {186 func PrintHelp(version string) {
187- fmt.Fprintf(os.Stderr, `zot %s — lightweight terminal coding agent187+ fmt.Fprintf(os.Stderr, `zot %s — Yet another coding agent harness.
188 188
189 usage:189 usage:
190 zot interactive tui190 zot interactive tui
M internal/agent/modes/interactive.go +20 -1
@@ -140,8 +140,18 @@ type Interactive struct {
140140 // clears the editor / cancels a turn / shows a hint; a second press
141141 // within ctrlCExitWindow exits. Mirrors the python-repl convention.
142142 lastCtrlC time.Time
143+
144+ // welcomeStart is when the interactive run began. The welcome
145+ // banner shows the binary version for welcomeVersionDuration
146+ // after this point and reverts to plain text after.
147+ welcomeStart time.Time
143148 }
144149
150+// welcomeVersionDuration is how long the welcome banner shows the
151+// version suffix before reverting to the plain headline. 1 second
152+// is enough to read at a glance and keeps the splash short.
153+const welcomeVersionDuration = 1 * time.Second
154+
145155 // NewInteractive constructs an Interactive from cfg.
146156 func NewInteractive(cfg InteractiveConfig) *Interactive {
147157 i := &Interactive{
@@ -200,6 +210,12 @@ func (i *Interactive) Run(ctx context.Context) error {
200210 i.ed.SetValue(i.cfg.InitialInput)
201211 }
202212
213+ // Stamp the welcome time and schedule a one-shot redraw at the
214+ // expiry so the version suffix disappears on its own even if the
215+ // user hasn't typed anything yet.
216+ i.welcomeStart = time.Now()
217+ time.AfterFunc(welcomeVersionDuration, i.invalidate)
218+
203219 // If the agent was constructed with a pre-loaded transcript
204220 // (--continue, --resume, --session) park the viewport on the
205221 // most recent turn so the user lands looking at where the
@@ -431,8 +447,11 @@ func (i *Interactive) redraw() {
431447
432448 // Welcome banner: shown at the top of the chat area when there is
433449 // no transcript yet. Disappears after the first message is sent.
450+ // The version suffix is shown for welcomeVersionDuration after
451+ // startup, then drops off automatically.
434452 if len(i.view.Messages) == 0 && !i.streamOn && len(i.toolOrder) == 0 {
435- chat = append(welcomeBanner(i.cfg.Theme), chat...)
453+ showVer := !i.welcomeStart.IsZero() && time.Since(i.welcomeStart) < welcomeVersionDuration
454+ chat = append(welcomeBanner(i.cfg.Theme, i.cfg.Version, showVer), chat...)
436455 }
437456
438457 // Update-available banner: prepended above everything else so it's
@@ -140,8 +140,18 @@ type Interactive struct {
140 // clears the editor / cancels a turn / shows a hint; a second press140 // clears the editor / cancels a turn / shows a hint; a second press
141 // within ctrlCExitWindow exits. Mirrors the python-repl convention.141 // within ctrlCExitWindow exits. Mirrors the python-repl convention.
142 lastCtrlC time.Time142 lastCtrlC time.Time
143+
144+ // welcomeStart is when the interactive run began. The welcome
145+ // banner shows the binary version for welcomeVersionDuration
146+ // after this point and reverts to plain text after.
147+ welcomeStart time.Time
143 }148 }
144 149
150+// welcomeVersionDuration is how long the welcome banner shows the
151+// version suffix before reverting to the plain headline. 1 second
152+// is enough to read at a glance and keeps the splash short.
153+const welcomeVersionDuration = 1 * time.Second
154+
145 // NewInteractive constructs an Interactive from cfg.155 // NewInteractive constructs an Interactive from cfg.
146 func NewInteractive(cfg InteractiveConfig) *Interactive {156 func NewInteractive(cfg InteractiveConfig) *Interactive {
147 i := &Interactive{157 i := &Interactive{
@@ -200,6 +210,12 @@ func (i *Interactive) Run(ctx context.Context) error {
200 i.ed.SetValue(i.cfg.InitialInput)210 i.ed.SetValue(i.cfg.InitialInput)
201 }211 }
202 212
213+ // Stamp the welcome time and schedule a one-shot redraw at the
214+ // expiry so the version suffix disappears on its own even if the
215+ // user hasn't typed anything yet.
216+ i.welcomeStart = time.Now()
217+ time.AfterFunc(welcomeVersionDuration, i.invalidate)
218+
203 // If the agent was constructed with a pre-loaded transcript219 // If the agent was constructed with a pre-loaded transcript
204 // (--continue, --resume, --session) park the viewport on the220 // (--continue, --resume, --session) park the viewport on the
205 // most recent turn so the user lands looking at where the221 // most recent turn so the user lands looking at where the
@@ -431,8 +447,11 @@ func (i *Interactive) redraw() {
431 447
432 // Welcome banner: shown at the top of the chat area when there is448 // Welcome banner: shown at the top of the chat area when there is
433 // no transcript yet. Disappears after the first message is sent.449 // no transcript yet. Disappears after the first message is sent.
450+ // The version suffix is shown for welcomeVersionDuration after
451+ // startup, then drops off automatically.
434 if len(i.view.Messages) == 0 && !i.streamOn && len(i.toolOrder) == 0 {452 if len(i.view.Messages) == 0 && !i.streamOn && len(i.toolOrder) == 0 {
435- chat = append(welcomeBanner(i.cfg.Theme), chat...)453+ showVer := !i.welcomeStart.IsZero() && time.Since(i.welcomeStart) < welcomeVersionDuration
454+ chat = append(welcomeBanner(i.cfg.Theme, i.cfg.Version, showVer), chat...)
436 }455 }
437 456
438 // Update-available banner: prepended above everything else so it's457 // Update-available banner: prepended above everything else so it's
M internal/agent/modes/welcome.go +11 -2
@@ -4,9 +4,18 @@ import "github.com/patriceckhart/zot/internal/tui"
44
55 // welcomeBanner returns the intro text shown at the top of an empty chat.
66 // It uses the `zot` label color (same as the assistant) for consistency.
7-func welcomeBanner(th tui.Theme) []string {
7+//
8+// When version is non-empty AND showVersion is true, the headline
9+// reads "i'm zot (vX.Y.Z). ..." so users see which build they're on
10+// the moment zot starts. After welcomeVersionDuration the caller
11+// flips showVersion off and the headline reverts to plain text.
12+func welcomeBanner(th tui.Theme, version string, showVersion bool) []string {
13+ headline := "▌ i'm zot. yet another coding agent harness."
14+ if showVersion && version != "" {
15+ headline = "▌ i'm zot (" + version + "). yet another coding agent harness."
16+ }
817 return []string{
9- th.FG256(th.Assistant, tui.Bold("▌ i'm zot. yet another coding agent harness.")),
18+ th.FG256(th.Assistant, tui.Bold(headline)),
1019 th.FG256(th.Muted, " ask anything, or type /help to see commands."),
1120 "",
1221 }
@@ -4,9 +4,18 @@ import "github.com/patriceckhart/zot/internal/tui"
4 4
5 // welcomeBanner returns the intro text shown at the top of an empty chat.5 // welcomeBanner returns the intro text shown at the top of an empty chat.
6 // It uses the `zot` label color (same as the assistant) for consistency.6 // It uses the `zot` label color (same as the assistant) for consistency.
7-func welcomeBanner(th tui.Theme) []string {7+//
8+// When version is non-empty AND showVersion is true, the headline
9+// reads "i'm zot (vX.Y.Z). ..." so users see which build they're on
10+// the moment zot starts. After welcomeVersionDuration the caller
11+// flips showVersion off and the headline reverts to plain text.
12+func welcomeBanner(th tui.Theme, version string, showVersion bool) []string {
13+ headline := "▌ i'm zot. yet another coding agent harness."
14+ if showVersion && version != "" {
15+ headline = "▌ i'm zot (" + version + "). yet another coding agent harness."
16+ }
8 return []string{17 return []string{
9- th.FG256(th.Assistant, tui.Bold("▌ i'm zot. yet another coding agent harness.")),18+ th.FG256(th.Assistant, tui.Bold(headline)),
10 th.FG256(th.Muted, " ask anything, or type /help to see commands."),19 th.FG256(th.Muted, " ask anything, or type /help to see commands."),
11 "",20 "",
12 }21 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close