detached 5a64f87

tui: show no-yolo status tag

commit
5a64f879180bd30811fee2eac6801208d0fed472
author
patriceckhart · · 2026-05-03 17:38 UTC
parent
6ba41f2
signature
unsigned
refs
tag: v0.1.47
3 files · +25 -2
M internal/agent/modes/interactive.go +1 -0
@@ -834,6 +834,7 @@ func (i *Interactive) redraw() {
834834 BusyPrefix: busyPrefix,
835835 CWD: i.cfg.CWD,
836836 Locked: i.cfg.Sandbox.Locked(),
837+ NoYolo: i.cfg.NoYolo,
837838 Usage: i.cumUsage,
838839 Subscription: i.cfg.AuthMethod == "oauth",
839840 ContextUsed: i.lastCtxInput,
@@ -834,6 +834,7 @@ func (i *Interactive) redraw() {
834 BusyPrefix: busyPrefix,834 BusyPrefix: busyPrefix,
835 CWD: i.cfg.CWD,835 CWD: i.cfg.CWD,
836 Locked: i.cfg.Sandbox.Locked(),836 Locked: i.cfg.Sandbox.Locked(),
837+ NoYolo: i.cfg.NoYolo,
837 Usage: i.cumUsage,838 Usage: i.cumUsage,
838 Subscription: i.cfg.AuthMethod == "oauth",839 Subscription: i.cfg.AuthMethod == "oauth",
839 ContextUsed: i.lastCtxInput,840 ContextUsed: i.lastCtxInput,
M internal/tui/statusbar_test.go +18 -0
@@ -56,3 +56,21 @@ func TestStatusBarNoCWD(t *testing.T) {
5656 t.Fatalf("empty cwd: want 1 line, got %d: %q", len(lines), lines)
5757 }
5858 }
59+
60+func TestStatusBarNoYoloTagPrecedesCWD(t *testing.T) {
61+ lines := StatusBar(StatusBarParams{
62+ Theme: Dark,
63+ Provider: "openai",
64+ Model: "gpt-5.5",
65+ CWD: "/tmp/x",
66+ NoYolo: true,
67+ Cols: 200,
68+ })
69+ if len(lines) != 2 {
70+ t.Fatalf("want 2 lines, got %d: %q", len(lines), lines)
71+ }
72+ plain := stripANSI(lines[1])
73+ if !strings.Contains(plain, "yolo mode disabled - /tmp/x") {
74+ t.Fatalf("cwd line should include no-yolo tag before cwd, got %q", plain)
75+ }
76+}
@@ -56,3 +56,21 @@ func TestStatusBarNoCWD(t *testing.T) {
56 t.Fatalf("empty cwd: want 1 line, got %d: %q", len(lines), lines)56 t.Fatalf("empty cwd: want 1 line, got %d: %q", len(lines), lines)
57 }57 }
58 }58 }
59+
60+func TestStatusBarNoYoloTagPrecedesCWD(t *testing.T) {
61+ lines := StatusBar(StatusBarParams{
62+ Theme: Dark,
63+ Provider: "openai",
64+ Model: "gpt-5.5",
65+ CWD: "/tmp/x",
66+ NoYolo: true,
67+ Cols: 200,
68+ })
69+ if len(lines) != 2 {
70+ t.Fatalf("want 2 lines, got %d: %q", len(lines), lines)
71+ }
72+ plain := stripANSI(lines[1])
73+ if !strings.Contains(plain, "yolo mode disabled - /tmp/x") {
74+ t.Fatalf("cwd line should include no-yolo tag before cwd, got %q", plain)
75+ }
76+}
M internal/tui/view.go +6 -2
@@ -1716,6 +1716,7 @@ type StatusBarParams struct {
17161716 BusyPrefix string // spinner + funny line when busy
17171717 CWD string
17181718 Locked bool // sandbox on?
1719+ NoYolo bool // confirmation mode enabled?
17191720
17201721 // Cumulative session usage and cost.
17211722 Usage provider.Usage
@@ -1836,11 +1837,14 @@ func StatusBar(p StatusBarParams) []string {
18361837
18371838 cwd := shortenHome(p.CWD)
18381839 tags := ""
1840+ if p.NoYolo {
1841+ tags += "yolo mode disabled "
1842+ }
18391843 if p.Locked {
1840- tags += "- jailed "
1844+ tags += "jailed "
18411845 }
18421846 if p.Telegram {
1843- tags += "- tg "
1847+ tags += "telegram connected "
18441848 }
18451849 if tags != "" && cwd != "" {
18461850 cwd = tags + "- " + cwd
@@ -1716,6 +1716,7 @@ type StatusBarParams struct {
1716 BusyPrefix string // spinner + funny line when busy1716 BusyPrefix string // spinner + funny line when busy
1717 CWD string1717 CWD string
1718 Locked bool // sandbox on?1718 Locked bool // sandbox on?
1719+ NoYolo bool // confirmation mode enabled?
1719 1720
1720 // Cumulative session usage and cost.1721 // Cumulative session usage and cost.
1721 Usage provider.Usage1722 Usage provider.Usage
@@ -1836,11 +1837,14 @@ func StatusBar(p StatusBarParams) []string {
1836 1837
1837 cwd := shortenHome(p.CWD)1838 cwd := shortenHome(p.CWD)
1838 tags := ""1839 tags := ""
1840+ if p.NoYolo {
1841+ tags += "yolo mode disabled "
1842+ }
1839 if p.Locked {1843 if p.Locked {
1840- tags += "- jailed "1844+ tags += "jailed "
1841 }1845 }
1842 if p.Telegram {1846 if p.Telegram {
1843- tags += "- tg "1847+ tags += "telegram connected "
1844 }1848 }
1845 if tags != "" && cwd != "" {1849 if tags != "" && cwd != "" {
1846 cwd = tags + "- " + cwd1850 cwd = tags + "- " + cwd

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