fix: unify inbound dispatch pipeline

This commit is contained in:
Peter Steinberger
2026-01-23 22:51:37 +00:00
parent da26954dd0
commit 2e0a835e07
29 changed files with 543 additions and 297 deletions

View File

@@ -1,3 +1,4 @@
import type { ImageContent } from "@mariozechner/pi-ai";
import type { TypingController } from "./reply/typing.js";
export type BlockReplyContext = {
@@ -13,6 +14,14 @@ export type ModelSelectedContext = {
};
export type GetReplyOptions = {
/** Override run id for agent events (defaults to random UUID). */
runId?: string;
/** Abort signal for the underlying agent run. */
abortSignal?: AbortSignal;
/** Optional inbound images (used for webchat attachments). */
images?: ImageContent[];
/** Notifies when an agent run actually starts (useful for webchat command handling). */
onAgentRunStart?: (runId: string) => void;
onReplyStart?: () => Promise<void> | void;
onTypingController?: (typing: TypingController) => void;
isHeartbeat?: boolean;