Skip to content

Commit 8440dce

Browse files
code-yeongyuclaude
andauthored
fix(hooks): restore grep truncation by removing unused grep-output-truncator (#120)
The grep-output-truncator hook was never registered in index.ts, so grep output was not being truncated since commit 03a4501 which removed grep/Grep from tool-output-truncator's TRUNCATABLE_TOOLS list. - Remove unused grep-output-truncator.ts - Add "grep" and "Grep" back to tool-output-truncator's TRUNCATABLE_TOOLS Co-authored-by: Claude <[email protected]>
1 parent 5dba599 commit 8440dce

File tree

3 files changed

+2
-133
lines changed

3 files changed

+2
-133
lines changed

src/hooks/grep-output-truncator.ts

Lines changed: 0 additions & 131 deletions
This file was deleted.

src/hooks/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export { createContextWindowMonitorHook } from "./context-window-monitor";
33
export { createSessionNotification } from "./session-notification";
44
export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
55
export { createCommentCheckerHooks } from "./comment-checker";
6-
export { createGrepOutputTruncatorHook } from "./grep-output-truncator";
76
export { createToolOutputTruncatorHook } from "./tool-output-truncator";
87
export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
98
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";

src/hooks/tool-output-truncator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { PluginInput } from "@opencode-ai/plugin"
22
import { createDynamicTruncator } from "../shared/dynamic-truncator"
33

4-
// Note: "grep" and "Grep" are handled by dedicated grep-output-truncator.ts
54
const TRUNCATABLE_TOOLS = [
5+
"grep",
6+
"Grep",
67
"safe_grep",
78
"glob",
89
"Glob",

0 commit comments

Comments
 (0)