🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/concurrent-display.js

This commit is contained in:
rUv committed 2025-08-04 21:12:02 +00:00
1 parent 8812b1ea4e
commit 4e43da914c
3 files changed
+22 -17

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250804-211141", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/concurrent-display.js", "timestamp": "2025-08-04T21:11:41Z", "type": "pre-edit", "original_branch": "alpha-85"}
@@ -0,0 +1 @@
{"tag": "checkpoint-20250804-151309", "file": "/workspaces/claude-code-flow/mle-star-final-validation-summary.md", "timestamp": "2025-08-04T15:13:09Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " agentic-flow/.claude-flow/metrics/performance.json | 2 +- .../.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 mle-star-final-validation-summary.md | 233 +++++++++++++++++++++ 4 files changed, 237 insertions(+), 4 deletions(-) "}
+20 -17
View File
@@ -184,40 +184,36 @@ export class ConcurrentDisplay {
// Agent header with icon and name
const icon = this.getAgentIcon(agent.type);
const statusIcon = this.getStatusIcon(agent.status, spinner);
const header = `${icon} ${agent.name}`;
const shortName = agent.name.length > 20 ? agent.name.substring(0, 17) + '...' : agent.name;
const header = `${icon} ${shortName}`;
lines.push(this.truncate(`${statusIcon} ${header}`, width));
// Status line
// Status line with timer
const status = this.getStatusText(agent.status);
const elapsed = agent.startTime ? this.formatDuration(Date.now() - agent.startTime) : '--:--';
lines.push(this.truncate(`Status: ${status} │ ${elapsed}`, width));
lines.push(this.truncate(`${status} │ ${elapsed}`, width));
// Progress bar
// Progress bar (compact)
if (agent.status === 'active') {
lines.push(this.renderProgressBar(agent.progress, width));
const compactBar = this.renderCompactProgressBar(agent.progress, width - 10);
lines.push(this.truncate(`[${compactBar}] ${agent.progress}%`, width));
} else {
lines.push(' '.repeat(width));
}
// Current activity
// Current activity (shorter)
if (agent.lastActivity) {
lines.push(this.truncate(`→ ${agent.lastActivity}`, width));
const shortActivity = agent.lastActivity.length > 25 ? agent.lastActivity.substring(0, 22) + '...' : agent.lastActivity;
lines.push(this.truncate(`→ ${shortActivity}`, width));
} else {
lines.push(this.truncate('→ Waiting...', width));
}
// Tool usage
if (agent.currentTool && this.options.showTools) {
lines.push(this.truncate(`🔧 ${agent.currentTool}`, width));
} else {
lines.push(' '.repeat(width));
}
// Stats
// Stats only
lines.push(this.truncate(`Events: ${agent.events}`, width));
// Pad to consistent height
while (lines.length < 6) {
// Pad to consistent height (reduced from 6 to 5)
while (lines.length < 5) {
lines.push(' '.repeat(width));
}
@@ -291,6 +287,13 @@ export class ConcurrentDisplay {
return `[${'\u2588'.repeat(filled)}${'░'.repeat(empty)}] ${progress}%`;
}
renderCompactProgressBar(progress, maxWidth) {
const barWidth = Math.min(10, maxWidth);
const filled = Math.floor(progress / 100 * barWidth);
const empty = barWidth - filled;
return '\u2588'.repeat(filled) + '░'.repeat(empty);
}
truncate(text, width) {
if (text.length <= width) {
return text.padEnd(width);