diff options
| author | Dax Raad <[email protected]> | 2025-05-19 15:43:14 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 12:40:17 -0400 |
| commit | 652429377b99085d686d6b907c2f550c304e6b98 (patch) | |
| tree | e4fa0de6b0503885c76bb77e1e0d0e7d56e5117e /internal | |
| parent | 99af6146d5def31c59993636d60eb75a483a283b (diff) | |
| download | opencode-652429377b99085d686d6b907c2f550c304e6b98.tar.gz opencode-652429377b99085d686d6b907c2f550c304e6b98.zip | |
sync
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/app/app.go | 9 |
1 files changed, 9 insertions, 0 deletions
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(), |
