We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6c54d commit b3b3b39Copy full SHA for b3b3b39
lua/opencode/ui/topbar.lua
@@ -103,15 +103,18 @@ function M.render()
103
end)
104
end
105
106
-local function on_mode_changed(_, _, _)
+local function on_change(_, _, _)
107
M.render()
108
109
110
function M.setup()
111
- state.subscribe('current_mode', on_mode_changed)
+ state.subscribe('current_mode', on_change)
112
+ state.subscribe('active_session', on_change)
113
114
115
-function M.close() end
116
-state.unsubscribe('current_mode', on_mode_changed)
+function M.close()
117
+ state.unsubscribe('current_mode', on_change)
118
+ state.unsubscribe('active_session', on_change)
119
+end
120
return M
0 commit comments