-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: check quota correctly #6561
Conversation
Your org has enabled the Graphite merge queue for merging into canaryAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @darkskygit and the rest of your teammates on Graphite |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1b0864e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #6561 +/- ##
==========================================
- Coverage 61.79% 61.66% -0.13%
==========================================
Files 527 528 +1
Lines 25880 26047 +167
Branches 2316 2320 +4
==========================================
+ Hits 15993 16063 +70
- Misses 9612 9709 +97
Partials 275 275
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use copilot feature here to represent that the user has unlimited copilot permissions. I have a few questions.
- I don’t seem to see you giving users
copilot
feature in user subscription and unsubscription. - We seem to have used
copilot
feature to refer to the access rights of the workspace's AI Poc. Is there some confusion? - Such changes seem to result in us having two quota systems (
user.copilot.quota
anduser.quota
). I think we can reuse the previous quota service.
can we implement the quota as "free_ai_plan" and "paied_ai_plan",
When querying quota, merge ai plan with cloud plan:
{
...paied_ai_plan,
...pro_plan
}
The feature was originally designed to declare that "a user has a copilot feature", but it was temporarily used as an aipoc declaration. Because there was no serverConfig api before, the frontend could not know whether the server module was enabled (for example, in self hosted, captcha will be disable), so the |
According to the previous code, |
packages/backend/server/src/data/migrations/1713164714634-copilot-feature.ts
Outdated
Show resolved
Hide resolved
This can indeed cause confusion, already define a new feature |
One last thing, you should give the user the feature when the subscription is activated. |
fixed |
37af0f9
to
ea0bdde
Compare
a0c312d
to
2b6df81
Compare
Merge activity
|
2b6df81
to
1b0864e
Compare
No description provided.