Compare commits

...
Author SHA1 Message Date
Arafatkatze 32236045b9 fix integration test 2025-11-05 13:44:29 -08:00
Arafatkatze e373b3f365 fix integration test 2025-11-05 13:43:58 -08:00
Arafatkatze 51ef073038 fix integration test 2025-11-05 13:42:19 -08:00
Arafatkatze d370d79c24 feat(terminal): implement byte-level output truncation with notices
Add byte-level truncation (256KB default) to terminal output to prevent
memory issues with large outputs. This complements the existing line-level
truncation with a two-tier approach:

- Byte-level truncation in TerminalProcess with informative notices
- Line-level truncation in TerminalManager for display purposes
- Truncation notices show limit size and omitted bytes in human-readable format
- Applied to both VSCode integration and standalone runtime

This prevents unbounded memory growth when terminals produce large outputs
while maintaining visibility into both the beginning and end of output streams.
2025-11-05 13:18:27 -08:00
@@ -127,9 +127,7 @@ class StandaloneTerminalProcess extends EventEmitter {
this.isHot = false
}, hotTimeout)
// Store full output
this.fullOutput += data
if (this.isListening) {
this.emitLines(data)
this.lastRetrievedIndex = this.fullOutput.length - this.buffer.length
@@ -437,7 +435,7 @@ class StandaloneTerminalManager {
return process ? process.isHot : false
}
processOutput(outputLines, overrideLimit, isSubagentCommand) {
processOutput(outputLines, overrideLimit, isSubagentCommand, truncationInfo) {
const limit = isSubagentCommand && overrideLimit ? overrideLimit : this.terminalOutputLineLimit
if (outputLines.length > limit) {
const halfLimit = Math.floor(limit / 2)