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,9 +10,7 @@ const LIVE = process.env.MINIMAX_LIVE_TEST === "1" || process.env.LIVE === "1";
const describeLive = LIVE && MINIMAX_KEY ? describe : describe.skip; const describeLive = LIVE && MINIMAX_KEY ? describe : describe.skip;
describeLive("minimax live", () => { describeLive("minimax live", () => {
it( it("returns assistant text", async () => {
"returns assistant text",
async () => {
const model: Model<"openai-completions"> = { const model: Model<"openai-completions"> = {
id: MINIMAX_MODEL, id: MINIMAX_MODEL,
name: `MiniMax ${MINIMAX_MODEL}`, name: `MiniMax ${MINIMAX_MODEL}`,
@@ -43,7 +41,5 @@ describeLive("minimax live", () => {
.map((block) => block.text.trim()) .map((block) => block.text.trim())
.join(" "); .join(" ");
expect(text.length).toBeGreaterThan(0); expect(text.length).toBeGreaterThan(0);
}, }, 20000);
20000,
);
}); });

View File

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

View File

@@ -223,9 +223,7 @@ export function resolveSkillConfig(
function normalizeAllowlist(input: unknown): string[] | undefined { function normalizeAllowlist(input: unknown): string[] | undefined {
if (!input) return undefined; if (!input) return undefined;
if (!Array.isArray(input)) return undefined; if (!Array.isArray(input)) return undefined;
const normalized = input const normalized = input.map((entry) => String(entry).trim()).filter(Boolean);
.map((entry) => String(entry).trim())
.filter(Boolean);
return normalized.length > 0 ? normalized : undefined; 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; const describeLive = LIVE && ZAI_KEY ? describe : describe.skip;
describeLive("zai live", () => { describeLive("zai live", () => {
it( it("returns assistant text", async () => {
"returns assistant text",
async () => {
const model = getModel("zai", "glm-4.7"); const model = getModel("zai", "glm-4.7");
const res = await completeSimple( const res = await completeSimple(
model, model,
@@ -29,7 +27,5 @@ describeLive("zai live", () => {
.map((block) => block.text.trim()) .map((block) => block.text.trim())
.join(" "); .join(" ");
expect(text.length).toBeGreaterThan(0); expect(text.length).toBeGreaterThan(0);
}, }, 20000);
20000,
);
}); });

View File

@@ -8,8 +8,8 @@ import { WebSocket } from "ws";
import { agentCommand } from "../commands/agent.js"; import { agentCommand } from "../commands/agent.js";
import { import {
CONFIG_PATH_CLAWDIS, CONFIG_PATH_CLAWDIS,
STATE_DIR_CLAWDIS,
readConfigFileSnapshot, readConfigFileSnapshot,
STATE_DIR_CLAWDIS,
writeConfigFile, writeConfigFile,
} from "../config/config.js"; } from "../config/config.js";
import { emitAgentEvent } from "../infra/agent-events.js"; import { emitAgentEvent } from "../infra/agent-events.js";
@@ -2053,7 +2053,10 @@ describe("gateway server", () => {
); );
expect(res.ok).toBe(true); expect(res.ok).toBe(true);
const payload = res.payload as const payload = res.payload as
| { type?: unknown; snapshot?: { configPath?: string; stateDir?: string } } | {
type?: unknown;
snapshot?: { configPath?: string; stateDir?: string };
}
| undefined; | undefined;
expect(payload?.type).toBe("hello-ok"); expect(payload?.type).toBe("hello-ok");
expect(payload?.snapshot?.configPath).toBe(CONFIG_PATH_CLAWDIS); expect(payload?.snapshot?.configPath).toBe(CONFIG_PATH_CLAWDIS);

View File

@@ -46,11 +46,11 @@ import { getStatusSummary } from "../commands/status.js";
import { import {
type ClawdisConfig, type ClawdisConfig,
CONFIG_PATH_CLAWDIS, CONFIG_PATH_CLAWDIS,
STATE_DIR_CLAWDIS,
isNixMode, isNixMode,
loadConfig, loadConfig,
parseConfigJson5, parseConfigJson5,
readConfigFileSnapshot, readConfigFileSnapshot,
STATE_DIR_CLAWDIS,
validateConfigObject, validateConfigObject,
writeConfigFile, writeConfigFile,
} from "../config/config.js"; } from "../config/config.js";