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/page | |
| parent | 5601466fe1610b777895682050b1b458f80c0ac8 (diff) | |
| download | opencode-3ad983db0f2c08826d56cb5de274d706c95b3353.tar.gz opencode-3ad983db0f2c08826d56cb5de274d706c95b3353.zip | |
cleanup app, config and root
Diffstat (limited to 'internal/tui/page')
| -rw-r--r-- | internal/tui/page/chat.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/tui/page/chat.go b/internal/tui/page/chat.go index a7a51bb84..9b9924909 100644 --- a/internal/tui/page/chat.go +++ b/internal/tui/page/chat.go @@ -1,6 +1,8 @@ package page import ( + "context" + "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" "github.com/kujtimiihoxha/termai/internal/app" @@ -36,7 +38,7 @@ func (p *chatPage) Init() tea.Cmd { p.layout.Init(), } - sessions, _ := p.app.Sessions.List() + sessions, _ := p.app.Sessions.List(context.Background()) if len(sessions) > 0 { p.session = sessions[0] cmd := p.setSidebar() @@ -92,7 +94,7 @@ func (p *chatPage) clearSidebar() { func (p *chatPage) sendMessage(text string) tea.Cmd { var cmds []tea.Cmd if p.session.ID == "" { - session, err := p.app.Sessions.Create("New Session") + session, err := p.app.Sessions.Create(context.Background(), "New Session") if err != nil { return util.ReportError(err) } @@ -110,7 +112,7 @@ func (p *chatPage) sendMessage(text string) tea.Cmd { return util.ReportError(err) } go func() { - a.Generate(p.app.Context, p.session.ID, text) + a.Generate(context.Background(), p.session.ID, text) }() return tea.Batch(cmds...) |
