refactor(context-window-recovery): split executor and storage into focused modules

Extract recovery strategies and storage management:
- recovery-strategy.ts, aggressive-truncation-strategy.ts
- summarize-retry-strategy.ts, target-token-truncation.ts
- empty-content-recovery.ts, message-builder.ts
- tool-result-storage.ts, storage-paths.ts, state.ts
- client.ts, tool-part-types.ts
This commit is contained in:
YeonGyu-Kim
2026-02-08 16:22:01 +09:00
parent 4c46e79311
commit a05ef99130
15 changed files with 762 additions and 679 deletions
@@ -0,0 +1,10 @@
import { join } from "node:path"
import { getOpenCodeStorageDir } from "../../shared/data-path"
const OPENCODE_STORAGE_DIR = getOpenCodeStorageDir()
export const MESSAGE_STORAGE_DIR = join(OPENCODE_STORAGE_DIR, "message")
export const PART_STORAGE_DIR = join(OPENCODE_STORAGE_DIR, "part")
export const TRUNCATION_MESSAGE =
"[TOOL RESULT TRUNCATED - Context limit exceeded. Original output was too large and has been truncated to recover the session. Please re-run this tool if you need the full output.]"