refactor: reduce extension channel setup duplication

This commit is contained in:
Peter Steinberger
2026-03-14 02:05:27 +00:00
parent 74e50d3be3
commit e885f1999f
5 changed files with 26 additions and 12 deletions

View File

@@ -475,6 +475,7 @@ async function handleSlashCommandAsync(params: {
channel: "mattermost",
accountId: account.accountId,
});
const humanDelay = core.channel.reply.resolveHumanDelayConfig(cfg, route.agentId);
const typingCallbacks = createTypingCallbacks({
start: () => sendMattermostTyping(client, { channelId }),
@@ -491,7 +492,7 @@ async function handleSlashCommandAsync(params: {
const { dispatcher, replyOptions, markDispatchIdle } =
core.channel.reply.createReplyDispatcherWithTyping({
...prefixOptions,
humanDelay: core.channel.reply.resolveHumanDelayConfig(cfg, route.agentId),
humanDelay,
deliver: async (payload: ReplyPayload) => {
await deliverMattermostReplyPayload({
core,