mirror of
https://github.com/cline/cline.git
synced 2026-10-30 18:12:49 +08:00
Rename Cline Pass to ClinePass everywhere (#11584)
* Rename Cline Pass to ClinePass everywhere * Update apps/vscode/src/utils/path.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
greptile-apps[bot]
parent
a3258dd79a
commit
9af6ced896
@@ -210,7 +210,7 @@ async function onChangeToClinePass(config: ClineAccountConfig) {
|
||||
organizationId: null,
|
||||
});
|
||||
} catch (error) {
|
||||
config.logger?.debug("Failed to switch Cline Pass to personal account", {
|
||||
config.logger?.debug("Failed to switch ClinePass to personal account", {
|
||||
error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ vi.mock("./feature-flags", () => ({
|
||||
}));
|
||||
|
||||
describe("listLocalProviders", () => {
|
||||
it("passes the Cline Pass feature flag into the SDK provider list", async () => {
|
||||
it("passes the ClinePass feature flag into the SDK provider list", async () => {
|
||||
const { listLocalProviders } = await import("./provider-catalog");
|
||||
const manager = {} as never;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export function getReadablePath(cwd: string, relPath?: string): string {
|
||||
if (isLocatedInPath(cwd, absolutePath)) {
|
||||
return normalizedRelPath.toPosix()
|
||||
}
|
||||
// we are outside the cwd, so show the absolute path (useful for when cline passes in '../../' for example)
|
||||
// we are outside the cwd, so show the absolute path (useful for when Cline passes in '../../' for example)
|
||||
return absolutePath.toPosix()
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ describe("provider auth registry", () => {
|
||||
).toBe("workos:abc");
|
||||
});
|
||||
|
||||
it("login/save for Cline Pass stores credentials under Cline storage", async () => {
|
||||
it("login/save for ClinePass stores credentials under Cline storage", async () => {
|
||||
loginClineOAuth.mockResolvedValueOnce({
|
||||
access: "new-access",
|
||||
refresh: "new-refresh",
|
||||
@@ -115,7 +115,7 @@ describe("provider auth registry", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("Cline Pass resolves API keys from Cline storage", () => {
|
||||
it("ClinePass resolves API keys from Cline storage", () => {
|
||||
const getProviderSettings = vi.fn().mockReturnValue({
|
||||
provider: "cline",
|
||||
auth: { accessToken: "abc" },
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("RuntimeOAuthTokenManager", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("resolves Cline Pass OAuth using Cline storage and WorkOS formatting", async () => {
|
||||
it("resolves ClinePass OAuth using Cline storage and WorkOS formatting", async () => {
|
||||
const getProviderSettings = vi.fn().mockReturnValue({
|
||||
provider: "cline",
|
||||
baseUrl: "https://api.cline.test",
|
||||
|
||||
@@ -1090,7 +1090,7 @@ describe("listLocalProviders", () => {
|
||||
expect(ids).toContain("list-provider-b");
|
||||
});
|
||||
|
||||
it("hides Cline Pass when the Cline Pass feature flag is disabled", async () => {
|
||||
it("hides ClinePass when the ClinePass feature flag is disabled", async () => {
|
||||
const { providers } = await listLocalProviders(manager, {
|
||||
isClinePassEnabled: false,
|
||||
});
|
||||
@@ -1098,7 +1098,7 @@ describe("listLocalProviders", () => {
|
||||
expect(providers.map((p) => p.id)).not.toContain("cline-pass");
|
||||
});
|
||||
|
||||
it("includes Cline Pass when the Cline Pass feature flag is enabled", async () => {
|
||||
it("includes ClinePass when the ClinePass feature flag is enabled", async () => {
|
||||
const { providers } = await listLocalProviders(manager, {
|
||||
isClinePassEnabled: true,
|
||||
});
|
||||
|
||||
@@ -18,8 +18,8 @@ describe("models-dev-catalog", () => {
|
||||
clinePass: [
|
||||
{
|
||||
id: "base-model",
|
||||
name: "Cline Pass Base Model",
|
||||
description: "Included in Cline Pass",
|
||||
name: "ClinePass Base Model",
|
||||
description: "Included in ClinePass",
|
||||
},
|
||||
{
|
||||
id: "custom-model",
|
||||
@@ -46,8 +46,8 @@ describe("models-dev-catalog", () => {
|
||||
expect(result["cline-pass"]).toEqual({
|
||||
"base-model": {
|
||||
id: "base-model",
|
||||
name: "Cline Pass Base Model",
|
||||
description: "Included in Cline Pass",
|
||||
name: "ClinePass Base Model",
|
||||
description: "Included in ClinePass",
|
||||
contextWindow: 200_000,
|
||||
maxInputTokens: 180_000,
|
||||
maxTokens: 16_384,
|
||||
@@ -104,7 +104,7 @@ describe("models-dev-catalog", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("returns no Cline Pass models when clinePass is empty or missing", () => {
|
||||
it("returns no ClinePass models when clinePass is empty or missing", () => {
|
||||
expect(normalizeClineRecommendedProviderModels({}, {})).toEqual({});
|
||||
expect(
|
||||
normalizeClineRecommendedProviderModels({ clinePass: [] }, {}),
|
||||
|
||||
@@ -57,7 +57,7 @@ describe("cline-pass builtin spec", () => {
|
||||
|
||||
expect(provider).toMatchObject({
|
||||
id: "cline-pass",
|
||||
name: "Cline Pass",
|
||||
name: "ClinePass",
|
||||
baseUrl: `${CLINE_ENVIRONMENTS.production.apiBaseUrl}/api/v1`,
|
||||
client: "openai-compatible",
|
||||
capabilities: expect.arrayContaining([
|
||||
|
||||
@@ -485,9 +485,9 @@ const cline = createClineLikeSpec({
|
||||
|
||||
const clinePass = createClineLikeSpec({
|
||||
id: CLINE_PASS_PROVIDER_ID,
|
||||
name: "Cline Pass",
|
||||
name: "ClinePass",
|
||||
popular: 2,
|
||||
description: "Cline API endpoint with Cline Pass models",
|
||||
description: "Cline API endpoint with ClinePass models",
|
||||
modelsProviderId: CLINE_PASS_PROVIDER_ID,
|
||||
defaultModelId: firstGeneratedModelId(CLINE_PASS_PROVIDER_ID),
|
||||
metadata: { usageCostDisplay: "hide" },
|
||||
|
||||
@@ -85,14 +85,14 @@ describe("provider-ids", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("registers Cline Pass as a distinct Cline-compatible built-in provider", async () => {
|
||||
it("registers ClinePass as a distinct Cline-compatible built-in provider", async () => {
|
||||
expect(BUILT_IN_PROVIDER_IDS).toContain("cline-pass");
|
||||
const models = await getModelsForProvider("cline-pass");
|
||||
const provider = await getProvider("cline-pass");
|
||||
|
||||
expect(provider).toMatchObject({
|
||||
id: "cline-pass",
|
||||
name: "Cline Pass",
|
||||
name: "ClinePass",
|
||||
client: "openai-compatible",
|
||||
});
|
||||
expect(models).toHaveProperty(provider?.defaultModelId ?? "");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const FeatureFlag = {
|
||||
/** Enables Cline Pass provider/model list exposure in supported clients. */
|
||||
/** Enables ClinePass provider/model list exposure in supported clients. */
|
||||
CLINE_PASS: "ext-cline-pass",
|
||||
} as const;
|
||||
|
||||
@@ -35,8 +35,9 @@ type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
||||
type HasNonPrimitiveFieldNames<T> = {
|
||||
[K in keyof T]-?: Exclude<T[K], Primitive> extends never ? never : K;
|
||||
}[keyof T];
|
||||
type HasOnlyPrimitiveFields<T> =
|
||||
HasNonPrimitiveFieldNames<T> extends never ? true : false;
|
||||
type HasOnlyPrimitiveFields<T> = HasNonPrimitiveFieldNames<T> extends never
|
||||
? true
|
||||
: false;
|
||||
export type FeatureFlagsContextPrimitiveValued = AssertTrue<
|
||||
HasOnlyPrimitiveFields<FeatureFlagsContext>
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user