Feat/perplexity plugin#138
Merged
Merged
Conversation
robinebers
reviewed
Feb 10, 2026
Owner
robinebers
left a comment
There was a problem hiding this comment.
Thanks for the contribution - this plugin is a strong start, and docs/tests are clear. I’m an AI code reviewer helping with this PR, and I found one important fix before merge:
- In
plugin.js, when usage analytics cannot be fetched, the code falls back toused = 0(sumUsageCostUsd(...) || 0). This can show a false "$0 used" value when data is actually unavailable (for example, Cloudflare or API errors). Please handle this as "usage unavailable" (or throw a clear message) instead of defaulting to zero.
Contributor
Author
|
The changes have been applied: unavailable usage data is now handled explicitly instead of defaulting to $0, with tests added to cover this case. |
Owner
|
One last thing, the then I think we're ready to merge (subject to final review and test) |
Contributor
Author
|
I think is done now, let me know if wee need any other improvements! |
robinebers
approved these changes
Feb 10, 2026
Owner
robinebers
left a comment
There was a problem hiding this comment.
Tested and verified, thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds support for Perplexity usage tracking to the project. It introduces a new Perplexity plugin that reads local session data from the Perplexity macOS app cache, queries the REST API for balance and usage analytics, and displays usage information in the menu bar. The implementation includes robust handling of local cache formats, authentication, and fallback logic for reading SQLite databases. Comprehensive documentation and tests are also provided.
Perplexity Plugin Implementation:
Added a new Perplexity plugin (
plugin.js,plugin.json) that:Added a test suite (
plugin.test.js) to cover:Documentation:
README.mdto include Perplexity as a supported provider.SQLite Access Improvements:
immutable=1if WAL/SHM locks are encountered (common after macOS sleep).Related Issue
Link to the issue this PR addresses: Fixes #122
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passbun tauri devScreenshots
Checklist
mainbranchSummary by cubic
Adds a Perplexity provider that shows balance and spend in the menu bar using the macOS app’s local session. Improves SQLite reads to handle WAL/SHM locks with clearer errors and avoids false $0 usage when analytics are blocked; fixes #122.
New Features
Refactors
Written for commit 5a44815. Summary will update on new commits.