+ {/* Current File Path Bar */}
+
+
+
+ {selectedFile || 'Select a file'}
+
+
+
+ {/* Diff Viewer */}
+
+
+ handleUnsavedChanges(selectedFile, hasChanges) : undefined
+ }
+ onSavingStateChange={
+ selectedFile ? (isSaving) => handleSavingStateChange(selectedFile, isSaving) : undefined
+ }
+ onOpenFile={(filename, lineNumber) => {
+ openFileInTab(filename)
+ // TODO: Optionally scroll to lineNumber after opening
+ }}
+ onFileLoaded={handleFileLoaded}
+ onSaveSuccess={handleSaveSuccess}
+ />
+
+
+
+
+ {/* Preview Toolbar */}
+
+
+ {task.sandboxUrl ? (
+
+ {task.sandboxUrl}
+
+ ) : (
+
+ {currentStatus === 'pending' || currentStatus === 'processing'
+ ? 'Creating sandbox...'
+ : 'Sandbox not running'}
+
+ )}
-
- {selectedFile || 'Select a file'}
-
-
-
- {/* Diff Viewer */}
-
-
- handleUnsavedChanges(selectedFile, hasChanges) : undefined
- }
- onSavingStateChange={
- selectedFile ? (isSaving) => handleSavingStateChange(selectedFile, isSaving) : undefined
- }
- onOpenFile={(filename, lineNumber) => {
- openFileInTab(filename)
- // TODO: Optionally scroll to lineNumber after opening
- }}
- onFileLoaded={handleFileLoaded}
- onSaveSuccess={handleSaveSuccess}
- />
-
-
-
- ) : activeTab === 'chat' ? (
-
-
-
- ) : activeTab === 'preview' ? (
-
-
- {/* Preview Toolbar */}
-
-
- {task.sandboxUrl ? (
-
- {task.sandboxUrl}
-
+
-
-
-
-
-
-
-
- {task.keepAlive && (
+
+ {isRestartingDevServer ? (
<>
- {task.sandboxUrl ? (
-
- {isStoppingSandbox ? (
- <>
-
- Stopping...
- >
- ) : (
- 'Stop Sandbox'
- )}
-
- ) : (
-
- {isStartingSandbox ? (
- <>
-
- Starting...
- >
- ) : (
- 'Start Sandbox'
- )}
-
- )}
+
+ Restarting...
>
+ ) : (
+ 'Restart Dev Server'
)}
-
- {isRestartingDevServer ? (
+
+
+
+
+ {task.sandboxUrl ? (
+
+ {sandboxHealth === 'running' ? (
+
+ ) : null}
+ {sandboxHealth === 'starting' && (
+
+
+
+
Starting dev server...
+
+
+ )}
+ {sandboxHealth === 'stopped' && (
+
+
+
+
Sandbox Stopped
+
Start a new sandbox from the menu above
+
+
+ )}
+ {sandboxHealth === 'error' && (
+
+
+
+
Application Error
+
The dev server encountered an error
+
+
+ )}
+
+ ) : (
+
+
+ {currentStatus === 'pending' || currentStatus === 'processing' ? (
+ <>
+
+
Creating sandbox...
+
The preview will appear here once the dev server starts
+ >
+ ) : (
+ <>
+
Sandbox not running
+
+ {task.keepAlive
+ ? 'Start the sandbox to view the preview'
+ : 'This task does not have keep-alive enabled'}
+
+ >
+ )}
+ {task.keepAlive && !task.sandboxUrl && (
+
+ {isStartingSandbox ? (
<>
- Restarting...
+ Starting...
>
) : (
- 'Restart Dev Server'
+ 'Start Sandbox'
)}
-
-
-
-
- {task.sandboxUrl ? (
-
- {sandboxHealth === 'running' ? (
-
- ) : null}
- {sandboxHealth === 'starting' && (
-
-
-
-
Starting dev server...
-
-
- )}
- {sandboxHealth === 'stopped' && (
-
-
-
-
Sandbox Stopped
-
Start a new sandbox from the menu above
-
-
- )}
- {sandboxHealth === 'error' && (
-
-
-
-
Application Error
-
The dev server encountered an error
-
-
+
)}
- ) : (
-
-
- {currentStatus === 'pending' || currentStatus === 'processing' ? (
- <>
-
-
Creating sandbox...
-
The preview will appear here once the dev server starts
- >
- ) : (
- <>
-
Sandbox not running
-
- {task.keepAlive
- ? 'Start the sandbox to view the preview'
- : 'This task does not have keep-alive enabled'}
-
- >
- )}
- {task.keepAlive && !task.sandboxUrl && (
-
- {isStartingSandbox ? (
- <>
-
- Starting...
- >
- ) : (
- 'Start Sandbox'
- )}
-
- )}
-
-
- )}
-
+
+ )}
- ) : null}
+