This PR ports the hashline edit tool from oh-my-pi to oh-my-opencode as an experimental feature. ## Features - New experimental.hashline_edit config flag - hashline_edit tool with 4 operations: set_line, replace_lines, insert_after, replace - Hash-based line anchors for safe concurrent editing - Edit tool disabler for non-OpenAI providers - Read output enhancer with LINE:HASH prefixes - Provider state tracking module ## Technical Details - xxHash32-based 2-char hex hashes - Bottom-up edit application to prevent index shifting - OpenAI provider exemption (uses native apply_patch) - 90 tests covering all operations and edge cases - All files under 200 LOC limit ## Files Added/Modified - src/tools/hashline-edit/ (7 files, ~400 LOC) - src/hooks/hashline-edit-disabler/ (4 files, ~200 LOC) - src/hooks/hashline-read-enhancer/ (3 files, ~400 LOC) - src/features/hashline-provider-state.ts (13 LOC) - src/config/schema/experimental.ts (hashline_edit flag) - src/config/schema/hooks.ts (2 new hook names) - src/plugin/tool-registry.ts (conditional registration) - src/plugin/chat-params.ts (provider state tracking) - src/tools/index.ts (export) - src/hooks/index.ts (exports)
48 lines
3.4 KiB
TypeScript
48 lines
3.4 KiB
TypeScript
export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
|
|
export { createContextWindowMonitorHook } from "./context-window-monitor";
|
|
export { createSessionNotification } from "./session-notification";
|
|
export { sendSessionNotification, playSessionNotificationSound, detectPlatform, getDefaultSoundPath } from "./session-notification-sender";
|
|
export { buildWindowsToastScript, escapeAppleScriptText, escapePowerShellSingleQuotedText } from "./session-notification-formatting";
|
|
export { hasIncompleteTodos } from "./session-todo-status";
|
|
export { createIdleNotificationScheduler } from "./session-notification-scheduler";
|
|
export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
|
|
export { createCommentCheckerHooks } from "./comment-checker";
|
|
export { createToolOutputTruncatorHook } from "./tool-output-truncator";
|
|
export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
|
|
export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
|
|
export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
|
|
|
|
export { createThinkModeHook } from "./think-mode";
|
|
export { createClaudeCodeHooksHook } from "./claude-code-hooks";
|
|
export { createRulesInjectorHook } from "./rules-injector";
|
|
export { createBackgroundNotificationHook } from "./background-notification"
|
|
export { createAutoUpdateCheckerHook } from "./auto-update-checker";
|
|
|
|
export { createAgentUsageReminderHook } from "./agent-usage-reminder";
|
|
export { createKeywordDetectorHook } from "./keyword-detector";
|
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
|
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
export { createCategorySkillReminderHook } from "./category-skill-reminder";
|
|
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
export { createAutoSlashCommandHook } from "./auto-slash-command";
|
|
export { createEditErrorRecoveryHook } from "./edit-error-recovery";
|
|
export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
|
|
export { createSisyphusJuniorNotepadHook } from "./sisyphus-junior-notepad";
|
|
export { createTaskResumeInfoHook } from "./task-resume-info";
|
|
export { createStartWorkHook } from "./start-work";
|
|
export { createAtlasHook } from "./atlas";
|
|
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
|
|
export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
|
|
export { createStopContinuationGuardHook, type StopContinuationGuard } from "./stop-continuation-guard";
|
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
export { createCompactionTodoPreserverHook } from "./compaction-todo-preserver";
|
|
export { createUnstableAgentBabysitterHook } from "./unstable-agent-babysitter";
|
|
export { createPreemptiveCompactionHook } from "./preemptive-compaction";
|
|
export { createTasksTodowriteDisablerHook } from "./tasks-todowrite-disabler";
|
|
export { createWriteExistingFileGuardHook } from "./write-existing-file-guard";
|
|
export { createHashlineEditDisablerHook } from "./hashline-edit-disabler";
|
|
export { createHashlineReadEnhancerHook } from "./hashline-read-enhancer";
|