feat: auto-approve commands in SOLO mode
This commit is contained in:
@@ -3108,6 +3108,12 @@ This gives the user a chance to refine requirements before implementation.
|
|||||||
const cmds = extractCommands(responseText);
|
const cmds = extractCommands(responseText);
|
||||||
if (cmds.length > 0) {
|
if (cmds.length > 0) {
|
||||||
setDetectedCommands(cmds);
|
setDetectedCommands(cmds);
|
||||||
|
// SOLO MODE: AUTO-APPROVE
|
||||||
|
if (soloMode) {
|
||||||
|
setMessages(prev => [...prev, { role: 'system', content: `🤖 **SOLO MODE**: Auto-executing ${cmds.length} detected command(s)...` }]);
|
||||||
|
// Execute immediately, bypassing UI prompt
|
||||||
|
handleExecuteCommands(true, cmds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract files logic continues...
|
// Extract files logic continues...
|
||||||
@@ -3265,7 +3271,7 @@ This gives the user a chance to refine requirements before implementation.
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleExecuteCommands = async (confirmed) => {
|
const handleExecuteCommands = async (confirmed, cmdsOverride = null) => {
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
setDetectedCommands([]);
|
setDetectedCommands([]);
|
||||||
return;
|
return;
|
||||||
@@ -3275,7 +3281,8 @@ This gives the user a chance to refine requirements before implementation.
|
|||||||
// setAppState('executing');
|
// setAppState('executing');
|
||||||
|
|
||||||
const results = [];
|
const results = [];
|
||||||
for (const cmd of detectedCommands) {
|
const cmdsToRun = cmdsOverride || detectedCommands;
|
||||||
|
for (const cmd of cmdsToRun) {
|
||||||
let finalCmd = cmd;
|
let finalCmd = cmd;
|
||||||
|
|
||||||
// FIX: Robustly handle input.ps1 execution with spaces in path
|
// FIX: Robustly handle input.ps1 execution with spaces in path
|
||||||
|
|||||||
Reference in New Issue
Block a user