File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -152,13 +152,9 @@ export function useCreationWorkspace({
152152
153153 try {
154154 // Wait for name generation to complete (blocks if still in progress)
155+ // Returns empty string if generation failed or manual name is empty (error already set in hook)
155156 const workspaceName = await waitForGeneration ( ) ;
156157 if ( ! workspaceName ) {
157- setToast ( {
158- id : Date . now ( ) . toString ( ) ,
159- type : "error" ,
160- message : "Failed to generate workspace name. Please enter a name manually." ,
161- } ) ;
162158 setIsSending ( false ) ;
163159 return false ;
164160 }
Original file line number Diff line number Diff line change @@ -166,8 +166,12 @@ export function useWorkspaceName(options: UseWorkspaceNameOptions): UseWorkspace
166166 } , [ ] ) ;
167167
168168 const waitForGeneration = useCallback ( async ( ) : Promise < string > => {
169- // If auto-generate is off, return the manual name
169+ // If auto-generate is off, return the manual name (or set error if empty)
170170 if ( ! autoGenerate ) {
171+ if ( ! manualName . trim ( ) ) {
172+ setError ( "Please enter a workspace name" ) ;
173+ return "" ;
174+ }
171175 return manualName ;
172176 }
173177
You can’t perform that action at this time.
0 commit comments