fix: derive prefixes from routed identity (#578) (thanks @p6l-richard)

This commit is contained in:
Peter Steinberger
2026-01-09 16:39:32 +01:00
parent 43848b7b43
commit 66bbb723c5
18 changed files with 156 additions and 27 deletions

View File

@@ -448,6 +448,7 @@ function createMSTeamsMessageHandler(deps: MSTeamsMessageHandlerDeps) {
const { dispatcher, replyOptions, markDispatchIdle } =
createMSTeamsReplyDispatcher({
cfg,
agentId: route.agentId,
runtime,
log,
adapter,

View File

@@ -1,3 +1,4 @@
import { resolveResponsePrefix } from "../agents/identity.js";
import { createReplyDispatcherWithTyping } from "../auto-reply/reply/reply-dispatcher.js";
import type { ClawdbotConfig, MSTeamsReplyStyle } from "../config/types.js";
import { danger } from "../globals.js";
@@ -18,6 +19,7 @@ import type { MSTeamsTurnContext } from "./sdk-types.js";
export function createMSTeamsReplyDispatcher(params: {
cfg: ClawdbotConfig;
agentId: string;
runtime: RuntimeEnv;
log: MSTeamsMonitorLogger;
adapter: MSTeamsAdapter;
@@ -36,7 +38,7 @@ export function createMSTeamsReplyDispatcher(params: {
};
return createReplyDispatcherWithTyping({
responsePrefix: params.cfg.messages?.responsePrefix,
responsePrefix: resolveResponsePrefix(params.cfg, params.agentId),
deliver: async (payload) => {
const messages = renderReplyPayloadsToMessages([payload], {
textChunkLimit: params.textLimit,