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

@@ -222,6 +222,7 @@ export function createSignalEventHandler(deps: SignalEventHandlerDeps) {
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
...prefixOptions,
humanDelay: resolveHumanDelayConfig(deps.cfg, route.agentId),
typingCallbacks,
deliver: async (payload) => {
await deps.deliverReplies({
replies: [payload],
@@ -237,9 +238,6 @@ export function createSignalEventHandler(deps: SignalEventHandlerDeps) {
onError: (err, info) => {
deps.runtime.error?.(danger(`signal ${info.kind} reply failed: ${String(err)}`));
},
onReplyStart: typingCallbacks.onReplyStart,
onIdle: typingCallbacks.onIdle,
onCleanup: typingCallbacks.onCleanup,
});
const { queuedFinal } = await dispatchInboundMessage({