Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

πŸ”– Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/concurrent-display.js

rUv43d3351e302f
diff --git a/.claude/checkpoints/1754341840.json b/.claude/checkpoints/1754341840.json
new file mode 100644
index 0000000000..a0f3ea973f
--- /dev/null
+++ b/.claude/checkpoints/1754341840.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250804-211040", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/concurrent-display.js", "timestamp": "2025-08-04T21:10:40Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/.claude/checkpoints/1754341842.json b/.claude/checkpoints/1754341842.json
new file mode 100644
index 0000000000..128d629183
--- /dev/null
+++ b/.claude/checkpoints/1754341842.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250804-211042", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/concurrent-display.js", "timestamp": "2025-08-04T21:10:42Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/task-1754341836.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/concurrent-display.js | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) "}
diff --git a/src/cli/simple-commands/concurrent-display.js b/src/cli/simple-commands/concurrent-display.js
index 6c2c393bb6..4d726f941d 100644
--- a/src/cli/simple-commands/concurrent-display.js
+++ b/src/cli/simple-commands/concurrent-display.js
@@ -38,7 +38,7 @@ export class ConcurrentDisplay {
*/
start() {
// Clear screen and hide cursor
- console.log('\x1B[2J\x1B[H\x1B[?25l');
+ process.stdout.write('\x1B[2J\x1B[H\x1B[?25l');
this.interval = setInterval(() => {
this.render();
@@ -46,9 +46,15 @@ export class ConcurrentDisplay {
// Restore cursor on exit
process.on('exit', () => {
- console.log('\x1B[?25h'); // Show cursor
+ process.stdout.write('\x1B[?25h'); // Show cursor
this.stop();
});
+
+ // Handle SIGINT/SIGTERM
+ process.on('SIGINT', () => {
+ this.stop();
+ process.exit(0);
+ });
}
/**
@@ -59,7 +65,7 @@ export class ConcurrentDisplay {
clearInterval(this.interval);
this.interval = null;
}
- console.log('\x1B[?25h'); // Show cursor
+ process.stdout.write('\x1B[?25h'); // Show cursor
}
/**
@@ -122,9 +128,9 @@ export class ConcurrentDisplay {
*/
renderHeader() {
const width = this.options.maxWidth;
- console.log('β•”' + '═'.repeat(width - 2) + 'β•—');
- console.log('β•‘' + this.center('πŸ€– MLE-STAR CONCURRENT AGENT EXECUTION', width - 2) + 'β•‘');
- console.log('β• ' + '═'.repeat(width - 2) + 'β•£');
+ process.stdout.write('β•”' + '═'.repeat(width - 2) + 'β•—\n');
+ process.stdout.write('β•‘' + this.center('πŸ€– CONCURRENT AGENTS', width - 2) + 'β•‘\n');
+ process.stdout.write('β• ' + '═'.repeat(width - 2) + 'β•£\n');
}
/**
@@ -132,7 +138,7 @@ export class ConcurrentDisplay {
*/
renderAgentPanels(spinner) {
const agentArray = Array.from(this.agents.values());
- const columns = Math.min(3, agentArray.length); // Max 3 columns
+ const columns = Math.min(2, agentArray.length); // Max 2 columns for narrower display
const columnWidth = Math.floor((this.options.maxWidth - 4) / columns) - 2;
// Group agents by rows
@@ -154,7 +160,7 @@ export class ConcurrentDisplay {
}
line += ' β•‘';
- console.log(line);
+ process.stdout.write(line + '\n');
// Add separator between rows
if (row < rows - 1) {
@@ -164,7 +170,7 @@ export class ConcurrentDisplay {
if (col < columns - 1) separator += ' β”‚ ';
}
separator += ' β•‘';
- console.log(separator);
+ process.stdout.write(separator + '\n');
}
}
}
@@ -229,13 +235,13 @@ export class ConcurrentDisplay {
const failed = agents.filter(a => a.status === 'failed').length;
const total = agents.length;
- console.log('β• ' + '═'.repeat(width - 2) + 'β•£');
+ process.stdout.write('β• ' + '═'.repeat(width - 2) + 'β•£\n');
const progress = total > 0 ? Math.floor((completed + failed) / total * 100) : 0;
- const summary = `πŸ“Š Progress: ${progress}% (${completed}/${total}) β”‚ ⚑ Active: ${active} β”‚ βœ… Done: ${completed} β”‚ ❌ Failed: ${failed}`;
- console.log('β•‘' + this.center(summary, width - 2) + 'β•‘');
+ const summary = `πŸ“Š ${progress}% β”‚ ⚑${active} β”‚ βœ…${completed} β”‚ ❌${failed}`;
+ process.stdout.write('β•‘' + this.center(summary, width - 2) + 'β•‘\n');
- console.log('β•š' + '═'.repeat(width - 2) + '╝');
+ process.stdout.write('β•š' + '═'.repeat(width - 2) + '╝\n');
}
/**