Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/mecatui/ui/keymark_liveness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,15 +826,15 @@ func TestSoulAndUserModelOverlayHintsReflectKeyOverride(t *testing.T) {
}
})
t.Run("user model", func(t *testing.T) {
st := &userModelState{deps: surfaceDeps{theme: th, marks: hk, caps: client.Capabilities{UserModel: true}}, list: &bounded.List{}, viewport: &bounded.Viewport{}}
st := &userModelState{deps: surfaceDeps{theme: th, marks: hk, keys: applyKeyOverrides(defaultKeys(), overrideAll()), caps: client.Capabilities{UserModel: true}}, list: &bounded.List{}, viewport: &bounded.Viewport{}}
st.setModel(client.UserModel{Entries: []client.UserModelEntry{{Key: "k"}}})
body, _ := st.Render(100, 30)
got := stripANSIstr(body)
if !strings.Contains(got, "ctrl+f16 close") {
t.Errorf("user-model hint should carry live close: %q", got)
if !strings.Contains(got, "[ctrl+f16 Close]") {
t.Errorf("user-model control should carry captured close: %q", got)
}
if strings.Contains(got, "esc close") {
t.Errorf("user-model hint still shows default close: %q", got)
if strings.Contains(got, "[esc Close]") {
t.Errorf("user-model control still shows default close: %q", got)
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/mecatui/ui/testdata/usermodel.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
┃ │ the operator's name ┃
┃ stack ┃
┃ │ prefers Go + hexagonal architecture ┃
┃ ↑/↓ select · enter inspect · the agent saves and updates these facts · esc close ┃
┃ [enter Inspect] [esc Close] ┃
┃ ↑/↓ select · the agent saves and updates these facts ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛






│
│ Ask mecatl to do something… (enter to send · shift+enter for newline · ? for help)
│
Expand Down
26 changes: 26 additions & 0 deletions cmd/mecatui/ui/testdata/usermodel_constrained.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
session sess-test-00
────────────────────────
┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ Saved memory ┃
┃ 2 facts · 64 bytes ┃
┃ · sha:abc123def45 ┃
┃ 6 ┃
┃ ▶ name ┃
┃ │ the operator's ┃
┃ │ name ┃
┃ [enter Inspect] ┃
┃ [esc Close] ┃
┃ ↑/↓ select · the a ┃
┃ gent saves and upd ┃
┃ ates these facts ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━┛

│
│ Ask mecatl to do
│ something… (enter to
│ send · shift+enter
────────────────────────
connected
? help · / commands · ctrl+c quit
30 changes: 30 additions & 0 deletions cmd/mecatui/ui/testdata/usermodel_detail.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
mecatui · Golden session · fixture/fixture-model/default · mode default
────────────────────────────────────────────────────────────────────────────────────────────────────



┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ User model detail ┃
┃ name ┃
┃ ┃
┃ Alice ┃
┃ ┃
┃ Earlier versions: 1 ┃
┃ v1 · active · 0001-01-01 ┃
┃ [esc Back] ┃
┃ pgup/pgdn scroll · read-only · ask the agent to remove or restore this saved fact ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛





│
│ Ask mecatl to do something… (enter to send · shift+enter for newline · ? for help)
│
│
────────────────────────────────────────────────────────────────────────────────────────────────────
connected ctx ▒▒▒▒░░░░ 50% · 2K/4K · ↑0 ↓0 cache 0%
? help · / commands · ctrl+c quit
4 changes: 2 additions & 2 deletions cmd/mecatui/ui/testdata/usermodel_empty_disabled.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@




┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ Saved memory ┃
┃ Saved memory is not enabled on this server. ┃
┃ Start or connect to a server with memory enabled. ┃
┃ ↑/↓ select · enter inspect · the agent saves and updates these facts · esc close ┃
┃ [esc Close] ┃
┃ ↑/↓ select · the agent saves and updates these facts ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Expand Down
4 changes: 2 additions & 2 deletions cmd/mecatui/ui/testdata/usermodel_empty_enabled.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
┃ ┃
┃ Saved memory ┃
┃ No saved memory yet. ┃
┃ ↑/↓ select · enter inspect · the agent saves and updates these facts · esc close ┃
┃ [esc Close] ┃
┃ ↑/↓ select · the agent saves and updates these facts ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Expand All @@ -20,7 +21,6 @@




│
│ Ask mecatl to do something… (enter to send · shift+enter for newline · ? for help)
│
Expand Down
Loading
Loading