refactor: consolidate typing lifecycle and queue policy

This commit is contained in:
Peter Steinberger
2026-02-25 02:15:54 +00:00
parent 24d7612ddf
commit d42ef2ac62
19 changed files with 410 additions and 301 deletions

View File

@@ -243,6 +243,7 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
...prefixOptions,
humanDelay: resolveHumanDelayConfig(cfg, route.agentId),
typingCallbacks,
deliver: async (payload) => {
if (useStreaming) {
await deliverWithStreaming(payload);
@@ -304,9 +305,6 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
runtime.error?.(danger(`slack ${info.kind} reply failed: ${String(err)}`));
typingCallbacks.onIdle?.();
},
onReplyStart: typingCallbacks.onReplyStart,
onIdle: typingCallbacks.onIdle,
onCleanup: typingCallbacks.onCleanup,
});
const draftStream = createSlackDraftStream({