refactor: consolidate typing lifecycle and queue policy
This commit is contained in:
@@ -569,6 +569,7 @@ export async function processDiscordMessage(ctx: DiscordMessagePreflightContext)
|
||||
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
|
||||
...prefixOptions,
|
||||
humanDelay: resolveHumanDelayConfig(cfg, route.agentId),
|
||||
typingCallbacks,
|
||||
deliver: async (payload: ReplyPayload, info) => {
|
||||
const isFinal = info.kind === "final";
|
||||
if (payload.isReasoning) {
|
||||
@@ -669,8 +670,6 @@ export async function processDiscordMessage(ctx: DiscordMessagePreflightContext)
|
||||
await typingCallbacks.onReplyStart();
|
||||
await statusReactions.setThinking();
|
||||
},
|
||||
onIdle: typingCallbacks.onIdle,
|
||||
onCleanup: typingCallbacks.onCleanup,
|
||||
});
|
||||
|
||||
let dispatchResult: Awaited<ReturnType<typeof dispatchInboundMessage>> | null = null;
|
||||
|
||||
Reference in New Issue
Block a user