mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
* Add the subscription promo code when linking to the dashboard page * revert tests
17 lines
495 B
TypeScript
17 lines
495 B
TypeScript
import { CLI_PROMO_CODE } from "../../../utils/cline-pass-errors";
|
|
|
|
const CLINE_PASS_SUBSCRIPTION_PATH = "/dashboard/subscription";
|
|
const DEFAULT_APP_BASE_URL = "https://app.cline.bot";
|
|
|
|
export function buildClinePassSubscriptionPageUrl(
|
|
appBaseUrl: string | undefined,
|
|
): string {
|
|
const url = new URL(
|
|
CLINE_PASS_SUBSCRIPTION_PATH,
|
|
appBaseUrl || DEFAULT_APP_BASE_URL,
|
|
);
|
|
url.searchParams.set("personal", "true");
|
|
url.searchParams.set("code", CLI_PROMO_CODE);
|
|
return url.toString();
|
|
}
|