fix(hooks): improve comment checker CLI runner
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -47,6 +47,9 @@ export async function processWithCli(
|
||||
cliPath: string,
|
||||
customPrompt: string | undefined,
|
||||
debugLog: (...args: unknown[]) => void,
|
||||
deps: {
|
||||
runCommentChecker?: typeof runCommentChecker
|
||||
} = {},
|
||||
): Promise<void> {
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user