Conversation
This commit introduces support for checking quota usage for Claude (Anthropic) accounts. - **Add Claude API constants:** Define `CLAUDE_USAGE_URL` and `CLAUDE_HEADERS` in `src/constants/api.ts` to facilitate API requests to Anthropic. - **Integrate Claude into provider display:** Update `useProvidersPresenter.ts` to include 'anthropic' and 'other' as recognized providers, allowing Claude files to be grouped and displayed correctly in the UI. - **Extend quota presenter logic:** Modify `useQuotaPresenter.ts` to recognize 'anthropic' as a provider type, add its icon mapping, and include it in the list of displayed providers. - **Implement Claude quota fetching:** Add a new `fetchClaude` method to `quota.service.ts` to handle API calls to the Claude usage endpoint. - **Create Claude parser:** Introduce `src/services/api/parsers/claude.parser.ts` to parse the response from the Claude usage API into a standardized `ClaudeQuotaResult` format. - **Update quota types:** Add `ClaudeQuotaResult` interface to `src/types/quota.ts` to define the structure of Claude quota data.
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.
This commit introduces support for checking quota usage for Claude (Anthropic) accounts.
CLAUDE_USAGE_URLandCLAUDE_HEADERSinsrc/constants/api.tsto facilitate API requests to Anthropic.useProvidersPresenter.tsto include 'anthropic' and 'other' as recognized providers, allowing Claude files to be grouped and displayed correctly in the UI.useQuotaPresenter.tsto recognize 'anthropic' as a provider type, add its icon mapping, and include it in the list of displayed providers.fetchClaudemethod toquota.service.tsto handle API calls to the Claude usage endpoint.src/services/api/parsers/claude.parser.tsto parse the response from the Claude usage API into a standardizedClaudeQuotaResultformat.ClaudeQuotaResultinterface tosrc/types/quota.tsto define the structure of Claude quota data.