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 8dff42830c
commit 161d6e4159
15 changed files with 762 additions and 679 deletions
@@ -0,0 +1,33 @@
export type Client = {
session: {
messages: (opts: {
path: { id: string }
query?: { directory?: string }
}) => Promise<unknown>
summarize: (opts: {
path: { id: string }
body: { providerID: string; modelID: string }
query: { directory: string }
}) => Promise<unknown>
revert: (opts: {
path: { id: string }
body: { messageID: string; partID?: string }
query: { directory: string }
}) => Promise<unknown>
prompt_async: (opts: {
path: { id: string }
body: { parts: Array<{ type: string; text: string }> }
query: { directory: string }
}) => Promise<unknown>
}
tui: {
showToast: (opts: {
body: {
title: string
message: string
variant: string
duration: number
}
}) => Promise<unknown>
}
}