* A conversation instance returned by `CAT.agent.conversation.create()` or `.get()`. * Provides methods for chatting, streaming, and managing message history.
| 1011 | * Provides methods for chatting, streaming, and managing message history. |
| 1012 | */ |
| 1013 | interface ConversationInstance { |
| 1014 | /** Conversation ID. */ |
| 1015 | readonly id: string; |
| 1016 | /** Conversation title. */ |
| 1017 | readonly title: string; |
| 1018 | /** Model ID used. */ |
| 1019 | readonly modelId: string; |
| 1020 | |
| 1021 | /** Send a message and wait for the full reply (with automatic tool-calling loop). */ |
| 1022 | chat(content: MessageContent, options?: ChatOptions): Promise<ChatReply>; |
| 1023 | |
| 1024 | /** Send a message and receive a streaming response. */ |
| 1025 | chatStream(content: MessageContent, options?: ChatOptions): Promise<AsyncIterable<StreamChunk>>; |
| 1026 | |
| 1027 | /** Get all messages in this conversation. */ |
| 1028 | getMessages(): Promise<ChatMessage[]>; |
| 1029 | |
| 1030 | /** Clear all messages in this conversation. */ |
| 1031 | clear(): Promise<void>; |
| 1032 | |
| 1033 | /** Persist the conversation to storage. */ |
| 1034 | save(): Promise<void>; |
| 1035 | } |
| 1036 | |
| 1037 | // ---- Conversation API ---- |
| 1038 |
nothing calls this directly
no outgoing calls
no test coverage detected