Skip to content

Commit 9740da4

Browse files
committed
refactor(inference-cost): format files for oxfmt
1 parent 7d7ec87 commit 9740da4

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎src/cost/cost-visibility.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ function isSessionOfType(
102102
}
103103

104104
function isCodingPlanSession(input: CostVisibilityInput): boolean {
105-
return isSessionOfType(
106-
input,
107-
isCodingPlanProviderName,
108-
isCodingPlanBaseURL,
109-
);
105+
return isSessionOfType(input, isCodingPlanProviderName, isCodingPlanBaseURL);
110106
}
111107

112108
function isChatGPTSubscriptionSession(input: CostVisibilityInput): boolean {
113-
return isSessionOfType(input, isCodexProviderName, isChatGPTSubscriptionBaseURL);
109+
return isSessionOfType(
110+
input,
111+
isCodexProviderName,
112+
isChatGPTSubscriptionBaseURL,
113+
);
114114
}
115115

116116
// Non-null when the dollar cost should be suppressed: a manual provider

‎src/cost/pricing-fetcher.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ export async function fetchPricing(
271271
throw new Error(`models.dev pricing request failed: ${response.status}`);
272272
}
273273
const payload = await response.json();
274-
const { models, reasoning, contextWindows } =
275-
collectModelsDevFields(payload);
274+
const { models, reasoning, contextWindows } = collectModelsDevFields(payload);
276275
if (Object.keys(models).length === 0) {
277276
throw new Error("models.dev pricing response did not include model prices");
278277
}

‎src/inference-error-message.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ function terminalProviderFailureLabel(
124124
preferred,
125125
TERMINAL_PROVIDER_LABEL_MAX_CHARS,
126126
);
127-
return (
128-
sanitizedLabel.length > 0 ? sanitizedLabel : "Unknown"
129-
).replace(/\s+Provider$/i, "");
127+
return (sanitizedLabel.length > 0 ? sanitizedLabel : "Unknown").replace(
128+
/\s+Provider$/i,
129+
"",
130+
);
130131
}
131132

132133
export function terminalProviderFailureMessage(

‎src/upgrade/index.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
import { basename } from "node:path";
1111
import { existsSync } from "node:fs";
1212

13-
import { compareVersions, entryVersion, parseVersionString } from "../changelog/index.js";
13+
import {
14+
compareVersions,
15+
entryVersion,
16+
parseVersionString,
17+
} from "../changelog/index.js";
1418
import { COMMAND_NAME, PRODUCT_NAME } from "../branding.js";
1519
import pkg from "../../package.json" with { type: "json" };
1620

0 commit comments

Comments
 (0)