debug: use console.log instead of logVerbose for always-visible logging

This commit is contained in:
Sebastian
2026-01-14 23:29:17 -05:00
parent 56b3b44342
commit e7167e35ed
3 changed files with 11 additions and 7 deletions

View File

@@ -127,7 +127,8 @@ export async function runAgentTurnWithFallback(params: {
run: (provider, model) => {
// Notify that model selection is complete (including after fallback).
// This allows responsePrefix template interpolation with the actual model.
logVerbose(
// eslint-disable-next-line no-console
console.log(
`[responsePrefix] onModelSelected callback exists: ${!!params.opts?.onModelSelected}, provider=${provider}, model=${model}`,
);
params.opts?.onModelSelected?.({

View File

@@ -1,4 +1,3 @@
import { logVerbose } from "../../globals.js";
import { stripHeartbeatToken } from "../heartbeat.js";
import { HEARTBEAT_TOKEN, isSilentReplyText, SILENT_REPLY_TOKEN } from "../tokens.js";
import type { ReplyPayload } from "../types.js";
@@ -45,15 +44,17 @@ export function normalizeReplyPayload(
// Resolve template variables in responsePrefix if context is provided
if (opts.responsePrefix?.includes("{")) {
logVerbose(
// eslint-disable-next-line no-console
console.log(
`[responsePrefix] normalizing: prefix="${opts.responsePrefix}", context=${JSON.stringify(opts.responsePrefixContext)}`,
);
}
const effectivePrefix = opts.responsePrefixContext
? resolveResponsePrefixTemplate(opts.responsePrefix, opts.responsePrefixContext)
: opts.responsePrefix;
if (opts.responsePrefix?.includes("{") && effectivePrefix !== opts.responsePrefix) {
logVerbose(`[responsePrefix] resolved to: "${effectivePrefix}"`);
if (opts.responsePrefix?.includes("{")) {
// eslint-disable-next-line no-console
console.log(`[responsePrefix] resolved to: "${effectivePrefix}"`);
}
if (