File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ export const HookNameSchema = z.enum([
5959 "fsync-skip-warning" ,
6060 "plan-format-validator" ,
6161 "legacy-plugin-toast" ,
62+ "task-reminder" ,
6263] )
6364
6465export type HookName = z . infer < typeof HookNameSchema >
Original file line number Diff line number Diff line change @@ -68,3 +68,4 @@ export { createLegacyPluginToastHook } from "./legacy-plugin-toast"
6868export { createFsyncSkipWarningHook } from "./fsync-skip-warning"
6969export { createNotepadWriteGuardHook } from "./notepad-write-guard"
7070export { createPlanFormatValidatorHook } from "./plan-format-validator"
71+ export { createTaskReminderHook } from "./task-reminder"
Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ export function createEventHandler(args: {
332332 await runEventHookSafely ( "writeExistingFileGuard" , hooks . writeExistingFileGuard ?. event , input ) ;
333333 await runEventHookSafely ( "atlasHook" , hooks . atlasHook ?. handler , input ) ;
334334 await runEventHookSafely ( "autoSlashCommand" , hooks . autoSlashCommand ?. event , input ) ;
335+ await runEventHookSafely ( "taskReminder" , hooks . taskReminder ?. event , input ) ;
335336 } ;
336337
337338 const recentSyntheticIdles = new Map < string , number > ( ) ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 createPreemptiveCompactionHook ,
2929 createRuntimeFallbackHook ,
3030 createLegacyPluginToastHook ,
31+ createTaskReminderHook ,
3132} from "../../hooks"
3233import { createAnthropicEffortHook } from "../../hooks/anthropic-effort"
3334import {
@@ -65,6 +66,7 @@ export type SessionHooks = {
6566 anthropicEffort : ReturnType < typeof createAnthropicEffortHook > | null
6667 runtimeFallback : ReturnType < typeof createRuntimeFallbackHook > | null
6768 legacyPluginToast : ReturnType < typeof createLegacyPluginToastHook > | null
69+ taskReminder : ReturnType < typeof createTaskReminderHook > | null
6870}
6971
7072export function createSessionHooks ( args : {
@@ -276,6 +278,10 @@ export function createSessionHooks(args: {
276278 ? safeHook ( "legacy-plugin-toast" , ( ) => createLegacyPluginToastHook ( ctx ) )
277279 : null
278280
281+ const taskReminder = isHookEnabled ( "task-reminder" )
282+ ? safeHook ( "task-reminder" , ( ) => createTaskReminderHook ( ctx ) )
283+ : null
284+
279285 return {
280286 contextWindowMonitor,
281287 preemptiveCompaction,
@@ -301,5 +307,6 @@ export function createSessionHooks(args: {
301307 anthropicEffort,
302308 runtimeFallback,
303309 legacyPluginToast,
310+ taskReminder,
304311 }
305312}
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ export function createToolExecuteAfterHandler(args: {
181181 await hooks . fsyncSkipWarning ?. [ "tool.execute.after" ] ?.( hookInput , output )
182182 await hooks . jsonErrorRecovery ?. [ "tool.execute.after" ] ?.( hookInput , output )
183183 await hooks . planFormatValidator ?. [ "tool.execute.after" ] ?.( hookInput , output )
184+ await hooks . taskReminder ?. [ "tool.execute.after" ] ?.( hookInput , output )
184185 }
185186
186187 if ( input . tool === "extract" || input . tool === "discard" ) {
You can’t perform that action at this time.
0 commit comments