style: apply biome formatting
This commit is contained in:
@@ -18,4 +18,3 @@ export function ensureClawdisAgentEnv(): string {
|
||||
if (!process.env.PI_CODING_AGENT_DIR) process.env.PI_CODING_AGENT_DIR = dir;
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }>;
|
||||
|
||||
@@ -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"]>;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user