Skip to content
Source
Sign inSign up
pingdotgg/t3code

refactor(provider-core): add the provider client contract package #17282

Closedjuliusmarmingewants to merge 1 commit intomain fromt3/provider-coreopened View on GitHub

Showing 20 changed files with 6 additions and 4 deletions (loading 16).

x
0 of 20 viewed, 20 left
2 additions and 2 deletionsapps/web/src/components/chat/ComposerUsageLimits.tsxModified
View file
@@ -4,7 +4,7 @@
​
import { ensureLocalApi } from "../../localApi";
import { Button } from "../ui/button";
-import { getDriverOption } from "../settings/providerDriverMeta";
+import { providerClients } from "../settings/providerDriverMeta";
import { RedactedSensitiveText } from "../settings/RedactedSensitiveText";
import { LimitWindows, ResetCredits } from "../usage/UsageLimits";
import { ComposerBanner } from "./ComposerBanner";
@@ -13,7 +13,7 @@
/** Driver name, then the instance when there could be more than one of that driver. */
function accountLabel(account: UsageLimitsReport["accounts"][number]): string {
if (!account.instanceId) return account.label;
- const driver = getDriverOption(account.driver)?.label ?? String(account.driver);
+ const driver = providerClients.get(account.driver)?.label ?? String(account.driver);
const instance =
account.displayName?.trim() ||
(String(account.instanceId) !== String(account.driver) ? account.instanceId : "");
3 additions and 1 deletionapps/web/src/components/onboarding/WelcomeWizard.import.test.tsxModified
View file
@@ -132,7 +132,9 @@
CodexSetupSection: () => null,
AddManagedCodexAccountDialog: () => null,
}));
-vi.mock("../settings/providerDriverMeta", () => ({ getDriverOption: () => ({ label: "Agent" }) }));
+vi.mock("../settings/providerDriverMeta", () => ({
+ providerClients: { get: () => ({ label: "Agent" }) },