Spaces:
Running
Running
Commit ·
08f236e
1
Parent(s): e323945
commit initial 09-12-2025 012
Browse files- src/App.js +13 -14
src/App.js
CHANGED
|
@@ -115,7 +115,7 @@ ${currentFile.content}`
|
|
| 115 |
};
|
| 116 |
|
| 117 |
|
| 118 |
-
|
| 119 |
const editor = editorRef.current;
|
| 120 |
const selected = editor.getModel().getValueInRange(editor.getSelection());
|
| 121 |
const code = selected.trim() || currentFile.content;
|
|
@@ -225,20 +225,17 @@ ${code}`
|
|
| 225 |
)}
|
| 226 |
|
| 227 |
{/* Bottom Panels */}
|
| 228 |
-
<div className="ide-panels">
|
|
|
|
| 229 |
|
| 230 |
-
|
| 231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
-
|
| 234 |
-
<input
|
| 235 |
-
className="ide-input-box"
|
| 236 |
-
placeholder="Program input..."
|
| 237 |
-
value={stdin}
|
| 238 |
-
onChange={(e) => setStdin(e.target.value)}
|
| 239 |
-
/>
|
| 240 |
-
|
| 241 |
-
{/* NEW AI PROMPT INPUT */}
|
| 242 |
<textarea
|
| 243 |
className="ide-agent-textarea"
|
| 244 |
placeholder="Ask the AI (e.g., 'optimize', 'add docstring', 'convert to JS'...)"
|
|
@@ -260,7 +257,9 @@ ${code}`
|
|
| 260 |
))}
|
| 261 |
</div>
|
| 262 |
)}
|
| 263 |
-
</div>
|
|
|
|
|
|
|
| 264 |
|
| 265 |
{/* ==== SEARCH PANEL ==== */}
|
| 266 |
{searchOpen && (
|
|
|
|
| 115 |
};
|
| 116 |
|
| 117 |
|
| 118 |
+
const handleExplainSelection = async () => {
|
| 119 |
const editor = editorRef.current;
|
| 120 |
const selected = editor.getModel().getValueInRange(editor.getSelection());
|
| 121 |
const code = selected.trim() || currentFile.content;
|
|
|
|
| 225 |
)}
|
| 226 |
|
| 227 |
{/* Bottom Panels */}
|
| 228 |
+
<div className="ide-panels">
|
| 229 |
+
<pre className="ide-output">{output}</pre>
|
| 230 |
|
| 231 |
+
<input
|
| 232 |
+
className="ide-input-box"
|
| 233 |
+
placeholder="Program input..."
|
| 234 |
+
value={stdin}
|
| 235 |
+
onChange={(e) => setStdin(e.target.value)}
|
| 236 |
+
/>
|
| 237 |
|
| 238 |
+
{/* NEW AI PROMPT INPUT */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
<textarea
|
| 240 |
className="ide-agent-textarea"
|
| 241 |
placeholder="Ask the AI (e.g., 'optimize', 'add docstring', 'convert to JS'...)"
|
|
|
|
| 257 |
))}
|
| 258 |
</div>
|
| 259 |
)}
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
</div>
|
| 263 |
|
| 264 |
{/* ==== SEARCH PANEL ==== */}
|
| 265 |
{searchOpen && (
|