mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
supporting buy_credits_url response from backend
This commit is contained in:
@@ -956,6 +956,7 @@ export const ChatRowContent = memo(
|
||||
totalSpent={errorData.total_spent}
|
||||
totalPromotions={errorData.total_promotions}
|
||||
message={errorData.message}
|
||||
buyCreditsUrl={errorData.buy_credits_url}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ interface CreditLimitErrorProps {
|
||||
totalSpent?: number
|
||||
totalPromotions?: number
|
||||
message: string
|
||||
buyCreditsUrl?: string
|
||||
}
|
||||
|
||||
const CreditLimitError: React.FC<CreditLimitErrorProps> = ({
|
||||
@@ -16,6 +17,7 @@ const CreditLimitError: React.FC<CreditLimitErrorProps> = ({
|
||||
totalSpent = 0,
|
||||
totalPromotions = 0,
|
||||
message = "You have run out of credit.",
|
||||
buyCreditsUrl = "https://app.cline.bot/dashboard",
|
||||
}) => {
|
||||
// We have to divide because the balance is stored in microcredits
|
||||
return (
|
||||
@@ -28,7 +30,7 @@ const CreditLimitError: React.FC<CreditLimitErrorProps> = ({
|
||||
</div>
|
||||
|
||||
<VSCodeButtonLink
|
||||
href="https://app.cline.bot/"
|
||||
href={buyCreditsUrl}
|
||||
style={{
|
||||
width: "100%",
|
||||
marginBottom: "8px",
|
||||
|
||||
Reference in New Issue
Block a user