/** * Reaction handling logic extracted from wait-tool.ts. * * Two scenarios: * 1. Reaction arrives alongside operator messages → inline into content blocks * 2. Reaction arrives with no messages → return standalone reaction envelope */ import { type initMemoryDb } from "../../data/memory/index.js"; import type { TelegramClient } from "../../services/telegram.js"; import type { TextBlock, ImageBlock, ToolResult } from "../../lib/types.js"; interface ReactionContext { telegram: TelegramClient; getMemoryDb: () => ReturnType; effectiveThreadId: number | undefined; sessionStartedAt: number; } /** * If a pending operator reaction exists, inline it into the last text block * of `contentBlocks` (or append a standalone block) and persist an * `operator_reaction` episode. Clears the reaction after delivery. * * Mutates `contentBlocks` in place. */ export declare function handleReactionWithMessages(contentBlocks: Array, ctx: ReactionContext): Promise; /** * If no text messages arrived but a pending reaction exists, build a * standalone `<<< OPERATOR REACTION >>>` envelope and save the episode. * * Returns a `ToolResult` when a reaction was consumed, or `null` if none * was pending. */ export declare function handleReactionOnly(ctx: ReactionContext & { autonomousMode: boolean; }): Promise; export {}; //# sourceMappingURL=reaction-handler.d.ts.map