@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
21 lines (20 loc) • 989 B
TypeScript
import type { ChatSoundSystem } from '../Chat/ChatProps';
import type { ChatMessage } from '../types/ChatMessage';
/**
* Plays the "message received" sound + vibration exactly once when the last
* assistant message transitions to a completed / finalized state.
*
* Notifications are suppressed for:
* - Every streaming chunk / intermediate content update
* - `message_typing` lifecycle events before the message is finalized
* - Re-renders of an already-notified completed message (idempotent)
* - Initial mount hydration with preloaded completed chat history
* - Switching to another chat thread that already contains completed history
* - User-originated messages
*
* @param messages - Current list of chat messages
* @param soundSystem - Optional sound system instance; no-op when absent
*
* @private internal hook of `<Chat/>`
*/
export declare function useChatCompleteNotification(messages: ReadonlyArray<ChatMessage>, soundSystem: ChatSoundSystem | undefined): void;