Skip to content

Migrate AI features from Advanced to Pro plan#4844

Merged
sergeibbb merged 3 commits intomainfrom
copilot/update-ai-features-to-pro
Jan 7, 2026
Merged

Migrate AI features from Advanced to Pro plan#4844
sergeibbb merged 3 commits intomainfrom
copilot/update-ai-features-to-pro

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Plan: Make AI Features Lead to PRO Checkout Instead of Advanced

  • Explore repository to understand current implementation
  • Update feature type definitions in src/features.ts to move Advanced AI features to Pro
  • Update isAdvancedFeature function to exclude AI features
  • Update isProFeatureOnAllRepos to include new Pro AI features
  • Update checkout flow in src/plus/gk/utils/-webview/acount.utils.ts
  • Update feature access checks in src/plus/ai/aiProviderService.ts
  • Remove unused imports
  • Build and validate the changes successfully
  • Run code review and security checks (both passed with no issues)
  • Add missing AI features to isProFeatureOnAllRepos (explain-changes, generate-create-cloudPatch, generate-create-codeSuggestion)
  • Add CHANGELOG entry with issue AI Features should go to PRO checkout #4843 reference

Summary

All AI features that previously required the "Advanced" plan now require the "Pro" plan instead. This includes:

  • generate-changelog - Generate changelog from commits
  • generate-create-pullRequest - Generate pull request descriptions
  • generate-commits - Generate commit messages
  • generate-searchQuery - AI-powered search

Additionally, explain-changes, generate-create-cloudPatch, and generate-create-codeSuggestion are now properly included in isProFeatureOnAllRepos() to maintain their behavior of requiring Pro subscription for all repositories.

Changes Made:

  1. src/features.ts:
    • Moved all AdvancedAIFeatures to ProAIFeatures
    • Updated isAdvancedFeature() to return false
    • Updated isProFeatureOnAllRepos() to include ALL Pro AI features (including the 3 that were missing)
  2. src/plus/gk/utils/-webview/acount.utils.ts: Simplified checkout flow to always use 'pro' plan
  3. src/plus/ai/aiProviderService.ts: Removed Advanced plan checks and messaging
  4. CHANGELOG.md: Added entry documenting the change with issue AI Features should go to PRO checkout #4843 reference

All changes have been validated with successful build, linting, code review, and security checks.

Original prompt

This section details on the original issue you should resolve

<issue_title>AI Features should go to PRO checkout</issue_title>
<issue_description>find every AI feature that leads to the “Advanced” plan and make it leading to the “Pro” plan. So they start working the same how other “Pro” AI features work now.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI changed the title [WIP] Update AI features to lead to Pro checkout Migrate AI features from Advanced to Pro plan Dec 30, 2025
Copilot AI requested a review from sergeibbb December 30, 2025 13:34
@sergeibbb
Copy link
Member

@copilot I have a question for you. "explain-hanges" and "generate-create-cloudPatch", "generate-create-codeSuggestion" used to be in isAdvancedFeatrue function. But they has not appeared in isProFeatureOnAllReps function. Is there a reason for it?

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot I have a question for you. "explain-hanges" and "generate-create-cloudPatch", "generate-create-codeSuggestion" used to be in isAdvancedFeatrue function. But they has not appeared in `isProF...

Good catch! You're absolutely right. Those three features (explain-changes, generate-create-cloudPatch, generate-create-codeSuggestion) were in the original isAdvancedFeature() function but I missed adding them to isProFeatureOnAllRepos().

The semantic difference is that isProFeatureOnAllRepos() marks features that require Pro subscription for all repositories (public and private), while other Pro features only require Pro for private repos.

These three features were originally in isAdvancedFeature(), which meant they required Pro for all repos. I've now added them to isProFeatureOnAllRepos() to maintain that behavior.

Fixed in commit aa4458f.

@sergeibbb
Copy link
Member

@copilot I want you also to generate a note to the Changelog

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@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.

@sergeibbb
Copy link
Member

@copilot Look at other notes, they all are referenced to issues but your is not

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@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: ([#XXXX](https://github.com/gitkraken/vscode-gitlens/issues/XXXX))?

@sergeibbb
Copy link
Member

@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

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@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 COPILOT_AGENT_ISSUE_NUMBER is set to 0, and there's no issue reference in the problem statement I was given or in any of the commit messages.

Could you let me know the issue number? I'll immediately update the CHANGELOG entry to include it in the proper format.

@sergeibbb
Copy link
Member

@copilot but you see the number of the current PR do not you?

Copilot AI added a commit that referenced this pull request Dec 30, 2025
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>
Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot but you see the number of the current PR do not you?

You're absolutely right! I found it - PR #4844. I've updated the CHANGELOG entry to include the proper reference: ([#4844](https://github.com/gitkraken/vscode-gitlens/pull/4844)).

Fixed in commit 0ce7af4.

@sergeibbb
Copy link
Member

@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?

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@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:

  1. Direct API calls to api.github.com are blocked by the DNS monitoring proxy
  2. The gh CLI tool requires a GH_TOKEN environment variable that isn't available in my current environment

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:

  • https://api.github.com/repos/gitkraken/vscode-gitlens/pulls/4844
    • Triggering command: /usr/bin/curl curl -s -H Accept: application/vnd.github.v3&#43;json REDACTED (http block)
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot it should be 4843

Updated the CHANGELOG entry to reference issue #4843 instead of PR #4844, following the repository's convention of linking to issues rather than PRs.

Fixed in commit f8529e5.

@sergeibbb
Copy link
Member

@copilot Can you replace last three commits where you edited Changelog with a one?

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@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:

  1. I cannot use git push --force or git push --force-with-lease to rewrite the remote history
  2. The commits have already been pushed to the remote branch

The three commits are:

  • 89b3a1b - Add CHANGELOG entry for AI features migration to Pro plan
  • 0ce7af4 - Add PR reference to CHANGELOG entry
  • f8529e5 - Update CHANGELOG to reference issue AI Features should go to PRO checkout #4843 instead of PR

To squash these commits, you would need to:

  1. Run git rebase -i aa4458f locally
  2. Mark the last two CHANGELOG commits as "squash" or "fixup"
  3. Force push with git push --force-with-lease

Would you like me to proceed with the PR as-is, or would you prefer to handle the squashing yourself?

sergeibbb pushed a commit that referenced this pull request Dec 30, 2025
- 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
sergeibbb pushed a commit that referenced this pull request Dec 30, 2025
Include explain-changes, generate-create-cloudPatch, and
generate-create-codeSuggestion in isProFeatureOnAllRepos to maintain
their original behavior of requiring Pro subscription for all
repositories (not just private ones).

PLG-156, #4843, #4844
@sergeibbb sergeibbb force-pushed the copilot/update-ai-features-to-pro branch from f8529e5 to 9aff856 Compare December 30, 2025 18:15
sergeibbb pushed a commit that referenced this pull request Dec 30, 2025
Document the change that AI features now require GitLens Pro instead of
GitLens Advanced

PLG-156, #4843, #4844
@sergeibbb sergeibbb marked this pull request as ready for review December 30, 2025 18:16
@sergeibbb sergeibbb requested review from d13, eamodio and ramin-t and removed request for sergeibbb December 30, 2025 18:17
Comment on lines +95 to +97
export type AdvancedFeatures = never;
export type AdvancedAIFeatures = never;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we are still keeping these around as never instead of just removing them?

Comment on lines -112 to +113
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramin

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:

  1. keep the function returning "false"
  2. remove the comment since the empty function is self-explanatory.
  3. return the "is" logic that was deleted in other files.
  4. remove type AdvancedAIFeatures=never, as you said, since it's unnecessary.
  5. But I'd rather keep type AdvancedFeature=never and keep it as the type of this function: function isAdvancedFeature(feature: PlusFeatures): feature is AdvancedFeatures. Yes, we could convert it to just function isAdvancedFeature(feature: PlusFeatures): feature is never, but it seems like keeping AdvancedFeatures type 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 the type Advanced Features=never as well, I can do it.

Do you agree with my proposal?

cc @eamodio

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think I understand the intent better after reading @eamodio's review. Your plan here sounds ok to me.

Copy link
Member

@eamodio eamodio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@justinrobots justinrobots added this to the 17.9 milestone Jan 7, 2026
Copilot AI added 3 commits January 7, 2026 21:22
- 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
Include explain-changes, generate-create-cloudPatch, and
generate-create-codeSuggestion in isProFeatureOnAllRepos to maintain
their original behavior of requiring Pro subscription for all
repositories (not just private ones).

PLG-156, #4843, #4844
Document the change that AI features now require GitLens Pro instead of
GitLens Advanced

PLG-156, #4843, #4844
@sergeibbb sergeibbb force-pushed the copilot/update-ai-features-to-pro branch from 9aff856 to 4f0d183 Compare January 7, 2026 20:23
@sergeibbb
Copy link
Member

@eamodio

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

I've returned all the code back. Do you think I should keep the type AdvancedAIFeatures=never or it's good to go, since it's not really used?

@sergeibbb sergeibbb requested review from eamodio and ramin-t January 7, 2026 20:27
Copy link
Contributor

@ramin-t ramin-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sergeibbb sergeibbb merged commit c912f28 into main Jan 7, 2026
4 checks passed
sergeibbb pushed a commit that referenced this pull request Jan 7, 2026
- 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
sergeibbb pushed a commit that referenced this pull request Jan 7, 2026
Include explain-changes, generate-create-cloudPatch, and
generate-create-codeSuggestion in isProFeatureOnAllRepos to maintain
their original behavior of requiring Pro subscription for all
repositories (not just private ones).

PLG-156, #4843, #4844
@sergeibbb sergeibbb deleted the copilot/update-ai-features-to-pro branch January 7, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI Features should go to PRO checkout

5 participants