File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ function M.setup(windows)
9090
9191 -- for stats changes
9292 state .subscribe (' current_model' , on_change )
93+ state .subscribe (' active_session' , on_change )
9394 -- to show C-c message
9495 state .subscribe (' job_count' , on_job_count_changed )
9596 state .subscribe (' restore_points' , on_change )
Original file line number Diff line number Diff line change @@ -100,8 +100,10 @@ function M._setup_event_subscriptions(subscribe)
100100
101101 if subscribe then
102102 state .subscribe (' is_opencode_focused' , M .on_focus_changed )
103+ state .subscribe (' active_session' , M .on_session_changed )
103104 else
104105 state .unsubscribe (' is_opencode_focused' , M .on_focus_changed )
106+ state .unsubscribe (' active_session' , M .on_session_changed )
105107 end
106108end
107109
@@ -968,6 +970,10 @@ function M.on_focus_changed()
968970 end
969971end
970972
973+ function M .on_session_changed ()
974+ state .tokens_count = 0
975+ end
976+
971977--- Get all actions available at a specific line
972978--- @param line integer 1-indexed line number
973979--- @return table[] List of actions available at that line
You can’t perform that action at this time.
0 commit comments