From 0e74f5a7493d4c15f270771cc26e0ba3ca5f76b3 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 10 Apr 2026 15:53:20 +0900 Subject: [PATCH] fix(hooks): improve comment checker CLI runner Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/hooks/comment-checker/cli-runner.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/comment-checker/cli-runner.ts b/src/hooks/comment-checker/cli-runner.ts index 42cc19232..00f5a0411 100644 --- a/src/hooks/comment-checker/cli-runner.ts +++ b/src/hooks/comment-checker/cli-runner.ts @@ -47,6 +47,9 @@ export async function processWithCli( cliPath: string, customPrompt: string | undefined, debugLog: (...args: unknown[]) => void, + deps: { + runCommentChecker?: typeof runCommentChecker + } = {}, ): Promise { await withCommentCheckerLock(async () => { void input @@ -67,7 +70,7 @@ export async function processWithCli( }, } - const result = await runCommentChecker(hookInput, cliPath, customPrompt) + const result = await (deps.runCommentChecker ?? runCommentChecker)(hookInput, cliPath, customPrompt) if (result.hasComments && result.message) { debugLog("CLI detected comments, appending message")