UseChatStorageResult
Defined in: src/expo/useChatStorage.ts:171
Result returned by useChatStorage hook (Expo version)
Extends base result with Expo-specific sendMessage signature.
Extends
BaseUseChatStorageResult
Properties
clearQueue()
clearQueue: () =>
void
Defined in: src/expo/useChatStorage.ts:200
Clear all queued operations without writing them.
Returns
void
conversationId
conversationId:
string|null
Defined in: src/lib/db/chat/types.ts:569
Inherited from
BaseUseChatStorageResult.conversationId
createConversation()
createConversation: (
options?:CreateConversationOptions) =>Promise<StoredConversation>
Defined in: src/lib/db/chat/types.ts:571
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Promise<StoredConversation>
Inherited from
BaseUseChatStorageResult.createConversation
createMemoryRetrievalTool()
createMemoryRetrievalTool: (
searchOptions?:Partial<MemoryRetrievalSearchOptions>) =>ToolConfig
Defined in: src/expo/useChatStorage.ts:192
Create a memory retrieval tool for LLM to search past conversations. The tool is pre-configured with the hook’s storage context and auth.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Optional search configuration (limit, minSimilarity, etc.) |
Returns
ToolConfig
A ToolConfig that can be passed to sendMessage’s clientTools
Example
const memoryTool = createMemoryRetrievalTool({ limit: 5 });
await sendMessage({
messages: [...],
clientTools: [memoryTool],
});deleteConversation()
deleteConversation: (
id:string) =>Promise<boolean>
Defined in: src/lib/db/chat/types.ts:577
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Promise<boolean>
Inherited from
BaseUseChatStorageResult.deleteConversation
flushQueue()
flushQueue: () =>
Promise<FlushResult>
Defined in: src/expo/useChatStorage.ts:197
Manually flush all queued operations for the current wallet.
Returns
Promise<FlushResult>
getConversation()
getConversation: (
id:string) =>Promise<StoredConversation|null>
Defined in: src/lib/db/chat/types.ts:574
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Promise<StoredConversation | null>
Inherited from
BaseUseChatStorageResult.getConversation
getConversations()
getConversations: () =>
Promise<StoredConversation[]>
Defined in: src/lib/db/chat/types.ts:575
Returns
Promise<StoredConversation[]>
Inherited from
BaseUseChatStorageResult.getConversations
getMessages()
getMessages: (
conversationId:string) =>Promise<StoredMessage[]>
Defined in: src/lib/db/chat/types.ts:578
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Promise<StoredMessage[]>
Inherited from
BaseUseChatStorageResult.getMessages
isLoading
isLoading:
boolean
Defined in: src/lib/db/chat/types.ts:567
Inherited from
BaseUseChatStorageResult.isLoading
queueStatus
queueStatus:
QueueStatus
Defined in: src/expo/useChatStorage.ts:203
Current status of the write queue.
sendMessage()
sendMessage: (
args:SendMessageWithStorageArgs) =>Promise<BaseSendMessageWithStorageResult>
Defined in: src/expo/useChatStorage.ts:173
Send a message and automatically store it (Expo version)
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Promise<BaseSendMessageWithStorageResult>
setConversationId()
setConversationId: (
id:string|null) =>void
Defined in: src/lib/db/chat/types.ts:570
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
void
Inherited from
BaseUseChatStorageResult.setConversationId
stop()
stop: () =>
void
Defined in: src/lib/db/chat/types.ts:568
Returns
void
Inherited from
BaseUseChatStorageResult.stop
updateConversationTitle()
updateConversationTitle: (
id:string,title:string) =>Promise<boolean>
Defined in: src/lib/db/chat/types.ts:576
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<boolean>
Inherited from
BaseUseChatStorageResult.updateConversationTitle