v1.8.2
Pre-releasePi Desktop v1.8.2 β Token Stats Fix π§
A patch release fixing stale token/cost display when switching between sessions via the content cache introduced in v1.8.1.
Note: This is a personal fork of
gustavonline/pi-desktop.
π Fixes
Token usage now resets on cached session switch
After v1.8.1's session content cache, switching between sessions could leave the token ring, cost, and context-usage display showing the previous session's values instead of the newly-selected session.
Root cause: the cache-hit path in prepareForSessionSwitch was pre-setting the session-file marker to the new session, which caused refreshFromBackend's session-boundary detection to skip its sessionStats reset (the marker matched the incoming session, so the code thought nothing changed). The stale token/cost values from the prior session persisted in the composer.
Fix: removed the pre-assignment so the boundary detection fires normally β sessionStats resets to nulls, then the async stats refresh repopulates with the correct session's data.
π¦ Download
This fork builds Windows (.exe) and macOS (.dmg).
β οΈ Unsigned builds
Windows: Click More info β Run anyway on SmartScreen.
macOS: xattr -cr "/Applications/Pi Desktop.app" after mounting.
βοΈ Requirements
- Pi Coding Agent CLI:
npm install -g @earendil-works/pi-coding-agent - Node.js β₯ 22
π Credits
Built on gustavonline/pi-desktop.
π License
MIT β see LICENSE.