feat: add raw stream logging flags

This commit is contained in:
Peter Steinberger
2026-01-09 03:45:14 +00:00
parent 69546d563d
commit 8e27ea7371
8 changed files with 149 additions and 8 deletions

View File

@@ -599,7 +599,7 @@ describe("directive behavior", () => {
const text = Array.isArray(res) ? res[0]?.text : res?.text;
expect(text).toContain("Elevated mode disabled.");
expect(text).toContain("status agent:main:main");
expect(text).toContain("Session: agent:main:main");
expect(runEmbeddedPiAgent).not.toHaveBeenCalled();
});
});

View File

@@ -555,7 +555,6 @@ export async function handleCommands(params: {
const reply = await buildStatusReply({
cfg,
command,
provider: command.provider,
sessionEntry,
sessionKey,
sessionScope,

View File

@@ -65,7 +65,6 @@ describe("buildStatusMessage", () => {
},
},
},
},
} as ClawdbotConfig,
agent: {
model: "anthropic/pi:opus",
@@ -248,7 +247,6 @@ describe("buildStatusMessage", () => {
},
},
},
},
} as ClawdbotConfig,
agent: { model: "anthropic/claude-opus-4-5" },
sessionEntry: { sessionId: "c1", updatedAt: 0, inputTokens: 10 },

View File

@@ -296,7 +296,10 @@ export function buildStatusMessage(args: StatusArgs): string {
const activationLine = activationParts.filter(Boolean).join(" · ");
const authMode = resolveModelAuthMode(provider, args.config);
const showCost = authMode === "api-key";
const authLabelValue =
args.modelAuth ??
(authMode && authMode !== "unknown" ? authMode : undefined);
const showCost = authLabelValue === "api-key" || authLabelValue === "mixed";
const costConfig = showCost
? resolveModelCostConfig({
provider,
@@ -319,9 +322,6 @@ export function buildStatusMessage(args: StatusArgs): string {
const costLabel = showCost && hasUsage ? formatUsd(cost) : undefined;
const modelLabel = model ? `${provider}/${model}` : "unknown";
const authLabelValue =
args.modelAuth ??
(authMode && authMode !== "unknown" ? authMode : undefined);
const authLabel = authLabelValue ? ` · 🔑 ${authLabelValue}` : "";
const modelLine = `🧠 Model: ${modelLabel}${authLabel}`;
const commit = resolveCommitHash();