diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-13 13:17:17 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 13:41:25 +0200 |
| commit | 3ad983db0f2c08826d56cb5de274d706c95b3353 (patch) | |
| tree | 3151e7f361dc2b468429791d581eb5f3d658f84f /internal/tui/tui.go | |
| parent | 5601466fe1610b777895682050b1b458f80c0ac8 (diff) | |
| download | opencode-3ad983db0f2c08826d56cb5de274d706c95b3353.tar.gz opencode-3ad983db0f2c08826d56cb5de274d706c95b3353.zip | |
cleanup app, config and root
Diffstat (limited to 'internal/tui/tui.go')
| -rw-r--r-- | internal/tui/tui.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/tui/tui.go b/internal/tui/tui.go index db9ac9ff6..1b1a1ed50 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -1,6 +1,8 @@ package tui import ( + "context" + "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" @@ -184,7 +186,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case key.Matches(msg, replKeyMap): if a.currentPage == page.ReplPage { - sessions, err := a.app.Sessions.List() + sessions, err := a.app.Sessions.List(context.Background()) if err != nil { return a, util.CmdHandler(util.ReportError(err)) } @@ -192,7 +194,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if lastSession.MessageCount == 0 { return a, util.CmdHandler(repl.SelectedSessionMsg{SessionID: lastSession.ID}) } - s, err := a.app.Sessions.Create("New Session") + s, err := a.app.Sessions.Create(context.Background(), "New Session") if err != nil { return a, util.CmdHandler(util.ReportError(err)) } |
