multi-agents-cli 1.0.83 → 1.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/workflow/agent.js +17 -6
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -172,16 +172,17 @@ const openIDE = (worktreePath) => {
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
// ── Open new OS terminal with Claude Code CLI ───────────────────────────────
|
|
175
|
-
const openTerminal = (worktreePath) => {
|
|
175
|
+
const openTerminal = (worktreePath, skipPermissions = false) => {
|
|
176
176
|
const termCmd = config.terminal && config.terminal.cmd;
|
|
177
177
|
if (!termCmd) return false;
|
|
178
|
+
const claudeCmd = skipPermissions ? 'claude --dangerously-skip-permissions' : 'claude';
|
|
178
179
|
try {
|
|
179
180
|
if (process.platform === 'darwin') {
|
|
180
|
-
execSync('osascript -e \'tell app "' + termCmd + '" to do script "cd \\"' + worktreePath + '\\" &&
|
|
181
|
+
execSync('osascript -e \'tell app "' + termCmd + '" to do script "cd \\"' + worktreePath + '\\" && ' + claudeCmd + '"\'', { stdio: 'pipe' });
|
|
181
182
|
} else if (process.platform === 'win32') {
|
|
182
|
-
execSync('start ' + termCmd + ' /k "cd /d ' + worktreePath + ' &&
|
|
183
|
+
execSync('start ' + termCmd + ' /k "cd /d ' + worktreePath + ' && ' + claudeCmd + '"', { stdio: 'pipe' });
|
|
183
184
|
} else {
|
|
184
|
-
execSync(termCmd + ' -- bash -c "cd \'' + worktreePath + '\' &&
|
|
185
|
+
execSync(termCmd + ' -- bash -c "cd \'' + worktreePath + '\' && ' + claudeCmd + '; exec bash" &', { stdio: 'pipe' });
|
|
185
186
|
}
|
|
186
187
|
return true;
|
|
187
188
|
} catch { return false; }
|
|
@@ -1407,6 +1408,16 @@ ${excludedUrls}
|
|
|
1407
1408
|
}, 600);
|
|
1408
1409
|
});
|
|
1409
1410
|
|
|
1411
|
+
const permIdx = await arrowSelect(
|
|
1412
|
+
'Grant agent full permissions for this session?',
|
|
1413
|
+
[
|
|
1414
|
+
{ label: `${green('→')} Yes — skip all permission prompts ${dim('(recommended for agent sessions)')}` },
|
|
1415
|
+
{ label: `${dim('→')} No — I'll approve each action manually` },
|
|
1416
|
+
],
|
|
1417
|
+
rl
|
|
1418
|
+
);
|
|
1419
|
+
const skipPermissions = permIdx === 0;
|
|
1420
|
+
|
|
1410
1421
|
sessionLoop: while (true) {
|
|
1411
1422
|
const sessionIdx = await arrowSelect('How would you like to start the session?', [
|
|
1412
1423
|
{ label: `${green('→')} IDE + new terminal ${dim('(Claude Code CLI)')} ${dim('← recommended')}` },
|
|
@@ -1419,7 +1430,7 @@ ${excludedUrls}
|
|
|
1419
1430
|
const openedIDE = openIDE(worktreePath);
|
|
1420
1431
|
if (openedIDE) console.log(` ${green('✓')} ${openedIDE} opened`);
|
|
1421
1432
|
else console.log(` ${yellow('!')} Could not open IDE - open manually at: ${dim(worktreePath)}`);
|
|
1422
|
-
const termOpened = openTerminal(worktreePath);
|
|
1433
|
+
const termOpened = openTerminal(worktreePath, skipPermissions);
|
|
1423
1434
|
if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
|
|
1424
1435
|
else console.log(` ${yellow('!')} Could not open terminal - run ${cyan('claude')} manually in: ${dim(worktreePath)}`);
|
|
1425
1436
|
console.log(`\n ${dim("This window can be closed.")}`);
|
|
@@ -1436,7 +1447,7 @@ ${excludedUrls}
|
|
|
1436
1447
|
process.exit(0);
|
|
1437
1448
|
|
|
1438
1449
|
} else if (sessionIdx === 2) {
|
|
1439
|
-
const termOpened = openTerminal(worktreePath);
|
|
1450
|
+
const termOpened = openTerminal(worktreePath, skipPermissions);
|
|
1440
1451
|
if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
|
|
1441
1452
|
console.log(`\n ${dim("This window can be closed.")}`);
|
|
1442
1453
|
rl.close();
|
package/package.json
CHANGED