chore: apply biome formatting

This commit is contained in:
Peter Steinberger
2026-01-01 17:30:15 +01:00
parent fe5e58af91
commit 04691ed598
6 changed files with 42 additions and 49 deletions

View File

@@ -10,40 +10,36 @@ const LIVE = process.env.MINIMAX_LIVE_TEST === "1" || process.env.LIVE === "1";
const describeLive = LIVE && MINIMAX_KEY ? describe : describe.skip;
describeLive("minimax live", () => {
it(
"returns assistant text",
async () => {
const model: Model<"openai-completions"> = {
id: MINIMAX_MODEL,
name: `MiniMax ${MINIMAX_MODEL}`,
api: "openai-completions",
provider: "minimax",
baseUrl: MINIMAX_BASE_URL,
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 8192,
};
const res = await completeSimple(
model,
{
messages: [
{
role: "user",
content: "Reply with the word ok.",
timestamp: Date.now(),
},
],
},
{ apiKey: MINIMAX_KEY, maxTokens: 64 },
);
const text = res.content
.filter((block) => block.type === "text")
.map((block) => block.text.trim())
.join(" ");
expect(text.length).toBeGreaterThan(0);
},
20000,
);
it("returns assistant text", async () => {
const model: Model<"openai-completions"> = {
id: MINIMAX_MODEL,
name: `MiniMax ${MINIMAX_MODEL}`,
api: "openai-completions",
provider: "minimax",
baseUrl: MINIMAX_BASE_URL,
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 8192,
};
const res = await completeSimple(
model,
{
messages: [
{
role: "user",
content: "Reply with the word ok.",
timestamp: Date.now(),
},
],
},
{ apiKey: MINIMAX_KEY, maxTokens: 64 },
);
const text = res.content
.filter((block) => block.type === "text")
.map((block) => block.text.trim())
.join(" ");
expect(text.length).toBeGreaterThan(0);
}, 20000);
});

View File

@@ -4,13 +4,13 @@ import type { ClawdisConfig } from "../config/config.js";
import { CONFIG_DIR } from "../utils.js";
import {
hasBinary,
isBundledSkillAllowed,
isConfigPathTruthy,
loadWorkspaceSkillEntries,
resolveBundledAllowlist,
resolveConfigPath,
resolveSkillConfig,
resolveSkillsInstallPreferences,
isBundledSkillAllowed,
type SkillEntry,
type SkillInstallSpec,
type SkillsInstallPreferences,

View File

@@ -223,9 +223,7 @@ export function resolveSkillConfig(
function normalizeAllowlist(input: unknown): string[] | undefined {
if (!input) return undefined;
if (!Array.isArray(input)) return undefined;
const normalized = input
.map((entry) => String(entry).trim())
.filter(Boolean);
const normalized = input.map((entry) => String(entry).trim()).filter(Boolean);
return normalized.length > 0 ? normalized : undefined;
}

View File

@@ -7,9 +7,7 @@ const LIVE = process.env.ZAI_LIVE_TEST === "1" || process.env.LIVE === "1";
const describeLive = LIVE && ZAI_KEY ? describe : describe.skip;
describeLive("zai live", () => {
it(
"returns assistant text",
async () => {
it("returns assistant text", async () => {
const model = getModel("zai", "glm-4.7");
const res = await completeSimple(
model,
@@ -29,7 +27,5 @@ describeLive("zai live", () => {
.map((block) => block.text.trim())
.join(" ");
expect(text.length).toBeGreaterThan(0);
},
20000,
);
}, 20000);
});