@@ -34,16 +34,10 @@ var initWorkspaceCommand = cli.Command{
3434}
3535
3636func handleInitWorkspace (ctx context.Context , cmd * cli.Command ) error {
37- titleStyle := lipgloss .NewStyle ().
38- Bold (true ).
39- Foreground (lipgloss .Color ("11" ))
40-
41- fmt .Printf ("%s\n " , titleStyle .Render ("workspace init" ))
42-
4337 // Check for existing workspace configuration
4438 existingConfig , existingPath , err := FindWorkspaceConfig ()
4539 if err == nil && existingConfig != nil {
46- fmt .Printf ("Existing workspace detected: %s (project: %s)\n " , aurora .Bold (existingPath ), existingConfig .ProjectName )
40+ fmt .Printf ("Existing workspace detected: %s (project: %s)\n " , aurora .Bold (existingPath ), existingConfig .Project )
4741 }
4842
4943 // Get current directory and show where the file will be written
@@ -182,7 +176,7 @@ func createProjectValidator(projectInfoMap map[string]projectInfo) func(string)
182176
183177// WorkspaceConfig stores workspace-level configuration
184178type WorkspaceConfig struct {
185- ProjectName string `json:"projectName "`
179+ Project string `json:"project "`
186180 OpenAPISpec string `json:"openapi_spec,omitempty"`
187181 StainlessConfig string `json:"stainless_config,omitempty"`
188182}
@@ -249,10 +243,10 @@ func SaveWorkspaceConfig(configPath string, config *WorkspaceConfig) error {
249243// GetProjectNameFromConfig returns the project name from workspace config if available
250244func GetProjectNameFromConfig () string {
251245 config , _ , err := FindWorkspaceConfig ()
252- if err != nil || config == nil || config .ProjectName == "" {
246+ if err != nil || config == nil || config .Project == "" {
253247 return ""
254248 }
255- return config .ProjectName
249+ return config .Project
256250}
257251
258252// InitWorkspaceConfig initializes a new workspace config in the current directory
@@ -265,7 +259,7 @@ func InitWorkspaceConfig(projectName, openAPISpec, stainlessConfig string) error
265259
266260 configPath := filepath .Join (dir , "stainless-workspace.json" )
267261 config := WorkspaceConfig {
268- ProjectName : projectName ,
262+ Project : projectName ,
269263 OpenAPISpec : openAPISpec ,
270264 StainlessConfig : stainlessConfig ,
271265 }
0 commit comments