From e9a1b00d4db57935864b84b3f3a016dd620a5256 Mon Sep 17 00:00:00 2001
From: Donnie Adams <donnie@acorn.io>
Date: Fri, 18 Oct 2024 10:29:09 -0400
Subject: [PATCH] chore: remove workspace data home option

Signed-off-by: Donnie Adams <donnie@acorn.io>
---
 opts.go      | 25 ++++++++++---------------
 workspace.go |  9 ++++-----
 2 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/opts.go b/opts.go
index 46b5635..14a9c83 100644
--- a/opts.go
+++ b/opts.go
@@ -3,17 +3,16 @@ package gptscript
 // GlobalOptions allows specification of settings that are used for every call made.
 // These options can be overridden by the corresponding Options.
 type GlobalOptions struct {
-	URL                        string   `json:"url"`
-	Token                      string   `json:"token"`
-	OpenAIAPIKey               string   `json:"APIKey"`
-	OpenAIBaseURL              string   `json:"BaseURL"`
-	DefaultModel               string   `json:"DefaultModel"`
-	DefaultModelProvider       string   `json:"DefaultModelProvider"`
-	CacheDir                   string   `json:"CacheDir"`
-	Env                        []string `json:"env"`
-	DatasetToolRepo            string   `json:"DatasetToolRepo"`
-	WorkspaceTool              string   `json:"WorkspaceTool"`
-	WorkspaceDirectoryDataHome string   `json:"WorkspaceDirectoryDataHome"`
+	URL                  string   `json:"url"`
+	Token                string   `json:"token"`
+	OpenAIAPIKey         string   `json:"APIKey"`
+	OpenAIBaseURL        string   `json:"BaseURL"`
+	DefaultModel         string   `json:"DefaultModel"`
+	DefaultModelProvider string   `json:"DefaultModelProvider"`
+	CacheDir             string   `json:"CacheDir"`
+	Env                  []string `json:"env"`
+	DatasetToolRepo      string   `json:"DatasetToolRepo"`
+	WorkspaceTool        string   `json:"WorkspaceTool"`
 }
 
 func (g GlobalOptions) toEnv() []string {
@@ -30,9 +29,6 @@ func (g GlobalOptions) toEnv() []string {
 	if g.DefaultModelProvider != "" {
 		args = append(args, "GPTSCRIPT_SDKSERVER_DEFAULT_MODEL_PROVIDER="+g.DefaultModelProvider)
 	}
-	if g.WorkspaceDirectoryDataHome != "" {
-		args = append(args, "GPTSCRIPT_WORKSPACE_DIR="+g.WorkspaceDirectoryDataHome)
-	}
 
 	return args
 }
@@ -49,7 +45,6 @@ func completeGlobalOptions(opts ...GlobalOptions) GlobalOptions {
 		result.DefaultModelProvider = firstSet(opt.DefaultModelProvider, result.DefaultModelProvider)
 		result.DatasetToolRepo = firstSet(opt.DatasetToolRepo, result.DatasetToolRepo)
 		result.WorkspaceTool = firstSet(opt.WorkspaceTool, result.WorkspaceTool)
-		result.WorkspaceDirectoryDataHome = firstSet(opt.WorkspaceDirectoryDataHome, result.WorkspaceDirectoryDataHome)
 		result.Env = append(result.Env, opt.Env...)
 	}
 	return result
diff --git a/workspace.go b/workspace.go
index 2b73893..fc5bfff 100644
--- a/workspace.go
+++ b/workspace.go
@@ -8,11 +8,10 @@ import (
 
 func (g *GPTScript) CreateWorkspace(ctx context.Context, providerType string, fromWorkspaces ...string) (string, error) {
 	out, err := g.runBasicCommand(ctx, "workspaces/create", map[string]any{
-		"providerType":      providerType,
-		"fromWorkspaceIDs":  fromWorkspaces,
-		"workspaceTool":     g.globalOpts.WorkspaceTool,
-		"directoryDataHome": g.globalOpts.WorkspaceDirectoryDataHome,
-		"env":               g.globalOpts.Env,
+		"providerType":     providerType,
+		"fromWorkspaceIDs": fromWorkspaces,
+		"workspaceTool":    g.globalOpts.WorkspaceTool,
+		"env":              g.globalOpts.Env,
 	})
 	if err != nil {
 		return "", err