Skip to content

Commit ac78e60

Browse files
pnupuclaude
andcommitted
fix(server): neutralize inherited history before it enters the bounded buffer
main now loads persisted history straight into BoundedTerminalHistory, so the neutralizer receives the buffer's text and the session gets a buffer rebuilt from the neutralized result. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 5ad8d06 commit ac78e60

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/server/src/terminal/Manager.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,12 @@ export const makeWithOptions = Effect.fn("TerminalManager.makeWithOptions")(func
26362636
const existing = yield* getSession(input.threadId, terminalId);
26372637
if (Option.isNone(existing)) {
26382638
yield* flushPersist(input.threadId, terminalId);
2639-
const history = neutralizeInheritedHistory(yield* readHistory(input.threadId, terminalId));
2639+
const inherited = yield* readHistory(input.threadId, terminalId);
2640+
const history = new BoundedTerminalHistory(
2641+
historyLineLimit,
2642+
neutralizeInheritedHistory(inherited.value()),
2643+
historyByteLimit,
2644+
);
26402645
const cols = input.cols ?? DEFAULT_OPEN_COLS;
26412646
const rows = input.rows ?? DEFAULT_OPEN_ROWS;
26422647
const session: TerminalSessionState = {

0 commit comments

Comments
 (0)