@@ -4,7 +4,6 @@ local M = {}
44
55local state = require (' opencode.state' )
66local config_file = require (' opencode.config_file' )
7- local prompt_guard_indicator = require (' opencode.ui.prompt_guard_indicator' )
87
98local LABELS = {
109 NEW_SESSION_TITLE = ' New session' ,
@@ -43,14 +42,10 @@ local function get_mode_highlight()
4342 end
4443end
4544
46- local function create_winbar_text (description , model_info , mode_info , show_guard_indicator , win_width )
45+ local function create_winbar_text (description , model_info , mode_info , win_width )
4746 local left_content = ' '
4847 local right_content = ' '
4948
50- if show_guard_indicator then
51- left_content = left_content .. prompt_guard_indicator .get_formatted () .. ' '
52- end
53-
5449 right_content = model_info .. ' ' .. get_mode_highlight () .. mode_info .. ' %*'
5550
5651 local desc_width = win_width - util .strdisplaywidth (left_content ) - util .strdisplaywidth (right_content )
@@ -110,14 +105,8 @@ function M.render()
110105 -- topbar needs to at least have a value to make sure footer is positioned correctly
111106 vim .wo [win ].winbar = ' '
112107
113- local show_guard_indicator = prompt_guard_indicator .is_denied ()
114- vim .wo [win ].winbar = create_winbar_text (
115- get_session_desc (),
116- format_model_info (),
117- format_mode_info (),
118- show_guard_indicator ,
119- vim .api .nvim_win_get_width (win )
120- )
108+ vim .wo [win ].winbar =
109+ create_winbar_text (get_session_desc (), format_model_info (), format_mode_info (), vim .api .nvim_win_get_width (win ))
121110
122111 update_winbar_highlights (win )
123112 end )
0 commit comments