refactor: remove dcp_for_compaction and preemptive_compaction features

- Delete src/hooks/preemptive-compaction/ entirely
- Remove dcp_for_compaction from schema and executor
- Clean up related imports, options, and test code
- Update READMEs to remove experimental options docs
This commit is contained in:
justsisyphus
2026-01-16 10:51:59 +09:00
parent bf28b3e711
commit b933992e36
14 changed files with 32 additions and 418 deletions
+1 -11
View File
@@ -12,7 +12,7 @@ import {
createThinkModeHook,
createClaudeCodeHooksHook,
createAnthropicContextWindowLimitRecoveryHook,
createPreemptiveCompactionHook,
createCompactionContextInjector,
createRulesInjectorHook,
createBackgroundNotificationHook,
@@ -145,20 +145,11 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
)
? createAnthropicContextWindowLimitRecoveryHook(ctx, {
experimental: pluginConfig.experimental,
dcpForCompaction: pluginConfig.experimental?.dcp_for_compaction,
})
: null;
const compactionContextInjector = isHookEnabled("compaction-context-injector")
? createCompactionContextInjector()
: undefined;
const preemptiveCompaction = isHookEnabled("preemptive-compaction")
? createPreemptiveCompactionHook(ctx, {
experimental: pluginConfig.experimental,
onBeforeSummarize: compactionContextInjector,
getModelLimit: (providerID, modelID) =>
getModelLimit(modelCacheState, providerID, modelID),
})
: null;
const rulesInjector = isHookEnabled("rules-injector")
? createRulesInjectorHook(ctx)
: null;
@@ -420,7 +411,6 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
await rulesInjector?.event(input);
await thinkMode?.event(input);
await anthropicContextWindowLimitRecovery?.event(input);
await preemptiveCompaction?.event(input);
await agentUsageReminder?.event(input);
await interactiveBashSession?.event(input);
await ralphLoop?.event(input);