Skip to content

Conversation

pashpashpash
Copy link
Contributor

@pashpashpash pashpashpash commented Jul 25, 2025

Related Issue

Issue: #XXXX

Description

Test Procedure

Type of Change

  • πŸ› Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • πŸ’… Cosmetic Changes
  • πŸ“š Documentation update
  • πŸƒ Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes


Important

Adds callback_url to buyCreditsUrl in CreditLimitError.tsx for post-purchase redirection.

  • Behavior:
    • Adds callback_url parameter to buyCreditsUrl in CreditLimitError.tsx to redirect users after purchasing credits.
    • Constructs callbackUrl using uriScheme from useExtensionState.
  • Components:
    • Updates CreditLimitError component to use fullPurchaseUrl with callback_url for the "Buy Credits" button link.

This description was created by Ellipsis for eab7554. You can customize this summary. It will automatically update as commits are pushed.

Copy link

changeset-bot bot commented Jul 25, 2025

⚠️ No Changeset found

Latest commit: eab7554

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pashpashpash pashpashpash marked this pull request as ready for review July 28, 2025 22:19
@Copilot Copilot AI review requested due to automatic review settings July 28, 2025 22:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the credits purchasing experience by adding a redirect URL parameter to automatically return users to the VS Code extension after completing their purchase. The change appends a callback URL based on the extension's URI scheme to the buy credits URL.

  • Adds automatic redirect functionality after credit purchase completion
  • Integrates with the extension's URI scheme for proper callback handling
  • Maintains backward compatibility with existing URL structure

@arafatkatze arafatkatze force-pushed the pashpashpash/credits-redirect branch from ba68973 to eab7554 Compare July 30, 2025 21:19
Copy link
Contributor

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

βœ… Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

βœ… Coverage increased or remained the same

Overall Assessment

βœ… Test coverage has been maintained or improved

Last updated: 2025-07-30T21:27:46.275894

Copy link
Contributor

@arafatkatze arafatkatze left a comment

Choose a reason for hiding this comment

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

Tested and verified this

@arafatkatze arafatkatze merged commit f8b5f1f into main Jul 31, 2025
12 of 13 checks passed
dtrugman pushed a commit to dtrugman/cline that referenced this pull request Aug 24, 2025
* Fix code index secret persistence with async VSCode storage

- Add async secret methods to CodeIndexConfigManager
- Implement direct VSCode secret storage access bypassing ContextProxy cache
- Update loadConfiguration to use async secret loading
- Modify webview message handler to use new async secret storage
- Add public secret methods to CodeIndexManager
- Enhance debugging throughout secret flow

This fixes the issue where API keys were saved but not loaded immediately
into services due to ContextProxy cache synchronization issues.

* Fix code index secret persistence and test failures

- Add async secret handling to CodeIndexConfigManager with new methods:
  - getSecretAsync(), storeSecretAsync() for individual secrets
  - loadSecretsAsync(), storeSecretsAsync() for batch operations
- Update doesConfigChangeRequireRestart() to check OpenAI Compatible modelDimension changes
- Fix all failing tests by using setupSecretMocks() helper consistently
- Update manager.spec.ts to properly mock _recreateServices to avoid real service creation

This ensures API keys and other secrets are properly loaded from VSCode's async secret storage
and that configuration changes requiring service restart are correctly detected.

* feat: improve code index settings secret handling in UI

- Show placeholder dots (β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’) in password fields when secrets are already set
- Only send modified secret fields to prevent overwriting existing secrets with empty values
- Track which fields have been modified by the user
- Add requestCodeIndexSecretStatus message handler to check if secrets exist
- Fix console.log to handle empty string keys without errors
- Ensure changing one setting doesn't clear other unmodified secrets

* refactor: disconnect code index from unified settings system

- Rename handleExternalSettingsChange to handleSettingsChange for clarity
- Remove handleSettingsChange call from ClineProvider (not related to code index)
- Remove codebaseIndexConfig from general settings save in SettingsView
- Delete unused codebaseIndexConfig message handler
- Remove codebaseIndexConfig from WebviewMessage type definition
- Code index settings are now fully independent with their own dedicated UI

* feat: separate code index enable/disable from indexing settings

- Move 'Enable codebase indexing' toggle to global settings in Experimental section
- Keep indexing-specific settings (API keys, URLs, models) in dedicated Code Index Settings component
- Add codebaseIndexEnabled handler to webview message handler
- Update translations with new settings title and disabled message
- Ensure code index service properly responds to enable/disable changes
- Maintain backward compatibility with existing codebaseIndexConfig structure

* refactor: remove ContextProxy.getVSCodeContext() and pass ExtensionContext directly

- Updated CodeIndexConfigManager to accept vscode.ExtensionContext in constructor
- Modified CodeIndexManager to pass context directly to CodeIndexConfigManager
- Updated webviewMessageHandler to use provider.context.secrets directly
- Removed getVSCodeContext() method from ContextProxy
- Updated all related tests to reflect these changes
- Fixed CodeIndexSettings webview tests after UI changes

* refactor: streamline secret handling by removing async methods and utilizing ContextProxy directly

* feat: translations and popover component

* refactor: simplify test mocks and improve checkbox handling in CodeIndexSettings tests

* refactor: remove debug logging from CodeIndexConfigManager, CodeIndexManager, CodeIndexServiceFactory, and QdrantVectorStore

* fix: merge missing translation keys from main after rebase

- Add advancedConfigLabel, searchMinScoreLabel, searchMinScoreDescription, searchMinScoreResetTooltip keys
- Update startIndexingButton and clearIndexDataButton labels to match main
- Preserve all CodeIndexPopover translations added in this PR

* Revert "fix: merge missing translation keys from main after rebase"

This reverts commit beb1de4.

* fix: add missing translation keys from main branch after rebase

- Added codeIndex.advancedConfigLabel
- Added codeIndex.searchMinScoreLabel
- Added codeIndex.searchMinScoreDescription
- Added codeIndex.searchMinScoreResetTooltip

These keys exist on main but were missing from non-English locales after rebase.

* fix: remove clickIndicatorMessage, fix toggle message type, and clean up translation key inconsistencies

* refactor: streamline settings management in CodeIndexPopover and improve secret handling

* refactor: remove debug logging from configuration checks in CodeIndexConfigManager and webviewMessageHandler

* fix: translations

* refactor: remove CodeIndexSettings component and associated tests
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.

3 participants