fix: derive prefixes from routed identity (#578) (thanks @p6l-richard)
This commit is contained in:
@@ -448,6 +448,7 @@ function createMSTeamsMessageHandler(deps: MSTeamsMessageHandlerDeps) {
|
||||
const { dispatcher, replyOptions, markDispatchIdle } =
|
||||
createMSTeamsReplyDispatcher({
|
||||
cfg,
|
||||
agentId: route.agentId,
|
||||
runtime,
|
||||
log,
|
||||
adapter,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user