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

This commit is contained in:
rUv committed 2025-08-05 03:32:37 +00:00
1 parent d7024858d6
commit fc2d1441a5
2 files changed
+27 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"checkpoint": "task-20250805-033218", "task": "{{user_prompt}} ", "timestamp": "2025-08-05T03:32:19Z", "commit": "42e924bdd72685a68bbd1dadcaf9cd3d6dd701c4", "github_release": "true"}
+26 -2
View File
@@ -112,9 +112,33 @@ export class StreamJsonProcessor extends Transform {
}
}
} else if (content.type === 'tool_use') {
// Show tool use concisely
// Show tool use with actual command/input when available
const toolName = content.name.replace(/([A-Z])/g, ' $1').trim();
console.log(`🔧 ${toolName}`);
// For Bash tool, show the actual command
if (content.name === 'Bash' && content.input?.command) {
const command = content.input.command;
if (command.length > 80) {
console.log(`🔧 Bash: ${command.substring(0, 77)}...`);
} else {
console.log(`🔧 Bash: ${command}`);
}
}
// For other tools, show key parameters
else if (content.input && Object.keys(content.input).length > 0) {
const firstKey = Object.keys(content.input)[0];
const firstValue = content.input[firstKey];
if (typeof firstValue === 'string' && firstValue.length < 60) {
console.log(`🔧 ${toolName}: ${firstValue}`);
} else if (typeof firstValue === 'string') {
console.log(`🔧 ${toolName}: ${firstValue.substring(0, 57)}...`);
} else {
console.log(`🔧 ${toolName}`);
}
} else {
console.log(`🔧 ${toolName}`);
}
}
}
break;