Skip to content

Commit ac95f5e

Browse files
committed
chore(topbar): remove redundant topbar renders
1 parent 77fb9fc commit ac95f5e

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

lua/opencode/core.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ function M.configure_provider()
209209
state.current_model = model_str
210210

211211
if state.windows then
212-
require('opencode.ui.topbar').render()
213212
ui.focus_input()
214213
else
215214
vim.notify('Changed provider to ' .. selection.display, vim.log.levels.INFO)

lua/opencode/ui/renderer.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,7 @@ end
752752
---Event handler for session.compacted events
753753
---@param properties {sessionID: string} Event properties
754754
function M.on_session_compacted(properties)
755-
vim.notify('on_session_compacted')
756-
-- TODO: render a note that the session was compacted
757-
-- FIXME: did we need unset state.last_sent_context because the
758-
-- session was compacted?
755+
vim.notify('Session has been compacted')
759756
end
760757

761758
---Event handler for session.updated events
@@ -764,7 +761,6 @@ function M.on_session_updated(properties)
764761
if not properties or not properties.info or not state.active_session then
765762
return
766763
end
767-
require('opencode.ui.topbar').render()
768764
if not vim.deep_equal(state.active_session.revert, properties.info.revert) then
769765
state.active_session.revert = properties.info.revert
770766
M._render_full_session_data(state.messages)
@@ -779,7 +775,6 @@ function M.on_session_error(properties)
779775
end
780776

781777
-- NOTE: we're handling message errors so session errors seem duplicative
782-
783778
if config.debug.enabled then
784779
vim.notify('Session error: ' .. vim.inspect(properties.error))
785780
end

lua/opencode/ui/ui.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ function M.clear_output()
170170
renderer.reset()
171171
output_window.clear()
172172
footer.clear()
173-
topbar.render()
174173
-- state.restore_points = {}
175174
end
176175

0 commit comments

Comments
 (0)