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

This commit is contained in:
rUv committed 2025-08-12 19:13:38 +00:00
1 parent aca1c19859
commit 0f8bc43796
3 files changed
+8 -6

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250812-191320", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T19:13:20Z", "type": "pre-edit", "original_branch": "alpha-89"}
+1
View File
@@ -0,0 +1 @@
{"tag": "checkpoint-20250812-191322", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T19:13:22Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++--- .claude/checkpoints/1755025976.json | 1 + .claude/checkpoints/1755025978.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/stream-chain.js | 46 ++++++++++++++++++++++++-------- 7 files changed, 65 insertions(+), 15 deletions(-) "}
+6 -6
View File
@@ -161,15 +161,15 @@ async function executeChainStep(prompt, inputData, isFirst, isLast, flags) {
// Pipe input data if available
if (!isFirst && inputData) {
try {
// Filter the input to remove system messages
const filteredInput = filterStreamJson(inputData);
// Transform the previous output into a proper user message for chaining
const transformedInput = transformStreamForChaining(inputData, prompt);
// Write the filtered output as input
claudeProcess.stdin.write(filteredInput);
// Write the transformed input
claudeProcess.stdin.write(transformedInput + '\n');
claudeProcess.stdin.end();
if (flags.verbose) {
console.log(' 🔗 Piped filtered input from previous step');
console.log(` Filtered ${inputData.split('\n').length} lines to ${filteredInput.split('\n').filter(l => l).length} lines`);
console.log(' 🔗 Piped transformed input from previous step');
console.log(` Transformed ${inputData.split('\n').length} lines into user message`);
}
} catch (error) {
console.error(' Error piping input:', error.message);