this repo has no description

ignore non-write tools to eat less context during planning

karitham.dev a6b6190d 1ba8c82d

verified
+4 -2
+4 -2
src/index.ts
··· 84 84 85 85 /** 86 86 * Registry to track which rules have been read in each session. 87 - * Uses WeakMap for automatic cleanup when sessions are garbage collected. 88 87 */ 89 88 const sessionRulesRead = new Map<string, Set<string>>(); 90 89 ··· 185 184 }, 186 185 187 186 "tool.execute.before": async (input, output) => { 188 - const { sessionID } = input; 187 + const { sessionID, tool: toolName } = input; 189 188 const { args } = output; 190 189 191 190 if (!sessionID) return; 191 + 192 + // Only prompt for edit and write tools to avoid context bloat during research 193 + if (toolName !== "edit" && toolName !== "write") return; 192 194 193 195 const filePath = (args?.filePath as string) || (args?.path as string); 194 196 if (!filePath || typeof filePath !== "string") return;