Joey Krug 3bf55561cb fix: apply media understanding to followup-queued messages (#44682)
Voice notes arriving while the agent is mid-turn were queued as
followup messages without audio transcription. The followup runner
called runEmbeddedPiAgent directly, bypassing applyMediaUnderstanding.

This adds a mediaContext field to FollowupRun that snapshots the
original message's media fields. Before the agent run, the followup
runner checks whether media understanding was applied. If not (empty
MediaUnderstanding), it calls applyMediaUnderstanding and rebuilds the
prompt with the transcript, matching the primary path's formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:55:53 -04:00

20 lines
628 B
TypeScript

export type { ClearSessionQueueResult } from "./queue/cleanup.js";
export { clearSessionQueues } from "./queue/cleanup.js";
export { extractQueueDirective } from "./queue/directive.js";
export { scheduleFollowupDrain } from "./queue/drain.js";
export {
enqueueFollowupRun,
getFollowupQueueDepth,
resetRecentQueuedMessageIdDedupe,
} from "./queue/enqueue.js";
export { resolveQueueSettings } from "./queue/settings.js";
export { clearFollowupQueue } from "./queue/state.js";
export type {
FollowupMediaContext,
FollowupRun,
QueueDedupeMode,
QueueDropPolicy,
QueueMode,
QueueSettings,
} from "./queue/types.js";