MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / ConversationInstance

Interface ConversationInstance

src/types/scriptcat.d.ts:1013–1035  ·  view source on GitHub ↗

* A conversation instance returned by `CAT.agent.conversation.create()` or `.get()`. * Provides methods for chatting, streaming, and managing message history.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Implementers 1

ConversationInstancesrc/app/service/content/gm_api/cat_age

Calls

no outgoing calls

Tested by

no test coverage detected