Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit b787dc0

Browse files
committed
wip command dialog
1 parent f154400 commit b787dc0

10 files changed

Lines changed: 391 additions & 124 deletions

File tree

.opencode.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"gopls": {
55
"command": "gopls"
66
}
7+
},
8+
"tui": {
9+
"theme": "opencode-dark"
710
}
811
}

cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"flagWords":[],"version":"0.2","words":["opencode","charmbracelet","lipgloss","bubbletea"],"language":"en"}
1+
{"flagWords":[],"language":"en","words":["opencode","charmbracelet","lipgloss","bubbletea","textinput","Focusable"],"version":"0.2"}

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ require (
3232
github.com/stretchr/testify v1.10.0
3333
)
3434

35+
require github.com/sahilm/fuzzy v0.1.1
36+
3537
require (
3638
cloud.google.com/go v0.116.0 // indirect
3739
cloud.google.com/go/auth v0.13.0 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
199199
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
200200
github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
201201
github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
202+
github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA=
203+
github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
202204
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
203205
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
204206
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/tui/components/chat/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type messageListCmp struct {
4545
// NewMessagesListCmp creates a new message list component with custom keybindings
4646
// and reverse ordering (newest messages at bottom).
4747
func NewMessagesListCmp(app *app.App) MessageListCmp {
48-
defaultKeymaps := list.DefaultKeymap()
48+
defaultKeymaps := list.DefaultKeyMap()
4949
defaultKeymaps.Up.SetEnabled(false)
5050
defaultKeymaps.Down.SetEnabled(false)
5151
defaultKeymaps.NDown = key.NewBinding(

internal/tui/components/core/list/keys.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type KeyMap struct {
1818
End key.Binding
1919
}
2020

21-
func DefaultKeymap() KeyMap {
21+
func DefaultKeyMap() KeyMap {
2222
return KeyMap{
2323
Down: key.NewBinding(
2424
key.WithKeys("down", "ctrl+j", "ctrl+n"),
@@ -45,10 +45,10 @@ func DefaultKeymap() KeyMap {
4545
key.WithKeys("ctrl+u"),
4646
),
4747
Home: key.NewBinding(
48-
key.WithKeys("g", "home"),
48+
key.WithKeys("ctrl+g", "home"),
4949
),
5050
End: key.NewBinding(
51-
key.WithKeys("shift+g", "end"),
51+
key.WithKeys("ctrl+shift+g", "end"),
5252
),
5353
}
5454
}

0 commit comments

Comments
 (0)