File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -371,14 +371,14 @@ end
371371local function on_user_message_count_change (_ , new , old )
372372 local done_thinking = new == 0 and old > 0
373373 if config .hooks and config .hooks .on_done_thinking and done_thinking then
374- pcall (config .hooks .on_done_thinking )
374+ pcall (config .hooks .on_done_thinking , state . active_session )
375375 end
376376end
377377
378378local function on_current_permission_change (_ , new , old )
379379 local permission_requested = old == nil and new ~= nil
380380 if config .hooks and config .hooks .on_permission_requested and permission_requested then
381- pcall (config .hooks .on_permission_requested )
381+ pcall (config .hooks .on_permission_requested , state . active_session )
382382 end
383383end
384384
Original file line number Diff line number Diff line change 139139--- @class OpencodeHooks
140140--- @field on_file_edited ? fun ( file : string ): nil
141141--- @field on_session_loaded ? fun ( session : Session ): nil
142- --- @field on_done_thinking ? fun (): nil
143- --- @field on_permission_requested ? fun (): nil
142+ --- @field on_done_thinking ? fun ( session : Session ): nil
143+ --- @field on_permission_requested ? fun ( session : Session ): nil
144144
145145--- @class OpencodeProviders
146146--- @field [ string] string[]
You can’t perform that action at this time.
0 commit comments