refactor(hashline): override native edit tool instead of separate tool + disabler hook

Replace 3-component hashline system (separate hashline_edit tool + edit
disabler hook + OpenAI-exempted read enhancer) with 2-component system
that directly overrides the native edit tool key, matching the
delegate_task pattern.

- Register hashline tool as 'edit' key to override native edit
- Delete hashline-edit-disabler hook (no longer needed)
- Delete hashline-provider-state module (no remaining consumers)
- Remove OpenAI exemption from read enhancer (explicit opt-in means all providers)
- Remove setProvider wiring from chat-params
This commit is contained in:
YeonGyu-Kim
2026-02-16 22:02:52 +09:00
parent 9eb786debd
commit af7b1ee620
15 changed files with 5 additions and 416 deletions
@@ -10,7 +10,6 @@ import {
createRulesInjectorHook,
createTasksTodowriteDisablerHook,
createWriteExistingFileGuardHook,
createHashlineEditDisablerHook,
createHashlineReadEnhancerHook,
} from "../../hooks"
import {
@@ -30,7 +29,6 @@ export type ToolGuardHooks = {
rulesInjector: ReturnType<typeof createRulesInjectorHook> | null
tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null
writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null
hashlineEditDisabler: ReturnType<typeof createHashlineEditDisablerHook> | null
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null
}
@@ -89,10 +87,6 @@ export function createToolGuardHooks(args: {
? safeHook("write-existing-file-guard", () => createWriteExistingFileGuardHook(ctx))
: null
const hashlineEditDisabler = isHookEnabled("hashline-edit-disabler")
? safeHook("hashline-edit-disabler", () => createHashlineEditDisablerHook(pluginConfig))
: null
const hashlineReadEnhancer = isHookEnabled("hashline-read-enhancer")
? safeHook("hashline-read-enhancer", () => createHashlineReadEnhancerHook(ctx, { hashline_edit: { enabled: pluginConfig.experimental?.hashline_edit ?? false } }))
: null
@@ -106,7 +100,6 @@ export function createToolGuardHooks(args: {
rulesInjector,
tasksTodowriteDisabler,
writeExistingFileGuard,
hashlineEditDisabler,
hashlineReadEnhancer,
}
}