mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 16:02:37 +00:00
Detach retained CI and terminal tails from oversized strings (#20960)
* fix(memory): detach retained CI and terminal tails from oversized strings * fix(terminal): detach retained error and reattach string slices * fix(terminal): release oversized recent-output backing strings * fix(terminal): release backing strings held by PTY detectors * fix(memory): own bounded Claude background task labels * fix: detach retained terminal mode scan tails * fix: own retained plugin worker output strings * fix: own incomplete OSC 133 carry strings --------- Co-authored-by: m4air <m4air@Mac.localdomain> Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { Readable } from 'node:stream'
|
||||
import { ownRetainedString } from '../../shared/own-retained-string'
|
||||
|
||||
type PluginWorkerOutputSink = (level: 'info' | 'warn' | 'error', line: string) => void
|
||||
|
||||
@@ -21,9 +22,11 @@ export function pipePluginWorkerOutput(
|
||||
if (line.trim().length > 0) {
|
||||
log(
|
||||
level,
|
||||
truncated
|
||||
? `${line.slice(0, PLUGIN_WORKER_OUTPUT_LINE_LIMIT - TRUNCATION_SUFFIX.length)}${TRUNCATION_SUFFIX}`
|
||||
: line
|
||||
ownRetainedString(
|
||||
truncated
|
||||
? `${line.slice(0, PLUGIN_WORKER_OUTPUT_LINE_LIMIT - TRUNCATION_SUFFIX.length)}${TRUNCATION_SUFFIX}`
|
||||
: line
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +52,7 @@ export function pipePluginWorkerOutput(
|
||||
buffered = ''
|
||||
discarding = newline === -1
|
||||
} else {
|
||||
buffered += segment
|
||||
buffered += newline === -1 ? ownRetainedString(segment) : segment
|
||||
if (newline !== -1) {
|
||||
emit(buffered)
|
||||
buffered = ''
|
||||
|
||||
Reference in New Issue
Block a user