mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 06:06:02 +09:00
🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/hive-mind.js
This commit is contained in:
1 parent
2ccc9e7bde
commit
d13954493e
2 files changed
+15
-11
No files matched your search
@@ -0,0 +1 @@
|
||||
{"checkpoint": "task-20250812-145716", "task": "the non-interactive args don't seem to insert the default prompt in the same way the interactive cla", "timestamp": "2025-08-12T14:57:17Z", "commit": "c7ec78db0d947c344decb1678976133988fbebf0", "github_release": "true"}
|
||||
@@ -2005,10 +2005,18 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
|
||||
// Respect --non-interactive flag regardless of --claude
|
||||
const isNonInteractive = flags['non-interactive'] || flags.nonInteractive;
|
||||
|
||||
// Pass the prompt directly as an argument to claude
|
||||
const claudeArgs = [hiveMindPrompt];
|
||||
// Build arguments in correct order: flags first, then prompt
|
||||
const claudeArgs = [];
|
||||
|
||||
// Add non-interactive flags FIRST if needed
|
||||
if (isNonInteractive) {
|
||||
claudeArgs.push('-p'); // Print mode
|
||||
claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
|
||||
claudeArgs.push('--verbose'); // Verbose output
|
||||
console.log(chalk.cyan('🤖 Running in non-interactive mode'));
|
||||
}
|
||||
|
||||
// Add auto-permission flag by default for hive-mind mode (unless explicitly disabled)
|
||||
// Add auto-permission flag BEFORE the prompt
|
||||
if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
|
||||
claudeArgs.push('--dangerously-skip-permissions');
|
||||
if (!isNonInteractive) {
|
||||
@@ -2020,15 +2028,10 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
|
||||
}
|
||||
}
|
||||
|
||||
// Add non-interactive flags if needed
|
||||
if (isNonInteractive) {
|
||||
claudeArgs.push('-p'); // Print mode
|
||||
claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
|
||||
claudeArgs.push('--verbose'); // Verbose output
|
||||
console.log(chalk.cyan('🤖 Running in non-interactive mode'));
|
||||
}
|
||||
// Add the prompt as the LAST argument
|
||||
claudeArgs.push(hiveMindPrompt);
|
||||
|
||||
// Spawn claude with the prompt as the first argument
|
||||
// Spawn claude with properly ordered arguments
|
||||
const claudeProcess = childSpawn('claude', claudeArgs, {
|
||||
stdio: 'inherit',
|
||||
shell: false,
|
||||
|
||||
Reference in new issue
Block a user