@meetsmore-oss/use-ai-client 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generateChatId,
3
3
  generateMessageId
4
- } from "./chunk-EGD4LT6R.js";
4
+ } from "./chunk-QTQR7MAU.js";
5
5
  export {
6
6
  generateChatId,
7
7
  generateMessageId
8
8
  };
9
- //# sourceMappingURL=types-INERONQV.js.map
9
+ //# sourceMappingURL=types-64CH2HXY.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generateChatId,
3
3
  generateMessageId
4
- } from "./chunk-EGKUR4C7.js";
4
+ } from "./chunk-AKQM6IWU.js";
5
5
  export {
6
6
  generateChatId,
7
7
  generateMessageId
8
8
  };
9
- //# sourceMappingURL=types-TVUXB3NB.js.map
9
+ //# sourceMappingURL=types-STDS67SG.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetsmore-oss/use-ai-client",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "license": "BUSL-1.1",
5
5
  "files": [
6
6
  "dist"
@@ -33,7 +33,7 @@
33
33
  "test": "bun test --only-failures"
34
34
  },
35
35
  "dependencies": {
36
- "@meetsmore-oss/use-ai-core": "1.2.3",
36
+ "@meetsmore-oss/use-ai-core": "1.3.0",
37
37
  "react-markdown": "^8.0.0",
38
38
  "socket.io-client": "^4.8.1",
39
39
  "uuid": "^11.1.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/providers/chatRepository/types.ts"],"sourcesContent":["import type { PersistedFileMetadata } from '../../fileUpload/types';\n\n/**\n * Display mode for chat messages.\n * Determines the visual styling of the message bubble.\n */\nexport type MessageDisplayMode = 'default' | 'error';\n\n/**\n * Text content part for persisted messages.\n */\nexport interface PersistedTextContent {\n type: 'text';\n text: string;\n}\n\n/**\n * File content part for persisted messages.\n * Only stores metadata, not the actual file data.\n */\nexport interface PersistedFileContent {\n type: 'file';\n file: PersistedFileMetadata;\n}\n\n/**\n * Content part for persisted messages.\n * Can be text or file metadata.\n */\nexport type PersistedContentPart = PersistedTextContent | PersistedFileContent;\n\n/**\n * Content that can be persisted.\n * Simple string for text-only messages, or array for multimodal content.\n */\nexport type PersistedMessageContent = string | PersistedContentPart[];\n\n/**\n * Message format for persisted chat history.\n * Compatible with AI SDK's UIMessage format for future integration.\n */\nexport interface PersistedMessage {\n id: string;\n role: 'user' | 'assistant' | 'tool';\n /** Content can be a string or multimodal content array */\n content: PersistedMessageContent;\n createdAt: Date;\n displayMode?: MessageDisplayMode;\n}\n\n/**\n * Represents a stored chat conversation.\n */\nexport interface Chat {\n id: string;\n title?: string;\n messages: PersistedMessage[];\n createdAt: Date;\n updatedAt: Date;\n}\n\n/**\n * Options for creating a new chat.\n */\nexport interface CreateChatOptions {\n title?: string;\n}\n\n/**\n * Options for listing chats.\n */\nexport interface ListChatsOptions {\n limit?: number;\n offset?: number;\n}\n\n/**\n * Abstract repository interface for chat persistence.\n * Implementations can store chats locally (localStorage, IndexedDB)\n * or remotely (REST API, GraphQL, etc.)\n */\nexport interface ChatRepository {\n /**\n * Creates a new chat and returns its ID.\n * @param options Optional configuration for the new chat\n * @returns Promise resolving to the new chat ID\n */\n createChat(options?: CreateChatOptions): Promise<string>;\n\n /**\n * Loads a chat by ID.\n * @param id Chat ID to load\n * @returns Promise resolving to the chat, or null if not found\n */\n loadChat(id: string): Promise<Chat | null>;\n\n /**\n * Saves or updates a chat.\n * @param chat Chat to save\n * @returns Promise resolving when save is complete\n */\n saveChat(chat: Chat): Promise<void>;\n\n /**\n * Deletes a chat by ID.\n * @param id Chat ID to delete\n * @returns Promise resolving when deletion is complete\n */\n deleteChat(id: string): Promise<void>;\n\n /**\n * Lists all available chats (metadata only, without full message history).\n * @param options Optional pagination and filtering options\n * @returns Promise resolving to array of chat metadata\n */\n listChats(options?: ListChatsOptions): Promise<Array<Omit<Chat, 'messages'>>>;\n\n /**\n * Deletes all stored chats.\n * @returns Promise resolving when all chats are deleted\n */\n deleteAll(): Promise<void>;\n}\n\n/**\n * Generates a unique chat ID.\n */\nexport function generateChatId(): string {\n return `chat_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Generates a unique message ID.\n */\nexport function generateMessageId(): string {\n return `msg_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HO,SAAS,iBAAyB;AACvC,SAAO,QAAQ,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC;AACzE;AAKO,SAAS,oBAA4B;AAC1C,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC;AACxE;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/providers/chatRepository/types.ts"],"sourcesContent":["import type { PersistedFileMetadata } from '../../fileUpload/types';\n\n/**\n * Display mode for chat messages.\n * Determines the visual styling of the message bubble.\n */\nexport type MessageDisplayMode = 'default' | 'error';\n\n/**\n * Text content part for persisted messages.\n */\nexport interface PersistedTextContent {\n type: 'text';\n text: string;\n}\n\n/**\n * File content part for persisted messages.\n * Only stores metadata, not the actual file data.\n */\nexport interface PersistedFileContent {\n type: 'file';\n file: PersistedFileMetadata;\n}\n\n/**\n * Content part for persisted messages.\n * Can be text or file metadata.\n */\nexport type PersistedContentPart = PersistedTextContent | PersistedFileContent;\n\n/**\n * Content that can be persisted.\n * Simple string for text-only messages, or array for multimodal content.\n */\nexport type PersistedMessageContent = string | PersistedContentPart[];\n\n/**\n * Message format for persisted chat history.\n * Compatible with AI SDK's UIMessage format for future integration.\n */\nexport interface PersistedMessage {\n id: string;\n role: 'user' | 'assistant' | 'tool';\n /** Content can be a string or multimodal content array */\n content: PersistedMessageContent;\n createdAt: Date;\n displayMode?: MessageDisplayMode;\n}\n\n/**\n * Represents a stored chat conversation.\n */\nexport interface Chat {\n id: string;\n title?: string;\n messages: PersistedMessage[];\n createdAt: Date;\n updatedAt: Date;\n}\n\n/**\n * Options for creating a new chat.\n */\nexport interface CreateChatOptions {\n title?: string;\n}\n\n/**\n * Options for listing chats.\n */\nexport interface ListChatsOptions {\n limit?: number;\n offset?: number;\n}\n\n/**\n * Abstract repository interface for chat persistence.\n * Implementations can store chats locally (localStorage, IndexedDB)\n * or remotely (REST API, GraphQL, etc.)\n */\nexport interface ChatRepository {\n /**\n * Creates a new chat and returns its ID.\n * @param options Optional configuration for the new chat\n * @returns Promise resolving to the new chat ID\n */\n createChat(options?: CreateChatOptions): Promise<string>;\n\n /**\n * Loads a chat by ID.\n * @param id Chat ID to load\n * @returns Promise resolving to the chat, or null if not found\n */\n loadChat(id: string): Promise<Chat | null>;\n\n /**\n * Saves or updates a chat.\n * @param chat Chat to save\n * @returns Promise resolving when save is complete\n */\n saveChat(chat: Chat): Promise<void>;\n\n /**\n * Deletes a chat by ID.\n * @param id Chat ID to delete\n * @returns Promise resolving when deletion is complete\n */\n deleteChat(id: string): Promise<void>;\n\n /**\n * Lists all available chats (metadata only, without full message history).\n * @param options Optional pagination and filtering options\n * @returns Promise resolving to array of chat metadata\n */\n listChats(options?: ListChatsOptions): Promise<Array<Omit<Chat, 'messages'>>>;\n\n /**\n * Deletes all stored chats.\n * @returns Promise resolving when all chats are deleted\n */\n deleteAll(): Promise<void>;\n}\n\n/**\n * Generates a unique chat ID.\n */\nexport function generateChatId(): string {\n return `chat_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Generates a unique message ID.\n */\nexport function generateMessageId(): string {\n return `msg_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;\n}\n"],"mappings":";AA+HO,SAAS,iBAAyB;AACvC,SAAO,QAAQ,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC;AACzE;AAKO,SAAS,oBAA4B;AAC1C,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC;AACxE;","names":[]}