style: format after gate

This commit is contained in:
Peter Steinberger
2026-01-09 05:27:54 +00:00
parent 482364aa92
commit 8e35ad5484
8 changed files with 43 additions and 27 deletions

View File

@@ -1,8 +1,7 @@
import crypto from "node:crypto";
import { describe, expect, it, vi } from "vitest";
import type { TemplateContext } from "../templating.js";
import { onAgentEvent } from "../../infra/agent-events.js";
import type { TemplateContext } from "../templating.js";
import type { FollowupRun, QueueSettings } from "./queue.js";
import { createMockTypingController } from "./test-helpers.js";
@@ -105,9 +104,7 @@ function createRun() {
describe("runReplyAgent claude-cli routing", () => {
it("uses claude-cli runner for claude-cli provider", async () => {
const randomSpy = vi
.spyOn(crypto, "randomUUID")
.mockReturnValue("run-1");
const randomSpy = vi.spyOn(crypto, "randomUUID").mockReturnValue("run-1");
const lifecyclePhases: string[] = [];
const unsubscribe = onAgentEvent((evt) => {
if (evt.runId !== "run-1") return;

View File

@@ -18,7 +18,10 @@ import {
} from "../../config/sessions.js";
import type { TypingMode } from "../../config/types.js";
import { logVerbose } from "../../globals.js";
import { emitAgentEvent, registerAgentRunContext } from "../../infra/agent-events.js";
import {
emitAgentEvent,
registerAgentRunContext,
} from "../../infra/agent-events.js";
import { defaultRuntime } from "../../runtime.js";
import {
estimateUsageCost,
@@ -352,9 +355,9 @@ export async function runReplyAgent(params: {
runId,
extraSystemPrompt: followupRun.run.extraSystemPrompt,
ownerNumbers: followupRun.run.ownerNumbers,
claudeSessionId:
sessionEntry?.claudeCliSessionId?.trim() || undefined,
})
claudeSessionId:
sessionEntry?.claudeCliSessionId?.trim() || undefined,
})
.then((result) => {
emitAgentEvent({
runId,

View File

@@ -329,7 +329,9 @@ export function buildStatusMessage(args: StatusArgs): string {
const usagePair = formatUsagePair(inputTokens, outputTokens);
const costLine = costLabel ? `💵 Cost: ${costLabel}` : null;
const usageCostLine =
usagePair && costLine ? `${usagePair} · ${costLine}` : usagePair ?? costLine;
usagePair && costLine
? `${usagePair} · ${costLine}`
: (usagePair ?? costLine);
return [
versionLine,