refactor(messages): centralize per-agent prefixes

This commit is contained in:
Peter Steinberger committed 2026-01-09 16:54:54 +01:00
1 parent 8341b662af
commit 36bdec0f2c
14 files changed
+144 -48

No files matched your search

+5 -2
View File
@@ -1,4 +1,4 @@
import { resolveResponsePrefix } from "../agents/identity.js";
import { resolveEffectiveMessagesConfig } from "../agents/identity.js";
import {
DEFAULT_HEARTBEAT_ACK_MAX_CHARS,
DEFAULT_HEARTBEAT_EVERY,
@@ -269,7 +269,10 @@ export async function runHeartbeatOnce(opts: {
const ackMaxChars = resolveHeartbeatAckMaxChars(cfg);
const normalized = normalizeHeartbeatReply(
replyPayload,
resolveResponsePrefix(cfg, resolveAgentIdFromSessionKey(sessionKey)),
resolveEffectiveMessagesConfig(
cfg,
resolveAgentIdFromSessionKey(sessionKey),
).responsePrefix,
ackMaxChars,
);
if (normalized.shouldSkip && !normalized.hasMedia) {