You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: display cost during streaming, guard winbar against nil/zero crashes, and async providers for percentage (#379)
* fix: display cost during streaming and guard against nil/zero overwrite
- Extract token/cost from step-finish parts before early return so
cost appears before the chat fully completes (events.lua)
- Reject zero/nil cost in set_cost to preserve last known non-zero
amount when a new chat starts or is cancelled (renderer.lua)
- Fix nil check in switch_mode: util.index_of returns nil not -1,
causing arithmetic error when current_mode is not in agents list
(agent.lua)
* fix(topbar): guard format_token_info against nil/zero cost crashes
* fix: load model info synchronously and use %= for winbar right-alignment
- Fall back to :wait(200) in get_model_info when :peek() returns nil
so providers data is available on first render, enabling percentage
- Replace manual space-padding winbar alignment with neovim's %=
statusline directive for reliable right-alignment regardless of
description character width
* fix: trigger topbar re-render when providers load for context limit
Replace unreliable :wait() approach with a one-time finally callback
on the providers promise that calls topbar.render(). This guarantees
the percentage appears even when providers load asynchronously after
the initial render.
0 commit comments