summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/cmd
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-04 09:20:42 -0500
committeradamdottv <[email protected]>2025-06-04 09:20:48 -0500
commit01050a430f03d479387fdd77816211f5312164af (patch)
tree69c1319d8722ce6d0a774234b9528e270dd23400 /packages/tui/cmd
parent0b565b18c48cb2bc6423662b08b8fed14a0cc738 (diff)
downloadopencode-01050a430f03d479387fdd77816211f5312164af.tar.gz
opencode-01050a430f03d479387fdd77816211f5312164af.zip
wip: refactoring tui
Diffstat (limited to 'packages/tui/cmd')
-rw-r--r--packages/tui/cmd/opencode/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/tui/cmd/opencode/main.go b/packages/tui/cmd/opencode/main.go
index a6e6c6ea3..3d9dd2947 100644
--- a/packages/tui/cmd/opencode/main.go
+++ b/packages/tui/cmd/opencode/main.go
@@ -10,9 +10,9 @@ import (
tea "github.com/charmbracelet/bubbletea"
zone "github.com/lrstanley/bubblezone"
+ "github.com/sst/opencode/internal/app"
"github.com/sst/opencode/internal/pubsub"
"github.com/sst/opencode/internal/tui"
- "github.com/sst/opencode/internal/tui/app"
"github.com/sst/opencode/pkg/client"
)
@@ -46,7 +46,7 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- app, err := app.New(ctx, httpClient)
+ app_, err := app.New(ctx, httpClient)
if err != nil {
slog.Error("Failed to create app", "error", err)
// return err
@@ -55,7 +55,7 @@ func main() {
// Set up the TUI
zone.NewGlobal()
program := tea.NewProgram(
- tui.New(app),
+ tui.NewModel(app_),
tea.WithAltScreen(),
)
@@ -78,7 +78,7 @@ func main() {
}()
// Setup the subscriptions, this will send services events to the TUI
- ch, cancelSubs := setupSubscriptions(app, ctx)
+ ch, cancelSubs := setupSubscriptions(app_, ctx)
// Create a context for the TUI message handler
tuiCtx, tuiCancel := context.WithCancel(ctx)
@@ -113,7 +113,7 @@ func main() {
cancelSubs()
// Then shutdown the app
- app.Shutdown()
+ app_.Shutdown()
// Then cancel TUI message handler
tuiCancel()