style: apply biome formatting

This commit is contained in:
Peter Steinberger
2025-12-23 02:49:49 +01:00
parent 6fad79f581
commit a5f4332f21
6 changed files with 11 additions and 10 deletions

View File

@@ -18,4 +18,3 @@ export function ensureClawdisAgentEnv(): string {
if (!process.env.PI_CODING_AGENT_DIR) process.env.PI_CODING_AGENT_DIR = dir;
return dir;
}

View File

@@ -60,10 +60,7 @@ describe("models config", () => {
await ensureClawdisModelsJson(MODELS_CONFIG);
const modelPath = path.join(
resolveClawdisAgentDir(),
"models.json",
);
const modelPath = path.join(resolveClawdisAgentDir(), "models.json");
const raw = await fs.readFile(modelPath, "utf8");
const parsed = JSON.parse(raw) as {
providers: Record<string, { baseUrl?: string }>;

View File

@@ -1,8 +1,11 @@
import fs from "node:fs/promises";
import path from "node:path";
import { loadConfig, type ClawdisConfig } from "../config/config.js";
import { ensureClawdisAgentEnv, resolveClawdisAgentDir } from "./agent-paths.js";
import { type ClawdisConfig, loadConfig } from "../config/config.js";
import {
ensureClawdisAgentEnv,
resolveClawdisAgentDir,
} from "./agent-paths.js";
type ModelsConfig = NonNullable<ClawdisConfig["models"]>;

View File

@@ -27,8 +27,8 @@ import { splitMediaFromOutput } from "../media/parse.js";
import { enqueueCommand } from "../process/command-queue.js";
import { CONFIG_DIR, resolveUserPath } from "../utils.js";
import { resolveClawdisAgentDir } from "./agent-paths.js";
import { ensureClawdisModelsJson } from "./models-config.js";
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "./defaults.js";
import { ensureClawdisModelsJson } from "./models-config.js";
import {
buildBootstrapContextFiles,
ensureSessionHeader,

View File

@@ -9,9 +9,9 @@ import os from "node:os";
import path from "node:path";
import chalk from "chalk";
import { type WebSocket, WebSocketServer } from "ws";
import { resolveClawdisAgentDir } from "../agents/agent-paths.js";
import { lookupContextTokens } from "../agents/context.js";
import { DEFAULT_CONTEXT_TOKENS, DEFAULT_MODEL } from "../agents/defaults.js";
import { resolveClawdisAgentDir } from "../agents/agent-paths.js";
import { ensureClawdisModelsJson } from "../agents/models-config.js";
import { installSkill } from "../agents/skills-install.js";
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";

View File

@@ -473,7 +473,9 @@ function describeReplyContext(rawMessage: proto.IMessage | undefined): {
const body = extractText(quoted) ?? extractMediaPlaceholder(quoted);
if (!body) return null;
const senderJid = contextInfo?.participant ?? undefined;
const senderE164 = senderJid ? jidToE164(senderJid) ?? senderJid : undefined;
const senderE164 = senderJid
? (jidToE164(senderJid) ?? senderJid)
: undefined;
const sender = senderE164 ?? "unknown sender";
return {
id: contextInfo?.stanzaId ? String(contextInfo.stanzaId) : undefined,