fix(lint): clear biome errors breaking CI on main
CI was red at the lint step: an unused providerID parameter in createQoderOAuth, an unused getCachedCredentials import in stream.ts, plus unsorted imports and stale formatting in stream.ts and pat.ts. Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
This commit is contained in:
co-authored by
Simon Shi
parent
ab378b44e2
commit
70fba627e6
+4
-2
@@ -30,7 +30,7 @@ function modelsForProvider(mode: string, providerID: string): Model<Api>[] {
|
||||
})) as unknown as Model<Api>[];
|
||||
}
|
||||
|
||||
function createQoderOAuth(providerID: string, mode: string): OAuthConfigWithUsage {
|
||||
function createQoderOAuth(_providerID: string, mode: string): OAuthConfigWithUsage {
|
||||
return {
|
||||
name: isQoderCNMode(mode) ? "Qoder CN (PAT)" : "Qoder (Browser OAuth / PAT)",
|
||||
login: isQoderCNMode(mode) ? loginQoderCN : loginQoder,
|
||||
@@ -52,7 +52,9 @@ function registerQoderProvider(pi: ExtensionAPI, providerID: string, mode: strin
|
||||
api: "qoder-api" as Api,
|
||||
models: modelsForProvider(mode, providerID) as unknown as ProviderConfig["models"],
|
||||
oauth: oauth as ProviderConfig["oauth"],
|
||||
streamSimple: streamQoder,
|
||||
// pi-coding-agent resolves its own nested @earendil-works/pi-ai copy, so the
|
||||
// structurally identical Model/Context types are nominally distinct here.
|
||||
streamSimple: streamQoder as unknown as ProviderConfig["streamSimple"],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -102,7 +102,10 @@ export async function exchangeJobToken(pat: string, mode: string = getQoderMode(
|
||||
}
|
||||
|
||||
/** Fetch user profile using a job token (jt-...). Best-effort. */
|
||||
export async function fetchUserInfo(jobToken: string, mode: string): Promise<{ userID: string; email: string; name: string }> {
|
||||
export async function fetchUserInfo(
|
||||
jobToken: string,
|
||||
mode: string,
|
||||
): Promise<{ userID: string; email: string; name: string }> {
|
||||
let userID = "";
|
||||
let email = "";
|
||||
let name = "";
|
||||
|
||||
+1
-3
@@ -20,8 +20,8 @@ import {
|
||||
getQoderUserEmailFallback,
|
||||
isQoderCNMode,
|
||||
} from "./cosy.js";
|
||||
import { resolveQoderIdentity, getCachedCredentials } from "./oauth.js";
|
||||
import { getCachedModelConfig, MAX_OUTPUT_TOKENS } from "./models.js";
|
||||
import { resolveQoderIdentity } from "./oauth.js";
|
||||
import { qoderEncodeBody } from "./qoder-encoding.js";
|
||||
import { stripThinkingTags, ThinkingTagParser } from "./thinking-parser.js";
|
||||
import { transformMessagesForQoder, transformTools } from "./transform.js";
|
||||
@@ -74,7 +74,6 @@ function stableChatRecordID(
|
||||
return hash.digest("hex").slice(0, 16);
|
||||
}
|
||||
|
||||
|
||||
function contentToText(content: unknown): string {
|
||||
if (typeof content === "string") return content;
|
||||
if (Array.isArray(content)) {
|
||||
@@ -294,7 +293,6 @@ export function streamQoder(
|
||||
|
||||
const modelSource = modelConfig.source || "system";
|
||||
|
||||
|
||||
const response = await fetch(chatURL, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user