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:
OrcaWin
2026-09-17 20:34:19 -07:00
committed by GitHub
co-authored by m4air m4air
parent 57e28ccf7c
commit d04b05b5c8
57 changed files with 9130 additions and 18 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import {
} from './command-code-prompt-text'
import { stripTerminalControl } from './terminal-control-stripping'
import { escapeRegex } from './string-utils'
import { ownRetainedString } from './own-retained-string'
export { stripTerminalControl } from './terminal-control-stripping'
@@ -159,7 +160,7 @@ function rawChunkMayContainCommandCodeBanner(previousRawText: string, data: stri
function appendRecentRawText(previousRawText: string, data: string): string {
if (data.length >= RECENT_TEXT_LIMIT) {
return data.slice(-RECENT_TEXT_LIMIT)
return ownRetainedString(data.slice(-RECENT_TEXT_LIMIT))
}
return (previousRawText + data).slice(-RECENT_TEXT_LIMIT)
}