Conversation
…age to handle workspace validation
…d terms in multiple languages
… update existing icons for consistency
…nd improve type safety in quota panel component
…n model provider page and credential panel
Summary of ChangesHello @CodingOnStar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new system for managing and displaying 'total credits' within the application, primarily impacting the model provider settings page. It integrates new icons for a broader range of LLM providers, updates the core workspace data structure to track trial credits and their usage, and refactors the UI to present a clear, consolidated view of available credits and supported models. These changes aim to enhance the user experience by providing better visibility into credit consumption and streamlining the process of configuring and utilizing various language models, especially in cloud environments. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new total credit pool for various models, refactoring the model provider page to display this information centrally. It also adds several new icons for providers like Tongyi, Gemini, and Grok. The implementation looks solid, with a new QuotaPanel component that shows the total credits and allows users to install missing model providers. I have a few suggestions to improve code quality and correctness.
...mponents/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx Outdated Show resolved Hide resolved
web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx Outdated Show resolved Hide resolved
…ty in CredentialPanel component
There was a problem hiding this comment.
Pull request overview
This PR adds a unified total credit pool system for multiple LLM providers (OpenAI, Anthropic, Gemini, xAI, DeepSeek, and Tongyi). The changes include new workspace properties for tracking credits, a redesigned quota panel component that displays credits with provider icons, and updated translations across multiple languages.
Key Changes:
- Added credit tracking fields to workspace model (trial_credits, trial_credits_used, next_credit_reset_date)
- Completely refactored QuotaPanel from per-provider display to unified credit pool with provider icon indicators
- Updated translations to reflect the new multi-provider credit system
- Added new LLM provider icons (Gemini, xAI/Grok, DeepSeek, Tongyi, and variants of OpenAI and Anthropic icons)
Reviewed changes
Copilot reviewed 40 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/models/common.ts | Added three new fields to ICurrentWorkspace for credit tracking |
| web/context/app-context.tsx | Added isValidatingCurrentWorkspace state and default credit values |
| web/app/components/header/account-setting/model-provider-page/utils.ts | Refactored to use enum for provider constants and added model name mappings |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx | Complete rewrite from per-provider quota display to unified credit pool with provider icons |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx | Removed individual QuotaPanel rendering, renamed showQuota to showModelProvider |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx | Wrapped priority selector with IS_CLOUD_EDITION check |
| web/app/components/header/account-setting/model-provider-page/index.tsx | Added QuotaPanel at page level with IS_CLOUD_EDITION guard and workspace revalidation |
| web/i18n/*.json | Updated translations for credit system across en-US, zh-Hans, ja-JP |
| web/app/components/base/icons/src/public/llm/* | Added new LLM provider icon assets and exports |
| web/app/components/billing/apps-full-in-dialog/index.spec.tsx | Added new credit fields to test mock data |
| web/app/components/plugins/provider-card.tsx | Simplified onSuccess callback |
| web/app/components/base/icons/src/public/tracing/* | Fixed ref type and JSON structure in icon files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...pp/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx Show resolved Hide resolved
This reverts commit cd1af04.
Summary
add new model total credit pool
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods