35 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-01-06 03:05:11 +00:00
import type { TypingController } from "./reply/typing.js";
export type BlockReplyContext = {
abortSignal?: AbortSignal;
timeoutMs?: number;
};
export type GetReplyOptions = {
onReplyStart?: () => Promise<void> | void;
2026-01-06 03:05:11 +00:00
onTypingController?: (typing: TypingController) => void;
2025-12-03 00:40:19 +00:00
isHeartbeat?: boolean;
onPartialReply?: (payload: ReplyPayload) => Promise<void> | void;
2026-01-07 11:08:11 +01:00
onReasoningStream?: (payload: ReplyPayload) => Promise<void> | void;
onBlockReply?: (
payload: ReplyPayload,
context?: BlockReplyContext,
) => Promise<void> | void;
2025-12-20 13:47:07 +00:00
onToolResult?: (payload: ReplyPayload) => Promise<void> | void;
2026-01-07 11:08:11 +01:00
disableBlockStreaming?: boolean;
/** Timeout for block reply delivery (ms). */
blockReplyTimeoutMs?: number;
/** If provided, only load these skills for this session (empty = no skills). */
skillFilter?: string[];
};
export type ReplyPayload = {
text?: string;
mediaUrl?: string;
mediaUrls?: string[];
2026-01-02 23:18:41 +01:00
replyToId?: string;
/** Send audio as voice message (bubble) instead of audio file. Defaults to false. */
audioAsVoice?: boolean;
2026-01-06 22:43:29 +01:00
isError?: boolean;
};