feat(hooks): add empty-task-response-detector hook

This commit is contained in:
YeonGyu-Kim
2025-12-08 16:54:44 +09:00
parent 9ed23d4037
commit 6ece7476ef
2 changed files with 30 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import {
createGrepOutputTruncatorHook,
createPulseMonitorHook,
createDirectoryAgentsInjectorHook,
createEmptyTaskResponseDetectorHook,
} from "./hooks";
import { updateTerminalTitle } from "./features/terminal";
import { builtinTools } from "./tools";
@@ -57,6 +58,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const commentChecker = createCommentCheckerHooks();
const grepOutputTruncator = createGrepOutputTruncatorHook(ctx);
const directoryAgentsInjector = createDirectoryAgentsInjectorHook(ctx);
const emptyTaskResponseDetector = createEmptyTaskResponseDetectorHook(ctx);
updateTerminalTitle({ sessionId: "main" });
@@ -212,6 +214,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
await contextWindowMonitor["tool.execute.after"](input, output);
await commentChecker["tool.execute.after"](input, output);
await directoryAgentsInjector["tool.execute.after"](input, output);
await emptyTaskResponseDetector["tool.execute.after"](input, output);
if (input.sessionID === mainSessionID) {
updateTerminalTitle({