fix: Show Token Usage Requires Double Open (#1947) (#1989)
Closes #1947
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixed the Show Token Usage button so it toggles on a single click.
Switched to a functional state updater to prevent stale state and double
toggles.
- **Bug Fixes**
- Replace setShowTokenBar(!showTokenBar) with a memoized toggle using
setShowTokenBar(prev => !prev) to ensure reliable toggle and immediate
active styling.
<sup>Written for commit e1351b9044a447515d4dc817cdff83fff50a57f4.
Summary will update automatically on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
正在显示
请
注册
或者
登录
后发表评论