diff options
| author | adamdottv <[email protected]> | 2025-06-04 13:52:23 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-06-04 13:52:23 -0500 |
| commit | 093e64eb54b0340442a8b1d73a4e7c769f3c275c (patch) | |
| tree | 04b18060e22cc1354833133c305d1c7ddc604a65 /packages/tui/internal/page | |
| parent | f34a3b6f67ff3cf255a0a9e547da31fa0b5b8912 (diff) | |
| download | opencode-093e64eb54b0340442a8b1d73a4e7c769f3c275c.tar.gz opencode-093e64eb54b0340442a8b1d73a4e7c769f3c275c.zip | |
wip: refactoring tui
Diffstat (limited to 'packages/tui/internal/page')
| -rw-r--r-- | packages/tui/internal/page/chat.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/tui/internal/page/chat.go b/packages/tui/internal/page/chat.go index 1c559122f..8e175a26e 100644 --- a/packages/tui/internal/page/chat.go +++ b/packages/tui/internal/page/chat.go @@ -13,6 +13,7 @@ import ( "github.com/sst/opencode/internal/components/dialog" "github.com/sst/opencode/internal/layout" "github.com/sst/opencode/internal/state" + "github.com/sst/opencode/internal/status" "github.com/sst/opencode/internal/util" "github.com/sst/opencode/pkg/client" ) @@ -75,10 +76,10 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case dialog.CommandRunCustomMsg: // Check if the agent is busy before executing custom commands - // if p.app.PrimaryAgentOLD.IsBusy() { - // status.Warn("Agent is busy, please wait before executing a command...") - // return p, nil - // } + if p.app.IsBusy() { + status.Warn("Agent is busy, please wait before executing a command...") + return p, nil + } // Process the command content with arguments if any content := msg.Content @@ -122,7 +123,7 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if p.app.Session.Id != "" { // Cancel the current session's generation process // This allows users to interrupt long-running operations - // p.app.PrimaryAgentOLD.Cancel(p.app.CurrentSessionOLD.ID) + p.app.Cancel(context.Background(), p.app.Session.Id) return p, nil } case key.Matches(msg, keyMap.ToggleTools): |
