Fix issue where sending message to stdin during non-interactive long-running process would not relinquish control back over the exit command button

This commit is contained in:
Saoud Rizwan
2024-08-03 21:23:33 -04:00
parent bbdf66b45c
commit 09050b8800
2 changed files with 35 additions and 25 deletions

View File

@@ -41,7 +41,11 @@ export function combineCommandSequences(messages: ClaudeMessage[]): ClaudeMessag
combinedText += `\n${COMMAND_OUTPUT_STRING}`
didAddOutput = true
}
combinedText += "\n" + (messages[j].text || "")
// handle cases where we receive empty command_output (ie when extension is relinquishing control over exit command button)
const output = messages[j].text || ""
if (output.length > 0) {
combinedText += "\n" + output
}
}
j++
}