fix(reply): omit auth labels in /new and /reset

This commit is contained in:
Peter Steinberger
2026-02-23 18:29:15 +00:00
parent 4c21ef9ce9
commit b9b77cea4e
3 changed files with 22 additions and 12 deletions

View File

@@ -1,7 +1,6 @@
import crypto from "node:crypto";
import { resolveSessionAuthProfileOverride } from "../../agents/auth-profiles/session-override.js";
import type { ExecToolDefaults } from "../../agents/bash-tools.js";
import { resolveModelAuthLabel } from "../../agents/model-auth-label.js";
import {
abortEmbeddedPiRun,
isEmbeddedPiRunActive,
@@ -325,18 +324,10 @@ export async function runPreparedReply(
if (channel && to) {
const modelLabel = `${provider}/${model}`;
const defaultLabel = `${defaultProvider}/${defaultModel}`;
const modelAuthLabel = resolveModelAuthLabel({
provider,
cfg,
sessionEntry,
agentDir,
});
const authSuffix =
modelAuthLabel && modelAuthLabel !== "unknown" ? ` · 🔑 ${modelAuthLabel}` : "";
const text =
modelLabel === defaultLabel
? `✅ New session started · model: ${modelLabel}${authSuffix}`
: `✅ New session started · model: ${modelLabel} (default: ${defaultLabel})${authSuffix}`;
? `✅ New session started · model: ${modelLabel}`
: `✅ New session started · model: ${modelLabel} (default: ${defaultLabel})`;
await routeReply({
payload: { text },
channel,