From fdf0f697e11d8260d094936fe2c22d9c2d0556f3 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Mon, 23 Sep 2024 18:53:32 -0400 Subject: [PATCH] fix: use an otto-specific workspace directory Signed-off-by: Donnie Adams --- pkg/services/config.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/services/config.go b/pkg/services/config.go index 233fa1fa0..06e4c0d21 100644 --- a/pkg/services/config.go +++ b/pkg/services/config.go @@ -3,10 +3,12 @@ package services import ( "context" "os" + "path/filepath" "github.com/acorn-io/baaah" "github.com/acorn-io/baaah/pkg/leader" "github.com/acorn-io/baaah/pkg/router" + "github.com/adrg/xdg" "github.com/gptscript-ai/go-gptscript" "github.com/gptscript-ai/gptscript/pkg/sdkserver" "github.com/gptscript-ai/otto/pkg/aihelper" @@ -103,8 +105,10 @@ func New(ctx context.Context, config Config) (*Services, error) { var ( tokenServer = &jwt.TokenService{} - workspaceClient = wclient.New() - events = events.NewEmitter(storageClient) + workspaceClient = wclient.New(wclient.Options{ + DirectoryDataHome: filepath.Join(xdg.DataHome, "otto", "workspaces"), + }) + events = events.NewEmitter(storageClient) ) return &Services{