Remove debug logging for responsePrefix template resolution
This commit is contained in:
@@ -127,10 +127,6 @@ export async function runAgentTurnWithFallback(params: {
|
|||||||
run: (provider, model) => {
|
run: (provider, model) => {
|
||||||
// Notify that model selection is complete (including after fallback).
|
// Notify that model selection is complete (including after fallback).
|
||||||
// This allows responsePrefix template interpolation with the actual model.
|
// This allows responsePrefix template interpolation with the actual model.
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(
|
|
||||||
`[responsePrefix] onModelSelected callback exists: ${!!params.opts?.onModelSelected}, provider=${provider}, model=${model}`,
|
|
||||||
);
|
|
||||||
params.opts?.onModelSelected?.({
|
params.opts?.onModelSelected?.({
|
||||||
provider,
|
provider,
|
||||||
model,
|
model,
|
||||||
|
|||||||
@@ -43,19 +43,9 @@ export function normalizeReplyPayload(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resolve template variables in responsePrefix if context is provided
|
// Resolve template variables in responsePrefix if context is provided
|
||||||
if (opts.responsePrefix?.includes("{")) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(
|
|
||||||
`[responsePrefix] normalizing: prefix="${opts.responsePrefix}", context=${JSON.stringify(opts.responsePrefixContext)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const effectivePrefix = opts.responsePrefixContext
|
const effectivePrefix = opts.responsePrefixContext
|
||||||
? resolveResponsePrefixTemplate(opts.responsePrefix, opts.responsePrefixContext)
|
? resolveResponsePrefixTemplate(opts.responsePrefix, opts.responsePrefixContext)
|
||||||
: opts.responsePrefix;
|
: opts.responsePrefix;
|
||||||
if (opts.responsePrefix?.includes("{")) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(`[responsePrefix] resolved to: "${effectivePrefix}"`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
effectivePrefix &&
|
effectivePrefix &&
|
||||||
|
|||||||
@@ -163,16 +163,10 @@ export const dispatchTelegramMessage = async ({
|
|||||||
disableBlockStreaming,
|
disableBlockStreaming,
|
||||||
onModelSelected: (ctx) => {
|
onModelSelected: (ctx) => {
|
||||||
// Mutate the object directly instead of reassigning to ensure the closure sees updates
|
// Mutate the object directly instead of reassigning to ensure the closure sees updates
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(
|
|
||||||
`[responsePrefix] telegram onModelSelected fired: provider=${ctx.provider}, model=${ctx.model}, thinkLevel=${ctx.thinkLevel}`,
|
|
||||||
);
|
|
||||||
prefixContext.provider = ctx.provider;
|
prefixContext.provider = ctx.provider;
|
||||||
prefixContext.model = extractShortModelName(ctx.model);
|
prefixContext.model = extractShortModelName(ctx.model);
|
||||||
prefixContext.modelFull = `${ctx.provider}/${ctx.model}`;
|
prefixContext.modelFull = `${ctx.provider}/${ctx.model}`;
|
||||||
prefixContext.thinkingLevel = ctx.thinkLevel ?? "off";
|
prefixContext.thinkingLevel = ctx.thinkLevel ?? "off";
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(`[responsePrefix] telegram prefixContext updated: ${JSON.stringify(prefixContext)}`);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user