Migrate AI features from Advanced to Pro plan#4844
Conversation
|
@copilot I have a question for you. "explain-hanges" and "generate-create-cloudPatch", "generate-create-codeSuggestion" used to be in |
Good catch! You're absolutely right. Those three features ( The semantic difference is that These three features were originally in Fixed in commit aa4458f. |
|
@copilot I want you also to generate a note to the Changelog |
Added a CHANGELOG entry under the "Changed" section documenting that AI features now require GitLens Pro instead of GitLens Advanced. Committed in 89b3a1b. |
|
@copilot Look at other notes, they all are referenced to issues but your is not |
You're right - the entry should include an issue reference. Could you provide the issue number for this change so I can update the CHANGELOG entry to follow the format: |
|
@copilot You've initially been assigned to an issue and created this pull request that is linked to the issue that it solves, so you should probably know the issue |
I apologize, but I don't see the issue number in my available context. The environment variable Could you let me know the issue number? I'll immediately update the CHANGELOG entry to include it in the proper format. |
|
@copilot but you see the number of the current PR do not you? |
Include PR #4844 reference in the CHANGELOG entry for AI features migration to Pro plan Co-authored-by: sergeibbb <83944326+sergeibbb@users.noreply.github.com>
|
@copilot Rigth the PR is 4844, and it's linked to its issue. Can you use GitHub API to retrieve information about the linked issue? |
I attempted to retrieve the linked issue information using the GitHub API, but I'm encountering two blockers:
Without API access or authentication, I cannot programmatically retrieve the linked issue number. Could you provide the issue number, or if you have access to grant API permissions, I can retry the lookup? Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Can you replace last three commits where you edited Changelog with a one? |
I understand you'd like to squash the three CHANGELOG commits into one for a cleaner history. However, I'm unable to perform this operation because:
The three commits are:
To squash these commits, you would need to:
Would you like me to proceed with the PR as-is, or would you prefer to handle the squashing yourself? |
- Update feature type definitions to move all AdvancedAIFeatures to ProAIFeatures - Update isAdvancedFeature to return false (no AI features are advanced anymore) - Update isProFeatureOnAllRepos to include all AI features - Update ensureFeatureAccess to always use 'pro' plan for AI features - Update aiProviderService to remove Advanced plan references - Remove unused isAdvancedFeature imports PLG-156, #4843, #4844
f8529e5 to
9aff856
Compare
| export type AdvancedFeatures = never; | ||
| export type AdvancedAIFeatures = never; | ||
|
|
There was a problem hiding this comment.
Is there a reason we are still keeping these around as never instead of just removing them?
| switch (feature) { | ||
| case 'explain-changes': | ||
| case 'generate-changelog': | ||
| case 'generate-create-cloudPatch': | ||
| case 'generate-create-codeSuggestion': | ||
| case 'generate-create-pullRequest': | ||
| case 'generate-commits': | ||
| // case 'generate-searchQuery': | ||
| return true; | ||
| default: | ||
| return false; | ||
| } | ||
| // AI features are no longer advanced features - they are all Pro features now | ||
| return false; |
There was a problem hiding this comment.
If we have no Advanced features, why do we still need this function? Also, the comment about AI features is unnecessary in this function since its scope is greater than a specific feature subset.
There was a problem hiding this comment.
Eric mentioned that I should not change any logic in other code, only move feature around the types and isAdvanced/isPro functions. This function is used all over the application. Therefore I'm going to:
- keep the function returning "false"
- remove the comment since the empty function is self-explanatory.
- return the "is" logic that was deleted in other files.
- remove
type AdvancedAIFeatures=never, as you said, since it's unnecessary. - But I'd rather keep
type AdvancedFeature=neverand keep it as the type of this function:function isAdvancedFeature(feature: PlusFeatures): feature is AdvancedFeatures. Yes, we could convert it to justfunction isAdvancedFeature(feature: PlusFeatures): feature is never, but it seems like keepingAdvancedFeaturestype adds "self-explanation" to it, and also the type is a placeholder for future features that tells the developer that they should go here, at type AdvancedFeatures =never"your-new-advanced-feature". But if you think it's better to remove thetype Advanced Features=neveras well, I can do it.
Do you agree with my proposal?
cc @eamodio
There was a problem hiding this comment.
Ok, I think I understand the intent better after reading @eamodio's review. Your plan here sounds ok to me.
eamodio
left a comment
There was a problem hiding this comment.
We should not be removing all the mechanics here -- we should just move the features from to the AdvancedAIFeatures type to the ProAIFeatures type (and fix the isProFeature/isAdvanced functions
- Update feature type definitions to move all AdvancedAIFeatures to ProAIFeatures - Update isAdvancedFeature to return false (no AI features are advanced anymore) - Update isProFeatureOnAllRepos to include all AI features - Update ensureFeatureAccess to always use 'pro' plan for AI features - Update aiProviderService to remove Advanced plan references - Remove unused isAdvancedFeature imports PLG-156, #4843, #4844
9aff856 to
4f0d183
Compare
I've returned all the code back. Do you think I should keep the |
- Update feature type definitions to move all AdvancedAIFeatures to ProAIFeatures - Update isAdvancedFeature to return false (no AI features are advanced anymore) - Update isProFeatureOnAllRepos to include all AI features - Update ensureFeatureAccess to always use 'pro' plan for AI features - Update aiProviderService to remove Advanced plan references - Remove unused isAdvancedFeature imports PLG-156, #4843, #4844
Plan: Make AI Features Lead to PRO Checkout Instead of Advanced
src/features.tsto move Advanced AI features to ProisAdvancedFeaturefunction to exclude AI featuresisProFeatureOnAllReposto include new Pro AI featuressrc/plus/gk/utils/-webview/acount.utils.tssrc/plus/ai/aiProviderService.tsSummary
All AI features that previously required the "Advanced" plan now require the "Pro" plan instead. This includes:
generate-changelog- Generate changelog from commitsgenerate-create-pullRequest- Generate pull request descriptionsgenerate-commits- Generate commit messagesgenerate-searchQuery- AI-powered searchAdditionally,
explain-changes,generate-create-cloudPatch, andgenerate-create-codeSuggestionare now properly included inisProFeatureOnAllRepos()to maintain their behavior of requiring Pro subscription for all repositories.Changes Made:
AdvancedAIFeaturestoProAIFeaturesisAdvancedFeature()to return falseisProFeatureOnAllRepos()to include ALL Pro AI features (including the 3 that were missing)All changes have been validated with successful build, linting, code review, and security checks.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.