Class: SimpleChatStore
Simple chat store.
Implements
Constructors
constructor
• new SimpleChatStore(): SimpleChatStore
Returns
Properties
store
• store: Object
= {}
Index signature
▪ [key: string
]: ChatMessage
[]
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:8
Methods
addMessage
▸ addMessage(key
, message
): void
Add message.
Parameters
Name | Type |
---|---|
key | string |
message | ChatMessage |
Returns
void
Implementation of
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:35
deleteLastMessage
▸ deleteLastMessage(key
): null
| ChatMessage
Delete last message.
Parameters
Name | Type |
---|---|
key | string |
Returns
null
| ChatMessage
Implementation of
BaseChatStore.deleteLastMessage
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:75
deleteMessage
▸ deleteMessage(key
, idx
): null
| ChatMessage
Delete message.
Parameters
Name | Type |
---|---|
key | string |
idx | number |
Returns
null
| ChatMessage
Implementation of
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:60
deleteMessages
▸ deleteMessages(key
): null
| ChatMessage
[]
Delete messages.
Parameters
Name | Type |
---|---|
key | string |
Returns
null
| ChatMessage
[]
Implementation of
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:45
getKeys
▸ getKeys(): string
[]
Get keys. @returns: keys
Returns
string
[]
Implementation of
Defined in
packages/core/src/storage/chatStore/SimpleChatStore.ts:89
getMessages
▸ getMessages(key
): ChatMessage
[]
Get messages.
Parameters
Name | Type |
---|---|
key | string |