Class: SimpleChatStore<AdditionalMessageOptions>
fixme: User could carry object references in the messages. This could lead to memory leaks if the messages are not properly cleaned up.
Type parameters
Name | Type |
---|---|
AdditionalMessageOptions | extends object = Record <string , unknown > |
Implements
BaseChatStore
<AdditionalMessageOptions
>
Constructors
constructor
• new SimpleChatStore<AdditionalMessageOptions
>(): SimpleChatStore
<AdditionalMessageOptions
>
Type parameters
Name | Type |
---|---|
AdditionalMessageOptions | extends object = Record <string , unknown > |
Returns
SimpleChatStore
<AdditionalMessageOptions
>
Properties
store
• store: Object
= {}
Index signature
▪ [key: string
]: ChatMessage
<AdditionalMessageOptions
>[]
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:12
Methods
addMessage
▸ addMessage(key
, message
): void
Parameters
Name | Type |
---|---|
key | string |
message | ChatMessage <AdditionalMessageOptions > |
Returns
void
Implementation of
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:25
deleteLastMessage
▸ deleteLastMessage(key
): null
| ChatMessage
<AdditionalMessageOptions
>