Compare commits

...
Author SHA1 Message Date
abeatrix 05dcf1faf3 Merge branch 'main' into bee/buy_credits_url 2025-07-10 20:12:10 -07:00
abeatrix 0224fdebe2 Use buyCreditsURL in CreditLimitError component
Adds the `buyCreditsURL` prop to the `CreditLimitError` component  where the value is returned by the server added in https://github.com/cline/core-platform/pull/444. This allows users to navigate directly to the Cline credits purchase page directly to the url sent by the server when they encounter a credit limit error.

The `buyCreditsURL` prop is now used in the `CreditLimitError` component to dynamically set the `href` attribute of the VSCodeButtonLink, ensuring users are directed to the correct page for purchasing more credits. The default value is set to use the user account one.
2025-07-10 20:04:08 -07:00
@@ -17,7 +17,7 @@ const CreditLimitError: React.FC<CreditLimitErrorProps> = ({
totalSpent = 0,
totalPromotions = 0,
message = "You have run out of credit.",
buyCreditsUrl = "https://app.cline.bot/dashboard",
buyCreditsUrl = "https://app.cline.bot/dashboard/account?tab=credits",
}) => {
// We have to divide because the balance is stored in microcredits
return (