summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/page
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-13 06:56:12 -0500
committeradamdottv <[email protected]>2025-06-13 06:56:12 -0500
commitb7f06bbc1f8359f6a78de697fbb5c2e4b5a6ebb7 (patch)
treecac987862c9de012f5011c94bd031fb18b962e31 /packages/tui/internal/page
parent1b8cfe9e99e7b97069580a2e8aaa8cf1abb56d31 (diff)
downloadopencode-b7f06bbc1f8359f6a78de697fbb5c2e4b5a6ebb7.tar.gz
opencode-b7f06bbc1f8359f6a78de697fbb5c2e4b5a6ebb7.zip
wip: refactoring tui
Diffstat (limited to 'packages/tui/internal/page')
-rw-r--r--packages/tui/internal/page/chat.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/packages/tui/internal/page/chat.go b/packages/tui/internal/page/chat.go
index 525d77d97..3e2e530a0 100644
--- a/packages/tui/internal/page/chat.go
+++ b/packages/tui/internal/page/chat.go
@@ -2,7 +2,6 @@ package page
import (
"context"
- "strings"
"github.com/charmbracelet/bubbles/v2/key"
tea "github.com/charmbracelet/bubbletea/v2"
@@ -12,7 +11,6 @@ import (
"github.com/sst/opencode/internal/components/chat"
"github.com/sst/opencode/internal/components/dialog"
"github.com/sst/opencode/internal/layout"
- "github.com/sst/opencode/internal/status"
"github.com/sst/opencode/internal/util"
)
@@ -67,29 +65,6 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if cmd != nil {
return p, cmd
}
- case dialog.CommandRunCustomMsg:
- // Check if the agent is busy before executing custom commands
- 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
- if msg.Args != nil {
- // Replace all named arguments with their values
- for name, value := range msg.Args {
- placeholder := "$" + name
- content = strings.ReplaceAll(content, placeholder, value)
- }
- }
-
- // Handle custom command execution
- cmd := p.sendMessage(content, nil)
- if cmd != nil {
- return p, cmd
- }
-
case dialog.CompletionDialogCloseMsg:
p.showCompletionDialog = false
p.app.SetCompletionDialogOpen(false)