From 652429377b99085d686d6b907c2f550c304e6b98 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Mon, 19 May 2025 15:43:14 -0400 Subject: sync --- internal/app/app.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal') diff --git a/internal/app/app.go b/internal/app/app.go index 41070684e..0ef89d1b9 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -20,6 +20,7 @@ import ( "github.com/sst/opencode/internal/session" "github.com/sst/opencode/internal/status" "github.com/sst/opencode/internal/tui/theme" + "github.com/sst/opencode/pkg/client" ) type App struct { @@ -30,6 +31,7 @@ type App struct { History history.Service Permissions permission.Service Status status.Service + Client *client.Client PrimaryAgent agent.Service @@ -79,7 +81,14 @@ func New(ctx context.Context, conn *sql.DB) (*App, error) { } fileutil.Init() + client, err := client.NewClient("http://localhost:16713") + if err != nil { + slog.Error("Failed to create client", "error", err) + return nil, err + } + app := &App{ + Client: client, CurrentSession: &session.Session{}, Logs: logging.GetService(), Sessions: session.GetService(), -- cgit v1.2.3