@meetsmore-oss/use-ai-client 1.7.0 → 1.8.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.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export { z } from 'zod';
3
- import { ToolAnnotations, ToolDefinition, WorkflowStatus, FeedbackValue, AgentInfo, MultimodalContent, UseAIForwardedProps, AGUIEvent, Message as Message$1, UseAIClientMessage } from '@meetsmore-oss/use-ai-core';
3
+ import { ToolAnnotations, ToolDefinition, WorkflowStatus, FeedbackValue, AgentInfo, MultimodalContent, UseAIForwardedProps, AGUIEvent, Message as Message$1, UseAIClientMessage, ToolApprovalRequestEvent } from '@meetsmore-oss/use-ai-core';
4
4
  export { AgentInfo, ToolAnnotations, ToolDefinition } from '@meetsmore-oss/use-ai-core';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import React$1, { ReactNode } from 'react';
6
+ import React$1, { MutableRefObject, RefObject, ReactNode } from 'react';
7
7
 
8
8
  /**
9
9
  * Options for configuring tool behavior.
@@ -1143,6 +1143,76 @@ declare class UseAIClient {
1143
1143
  submitFeedback(messageId: string, traceId: string, feedback: FeedbackValue): void;
1144
1144
  }
1145
1145
 
1146
+ interface RegisterToolsOptions {
1147
+ /** Mark component as invisible (no visual state, skip prompt wait) */
1148
+ invisible?: boolean;
1149
+ }
1150
+ /**
1151
+ * Pending tool approval request state.
1152
+ */
1153
+ interface PendingToolApproval {
1154
+ toolCallId: string;
1155
+ toolCallName: string;
1156
+ toolCallArgs: Record<string, unknown>;
1157
+ annotations?: ToolAnnotations;
1158
+ }
1159
+ interface UseToolSystemOptions {
1160
+ /** Reference to the UseAI client for sending responses */
1161
+ clientRef: RefObject<UseAIClient | null>;
1162
+ /** Builds the aggregated state from all registered prompts */
1163
+ buildState: () => unknown;
1164
+ }
1165
+ interface UseToolSystemReturn {
1166
+ /** Registers tools for a specific component */
1167
+ registerTools: (id: string, tools: ToolsDefinition, options?: RegisterToolsOptions) => void;
1168
+ /** Unregisters tools for a specific component */
1169
+ unregisterTools: (id: string) => void;
1170
+ /** Checks if a component is marked as invisible */
1171
+ isInvisible: (id: string) => boolean;
1172
+ /** All tools aggregated from registered components */
1173
+ aggregatedTools: ToolsDefinition;
1174
+ /** Whether any tools are registered */
1175
+ hasTools: boolean;
1176
+ /** Ref to current aggregated tools (for use in closures) */
1177
+ aggregatedToolsRef: MutableRefObject<ToolsDefinition>;
1178
+ /** Signals that a component has completed its registration in useLayoutEffect */
1179
+ signalReady: (id: string) => void;
1180
+ /** Current tool registry version (increments when tools change) */
1181
+ toolRegistryVersion: number;
1182
+ /** Registers a waiter function for a component (called when tool exec needs to wait for re-render) */
1183
+ registerWaiter: (id: string, waiter: () => Promise<void>) => void;
1184
+ /** Unregisters a waiter function */
1185
+ unregisterWaiter: (id: string) => void;
1186
+ /** All pending tool approval requests */
1187
+ pendingApprovals: PendingToolApproval[];
1188
+ /** Handle a tool approval request event from the server */
1189
+ handleApprovalRequest: (event: ToolApprovalRequestEvent) => void;
1190
+ /** Execute a tool call and send the response to the server */
1191
+ executeToolCall: (toolCallId: string, name: string, input: unknown) => Promise<void>;
1192
+ /** Store a tool call as pending approval (deferred execution) */
1193
+ storePendingToolCall: (toolCallId: string, name: string, input: unknown, toolCallData: {
1194
+ name: string;
1195
+ args: string;
1196
+ }) => void;
1197
+ /** Approve all pending tool calls and execute them */
1198
+ approveAll: () => Promise<void>;
1199
+ /** Reject all pending tool calls with optional reason */
1200
+ rejectAll: (reason?: string) => void;
1201
+ }
1202
+ /**
1203
+ * Unified hook for the tool lifecycle: registration, waiter coordination,
1204
+ * and execution (including approval flow).
1205
+ *
1206
+ * Merges what were previously three separate concerns:
1207
+ * - Tool registry (registration, aggregation, ownership tracking)
1208
+ * - Waiters (waiting for component re-renders after tool execution)
1209
+ * - Tool execution (running tools, sending responses, approval flow)
1210
+ *
1211
+ * The only external dependency is `buildState` from prompt management,
1212
+ * which provides the aggregated app state sent alongside tool responses.
1213
+ */
1214
+ declare function useToolSystem({ clientRef, buildState, }: UseToolSystemOptions): UseToolSystemReturn;
1215
+
1146
1216
  /**
1147
1217
  * Options for programmatically sending a message via sendMessage().
1148
1218
  */
@@ -1161,96 +1231,39 @@ interface SendMessageOptions {
1161
1231
  */
1162
1232
  forwardedProps?: UseAIForwardedProps;
1163
1233
  }
1164
- interface UseChatManagementOptions {
1165
- /** Chat repository for persistence */
1166
- repository: ChatRepository;
1167
- /** Reference to the UseAIClient (can be null during initialization) */
1168
- clientRef: React.MutableRefObject<UseAIClient | null>;
1169
- /** Current messages state (owned by provider) */
1170
- messages: Message[];
1171
- /** Setter for messages state (owned by provider) */
1172
- setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
1173
- /** Callback to send a message (from UseAIProvider) */
1174
- onSendMessage?: (message: string, attachments?: FileAttachment[], forwardedProps?: UseAIForwardedProps) => Promise<void>;
1234
+ interface UseMessageQueueOptions {
1235
+ /** The function that actually sends a message (the provider's handleSendMessage) */
1236
+ sendFn: (message: string, attachments?: FileAttachment[], forwardedProps?: UseAIForwardedProps) => Promise<void>;
1237
+ /** Creates a new chat */
1238
+ createNewChat: (options?: CreateChatOptions) => Promise<string>;
1175
1239
  /** Callback to open/close the chat panel */
1176
1240
  setOpen?: (open: boolean) => void;
1177
1241
  /** Whether the client is connected */
1178
- connected?: boolean;
1179
- /** Whether the AI is currently loading/processing a response */
1180
- loading?: boolean;
1242
+ connected: boolean;
1243
+ /** Whether the AI is currently loading/processing */
1244
+ loading: boolean;
1181
1245
  /** Whether there's a pending tool approval blocking the queue */
1182
- hasPendingApproval?: boolean;
1246
+ hasPendingApproval: boolean;
1183
1247
  }
1184
- interface UseChatManagementReturn {
1185
- /** Current active chat ID where AI responses are saved */
1186
- currentChatId: string | null;
1187
- /** Chat loaded for viewing but not yet active for AI responses */
1188
- pendingChatId: string | null;
1189
- /** The displayed chat ID (pending or current) */
1190
- displayedChatId: string | null;
1191
- /** Creates a new chat and switches to it */
1192
- createNewChat: (options?: CreateChatOptions) => Promise<string>;
1193
- /** Loads an existing chat by ID */
1194
- loadChat: (chatId: string) => Promise<void>;
1195
- /** Deletes a chat by ID */
1196
- deleteChat: (chatId: string) => Promise<void>;
1197
- /** Lists all available chats */
1198
- listChats: () => Promise<Array<Omit<Chat, 'messages'>>>;
1199
- /** Clears the current chat messages */
1200
- clearCurrentChat: () => Promise<void>;
1201
- /** Activates the pending chat (called when user sends first message) */
1202
- activatePendingChat: () => string | null;
1203
- /** Saves a user message to storage and reloads messages */
1204
- saveUserMessage: (chatId: string, content: PersistedMessageContent) => Promise<boolean>;
1205
- /** Saves an AI response to storage and optionally reloads messages */
1206
- saveAIResponse: (content: string, displayMode?: 'default' | 'error', traceId?: string) => Promise<void>;
1207
- /** Reloads messages from storage for the given chat ID */
1208
- reloadMessages: (chatId: string) => Promise<void>;
1248
+ interface UseMessageQueueReturn {
1209
1249
  /**
1210
1250
  * Programmatically send a message to the chat.
1211
- * Throws on failure (e.g., not connected, no onSendMessage callback).
1251
+ * Messages are queued and processed one at a time.
1252
+ * Throws on failure (e.g., not connected, no sendFn).
1212
1253
  */
1213
1254
  sendMessage: (message: string, options?: SendMessageOptions) => Promise<void>;
1214
- /** Get the current chat object. Metadata is frozen to prevent accidental mutation. */
1215
- getCurrentChat: () => Promise<Chat | null>;
1216
- /** Update metadata for the current chat */
1217
- updateMetadata: (metadata: ChatMetadata, overwrite?: boolean) => Promise<void>;
1218
- /** Snapshot refs for use in event handlers */
1219
- currentChatIdSnapshot: React.MutableRefObject<string | null>;
1220
- pendingChatIdSnapshot: React.MutableRefObject<string | null>;
1221
1255
  }
1222
1256
  /**
1223
- * Hook for managing chat lifecycle operations.
1257
+ * Hook for queuing and sending programmatic messages.
1224
1258
  *
1225
- * Features:
1226
- * - Creates, loads, deletes chats
1227
- * - Manages pending/active chat state machine
1228
- * - Saves user messages and AI responses
1229
- * - Auto-generates chat titles
1230
- * - Initializes with most recent chat or creates new one
1231
- *
1232
- * @example
1233
- * ```typescript
1234
- * const {
1235
- * currentChatId,
1236
- * pendingChatId,
1237
- * createNewChat,
1238
- * loadChat,
1239
- * deleteChat,
1240
- * listChats,
1241
- * clearCurrentChat,
1242
- * activatePendingChat,
1243
- * saveUserMessage,
1244
- * saveAIResponse,
1245
- * } = useChatManagement({
1246
- * repository: chatRepository,
1247
- * clientRef,
1248
- * messages,
1249
- * setMessages,
1250
- * });
1251
- * ```
1259
+ * Handles:
1260
+ * - Message queuing (one at a time)
1261
+ * - Waiting for loading + approval to complete between messages
1262
+ * - Creating new chats before sending
1263
+ * - Opening the chat panel after sending
1264
+ * - Converting File[] to FileAttachment[]
1252
1265
  */
1253
- declare function useChatManagement({ repository, clientRef, messages, setMessages, onSendMessage, setOpen, connected, loading, hasPendingApproval, }: UseChatManagementOptions): UseChatManagementReturn;
1266
+ declare function useMessageQueue({ sendFn, createNewChat, setOpen, connected, loading, hasPendingApproval, }: UseMessageQueueOptions): UseMessageQueueReturn;
1254
1267
 
1255
1268
  /**
1256
1269
  * Chat management context (from useChatManagement hook).
@@ -1311,15 +1324,19 @@ interface CommandContextValue {
1311
1324
  delete: (id: string) => Promise<void>;
1312
1325
  }
1313
1326
  /**
1314
- * Tool registry context (from useToolRegistry hook).
1327
+ * Tool system context (from useToolSystem hook).
1315
1328
  */
1316
1329
  interface ToolRegistryContextValue {
1317
1330
  /** Registers tools for a specific component */
1318
- register: (id: string, tools: ToolsDefinition, options?: {
1319
- invisible?: boolean;
1320
- }) => void;
1331
+ register: (id: string, tools: ToolsDefinition, options?: RegisterToolsOptions) => void;
1321
1332
  /** Unregisters tools for a specific component */
1322
1333
  unregister: (id: string) => void;
1334
+ /** Signals that a component has completed registration in useLayoutEffect */
1335
+ signalReady: (id: string) => void;
1336
+ /** Registers a waiter function for a component */
1337
+ registerWaiter: (id: string, waiter: () => Promise<void>) => void;
1338
+ /** Unregisters a waiter function */
1339
+ unregisterWaiter: (id: string) => void;
1323
1340
  }
1324
1341
  /**
1325
1342
  * Prompt management context.
@@ -1327,10 +1344,6 @@ interface ToolRegistryContextValue {
1327
1344
  interface PromptsContextValue {
1328
1345
  /** Updates the prompt and suggestions for a specific component */
1329
1346
  update: (id: string, prompt?: string, suggestions?: string[]) => void;
1330
- /** Registers a waiter function for a component */
1331
- registerWaiter: (id: string, waiter: () => Promise<void>) => void;
1332
- /** Unregisters a waiter function */
1333
- unregisterWaiter: (id: string) => void;
1334
1347
  }
1335
1348
  /**
1336
1349
  * Context value provided by UseAIProvider.
@@ -1343,15 +1356,15 @@ interface UseAIContextValue {
1343
1356
  connected: boolean;
1344
1357
  /** The underlying WebSocket client instance */
1345
1358
  client: UseAIClient | null;
1346
- /** Tool registry (from useToolRegistry hook) */
1359
+ /** Tool system (registry, waiters, execution) */
1347
1360
  tools: ToolRegistryContextValue;
1348
1361
  /** Prompt management */
1349
1362
  prompts: PromptsContextValue;
1350
- /** Chat management (from useChatManagement hook) */
1363
+ /** Chat management */
1351
1364
  chat: ChatContextValue;
1352
- /** Agent selection (from useAgentSelection hook) */
1365
+ /** Agent selection */
1353
1366
  agents: AgentContextValue;
1354
- /** Command management (from useCommandManagement hook) */
1367
+ /** Command management */
1355
1368
  commands: CommandContextValue;
1356
1369
  }
1357
1370
  /**
@@ -1557,18 +1570,6 @@ declare function UseAIProvider({ serverUrl, children, systemPrompt, CustomButton
1557
1570
  /**
1558
1571
  * Hook to access the UseAI context.
1559
1572
  * When used outside a UseAIProvider, returns a no-op context and logs a warning.
1560
- * This allows components with useAI hooks to render even when UseAIProvider
1561
- * is conditionally not rendered (e.g., feature flagged).
1562
- *
1563
- * @returns The UseAI context value (or no-op if provider is missing)
1564
- *
1565
- * @example
1566
- * ```typescript
1567
- * function MyComponent() {
1568
- * const { connected, client } = useAIContext();
1569
- * return <div>Connected: {connected}</div>;
1570
- * }
1571
- * ```
1572
1573
  */
1573
1574
  declare function useAIContext(): UseAIContextValue;
1574
1575
 
@@ -2018,6 +2019,63 @@ interface UseSlashCommandsReturn {
2018
2019
  */
2019
2020
  declare function useSlashCommands({ commands, onCommandSelect, onSaveCommand, onRenameCommand, onDeleteCommand, }: UseSlashCommandsOptions): UseSlashCommandsReturn;
2020
2021
 
2022
+ interface UseChatManagementOptions {
2023
+ /** Chat repository for persistence */
2024
+ repository: ChatRepository;
2025
+ /** Reference to the UseAIClient (can be null during initialization) */
2026
+ clientRef: React.MutableRefObject<UseAIClient | null>;
2027
+ /** Current messages state (owned by provider) */
2028
+ messages: Message[];
2029
+ /** Setter for messages state (owned by provider) */
2030
+ setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
2031
+ /** Whether the client is connected */
2032
+ connected?: boolean;
2033
+ }
2034
+ interface UseChatManagementReturn {
2035
+ /** Current active chat ID where AI responses are saved */
2036
+ currentChatId: string | null;
2037
+ /** Chat loaded for viewing but not yet active for AI responses */
2038
+ pendingChatId: string | null;
2039
+ /** The displayed chat ID (pending or current) */
2040
+ displayedChatId: string | null;
2041
+ /** Creates a new chat and switches to it */
2042
+ createNewChat: (options?: CreateChatOptions) => Promise<string>;
2043
+ /** Loads an existing chat by ID */
2044
+ loadChat: (chatId: string) => Promise<void>;
2045
+ /** Deletes a chat by ID */
2046
+ deleteChat: (chatId: string) => Promise<void>;
2047
+ /** Lists all available chats */
2048
+ listChats: () => Promise<Array<Omit<Chat, 'messages'>>>;
2049
+ /** Clears the current chat messages */
2050
+ clearCurrentChat: () => Promise<void>;
2051
+ /** Activates the pending chat (called when user sends first message) */
2052
+ activatePendingChat: () => string | null;
2053
+ /** Saves a user message to storage and reloads messages */
2054
+ saveUserMessage: (chatId: string, content: PersistedMessageContent) => Promise<boolean>;
2055
+ /** Saves an AI response to storage and optionally reloads messages */
2056
+ saveAIResponse: (content: string, displayMode?: 'default' | 'error', traceId?: string) => Promise<void>;
2057
+ /** Reloads messages from storage for the given chat ID */
2058
+ reloadMessages: (chatId: string) => Promise<void>;
2059
+ /** Get the current chat object. Metadata is frozen to prevent accidental mutation. */
2060
+ getCurrentChat: () => Promise<Chat | null>;
2061
+ /** Update metadata for the current chat */
2062
+ updateMetadata: (metadata: ChatMetadata, overwrite?: boolean) => Promise<void>;
2063
+ /** Snapshot refs for use in event handlers */
2064
+ currentChatIdSnapshot: React.MutableRefObject<string | null>;
2065
+ pendingChatIdSnapshot: React.MutableRefObject<string | null>;
2066
+ }
2067
+ /**
2068
+ * Hook for managing chat lifecycle operations.
2069
+ *
2070
+ * Features:
2071
+ * - Creates, loads, deletes chats
2072
+ * - Manages pending/active chat state machine
2073
+ * - Saves user messages and AI responses
2074
+ * - Auto-generates chat titles
2075
+ * - Initializes with most recent chat or creates new one
2076
+ */
2077
+ declare function useChatManagement({ repository, clientRef, messages, setMessages, connected, }: UseChatManagementOptions): UseChatManagementReturn;
2078
+
2021
2079
  interface UseAgentSelectionOptions {
2022
2080
  /** Reference to the UseAIClient (can be null during initialization) */
2023
2081
  clientRef: React.MutableRefObject<UseAIClient | null>;
@@ -2125,33 +2183,6 @@ interface UseCommandManagementReturn {
2125
2183
  */
2126
2184
  declare function useCommandManagement({ repository, }?: UseCommandManagementOptions): UseCommandManagementReturn;
2127
2185
 
2128
- interface RegisterToolsOptions {
2129
- /** Mark component as invisible (no visual state, skip prompt wait) */
2130
- invisible?: boolean;
2131
- }
2132
- interface UseToolRegistryReturn {
2133
- /** Registers tools for a specific component */
2134
- registerTools: (id: string, tools: ToolsDefinition, options?: RegisterToolsOptions) => void;
2135
- /** Unregisters tools for a specific component */
2136
- unregisterTools: (id: string) => void;
2137
- /** Checks if a component is marked as invisible */
2138
- isInvisible: (id: string) => boolean;
2139
- /** All tools aggregated from registered components */
2140
- aggregatedTools: ToolsDefinition;
2141
- /** Whether any tools are registered */
2142
- hasTools: boolean;
2143
- /** Ref to current aggregated tools (for use in closures) */
2144
- aggregatedToolsRef: React.MutableRefObject<ToolsDefinition>;
2145
- /** Ref mapping tool names to component IDs */
2146
- toolOwnershipRef: React.MutableRefObject<Map<string, string>>;
2147
- }
2148
- /**
2149
- * Hook for managing tool registration and aggregation.
2150
- *
2151
- * Only handles tools - prompt management is handled separately.
2152
- */
2153
- declare function useToolRegistry(): UseToolRegistryReturn;
2154
-
2155
2186
  interface UsePromptStateOptions {
2156
2187
  /** System prompt to include in state */
2157
2188
  systemPrompt?: string;
@@ -2163,16 +2194,12 @@ interface UsePromptStateOptions {
2163
2194
  interface UsePromptStateReturn {
2164
2195
  /** Updates the prompt and suggestions for a specific component */
2165
2196
  updatePrompt: (id: string, prompt?: string, suggestions?: string[]) => void;
2166
- /** Registers a waiter function for a component */
2167
- registerWaiter: (id: string, waiter: () => Promise<void>) => void;
2168
- /** Unregisters a waiter function */
2169
- unregisterWaiter: (id: string) => void;
2170
- /** Gets the waiter function for a component */
2171
- getWaiter: (id: string) => (() => Promise<void>) | undefined;
2172
2197
  /** All suggestions aggregated from registered components */
2173
2198
  aggregatedSuggestions: string[];
2174
- /** Ref mapping component IDs to prompts */
2175
- promptsRef: React.MutableRefObject<Map<string, string>>;
2199
+ /** Builds the aggregated state from all registered prompts */
2200
+ buildStateFromPrompts: () => {
2201
+ context: string;
2202
+ } | null;
2176
2203
  }
2177
2204
  /**
2178
2205
  * Hook for managing prompt state across multiple useAI hooks.
@@ -2180,11 +2207,56 @@ interface UsePromptStateReturn {
2180
2207
  * Handles:
2181
2208
  * - Storing prompts and suggestions per component
2182
2209
  * - Updating client state when prompts change
2183
- * - Managing waiter functions for prompt change notifications
2184
2210
  * - Aggregating suggestions from all components
2185
2211
  */
2186
2212
  declare function usePromptState({ systemPrompt, clientRef, connected, }: UsePromptStateOptions): UsePromptStateReturn;
2187
2213
 
2214
+ interface UseServerEventsOptions {
2215
+ /** Tool system for executing tools and looking up tool metadata */
2216
+ toolSystem: UseToolSystemReturn;
2217
+ /** Saves an AI response to chat storage */
2218
+ saveAIResponse: (content: string, displayMode?: 'default' | 'error', traceId?: string) => Promise<void>;
2219
+ /** UI strings for error messages and tool execution fallbacks */
2220
+ strings: UseAIStrings;
2221
+ }
2222
+ interface ExecutingToolDisplay {
2223
+ displayText: string;
2224
+ }
2225
+ interface UseServerEventsReturn {
2226
+ /** Whether the AI is currently loading/processing a response */
2227
+ loading: boolean;
2228
+ /** Set the loading state (e.g., when sending a message) */
2229
+ setLoading: React.Dispatch<React.SetStateAction<boolean>>;
2230
+ /** Current streaming text from the AI response */
2231
+ streamingText: string;
2232
+ /** Clear streaming text (e.g., when starting a new message) */
2233
+ clearStreamingText: () => void;
2234
+ /** Currently executing tool info for UI display, or null */
2235
+ executingTool: ExecutingToolDisplay | null;
2236
+ /** Ref tracking which chat the current streaming text belongs to */
2237
+ streamingChatIdRef: React.MutableRefObject<string | null>;
2238
+ /**
2239
+ * Handles a server event. Called from the provider's client subscription.
2240
+ * Takes the client instance so it can access client-internal state
2241
+ * (currentToolCalls, currentMessageContent).
2242
+ */
2243
+ handleServerEvent: (client: UseAIClient, event: AGUIEvent) => Promise<void>;
2244
+ }
2245
+ /**
2246
+ * Hook that owns all server event handling state and logic.
2247
+ *
2248
+ * Manages:
2249
+ * - Loading state (set on message send, cleared on RUN_FINISHED/RUN_ERROR)
2250
+ * - Streaming text accumulation (TEXT_MESSAGE_CONTENT/END events)
2251
+ * - Executing tool display (TOOL_CALL_START/END events)
2252
+ * - Tool execution dispatch (delegates to toolSystem)
2253
+ * - Error handling (RUN_ERROR events)
2254
+ *
2255
+ * The provider creates the client and subscribes `handleServerEvent` to it.
2256
+ * This hook doesn't manage the client lifecycle — only the event handling.
2257
+ */
2258
+ declare function useServerEvents({ toolSystem, saveAIResponse, strings, }: UseServerEventsOptions): UseServerEventsReturn;
2259
+
2188
2260
  interface UseFeedbackOptions {
2189
2261
  /** Reference to the UseAIClient */
2190
2262
  clientRef: React.MutableRefObject<UseAIClient | null>;
@@ -2304,4 +2376,4 @@ interface UseDropdownStateOptions {
2304
2376
  */
2305
2377
  declare function useDropdownState(options?: UseDropdownStateOptions): UseDropdownStateReturn;
2306
2378
 
2307
- export { type AgentContextValue, type Chat, type ChatContextValue, type ChatMetadata, type ChatPanelProps, type ChatRepository, CloseButton, type CommandContextValue, type CommandRepository, type CreateChatOptions, type CreateCommandOptions, DEFAULT_MAX_FILE_SIZE, type DefinedTool, type DropZoneProps, EmbedFileUploadBackend, type FileAttachment, type FileProcessingState, type FileProcessingStatus, type FileTransformer, type FileTransformerContext, type FileTransformerMap, type FileUploadBackend, type FileUploadConfig, type FloatingButtonProps, type InlineSaveProps, type ListChatsOptions, type ListCommandsOptions, LocalStorageChatRepository, LocalStorageCommandRepository, type Message, type PersistedContentPart, type PersistedFileContent, type PersistedFileMetadata, type PersistedMessage, type PersistedMessageContent, type PersistedTextContent, type ProcessAttachmentsConfig, type PromptsContextValue, type RegisterToolsOptions, type SavedCommand, type SendMessageOptions, type ToolOptions, type ToolRegistryContextValue, type ToolsDefinition, type TriggerWorkflowOptions, UseAIChat, UseAIChatPanel, type UseAIChatPanelProps, type UseAIChatPanelStrings, type UseAIChatPanelTheme, type UseAIChatProps, UseAIClient, type UseAIConfig, type UseAIContextValue, UseAIFloatingButton, UseAIFloatingChatWrapper, type UseAIOptions, UseAIProvider, type UseAIProviderProps, type UseAIResult, type UseAIStrings, type UseAITheme, type UseAIWorkflowResult, type UseAgentSelectionOptions, type UseAgentSelectionReturn, type UseChatManagementOptions, type UseChatManagementReturn, type UseCommandManagementOptions, type UseCommandManagementReturn, type UseDropdownStateOptions, type UseDropdownStateReturn, type UseFeedbackOptions, type UseFeedbackReturn, type UseFileUploadOptions, type UseFileUploadReturn, type UsePromptStateOptions, type UsePromptStateReturn, type UseSlashCommandsOptions, type UseSlashCommandsReturn, type UseToolRegistryReturn, type WorkflowProgress, clearTransformationCache, convertToolsToDefinitions, defaultStrings, defaultTheme, defineTool, executeDefinedTool, findTransformerPattern, generateChatId, generateCommandId, generateMessageId, matchesMimeType, processAttachments, useAI, useAIContext, useAIWorkflow, useAgentSelection, useChatManagement, useCommandManagement, useDropdownState, useFeedback, useFileUpload, usePromptState, useSlashCommands, useStableTools, useStrings, useTheme, useToolRegistry, validateCommandName };
2379
+ export { type AgentContextValue, type Chat, type ChatContextValue, type ChatMetadata, type ChatPanelProps, type ChatRepository, CloseButton, type CommandContextValue, type CommandRepository, type CreateChatOptions, type CreateCommandOptions, DEFAULT_MAX_FILE_SIZE, type DefinedTool, type DropZoneProps, EmbedFileUploadBackend, type ExecutingToolDisplay, type FileAttachment, type FileProcessingState, type FileProcessingStatus, type FileTransformer, type FileTransformerContext, type FileTransformerMap, type FileUploadBackend, type FileUploadConfig, type FloatingButtonProps, type InlineSaveProps, type ListChatsOptions, type ListCommandsOptions, LocalStorageChatRepository, LocalStorageCommandRepository, type Message, type PendingToolApproval, type PersistedContentPart, type PersistedFileContent, type PersistedFileMetadata, type PersistedMessage, type PersistedMessageContent, type PersistedTextContent, type ProcessAttachmentsConfig, type PromptsContextValue, type RegisterToolsOptions, type SavedCommand, type SendMessageOptions, type ToolOptions, type ToolRegistryContextValue, type ToolsDefinition, type TriggerWorkflowOptions, UseAIChat, UseAIChatPanel, type UseAIChatPanelProps, type UseAIChatPanelStrings, type UseAIChatPanelTheme, type UseAIChatProps, UseAIClient, type UseAIConfig, type UseAIContextValue, UseAIFloatingButton, UseAIFloatingChatWrapper, type UseAIOptions, UseAIProvider, type UseAIProviderProps, type UseAIResult, type UseAIStrings, type UseAITheme, type UseAIWorkflowResult, type UseAgentSelectionOptions, type UseAgentSelectionReturn, type UseChatManagementOptions, type UseChatManagementReturn, type UseCommandManagementOptions, type UseCommandManagementReturn, type UseDropdownStateOptions, type UseDropdownStateReturn, type UseFeedbackOptions, type UseFeedbackReturn, type UseFileUploadOptions, type UseFileUploadReturn, type UseMessageQueueOptions, type UseMessageQueueReturn, type UsePromptStateOptions, type UsePromptStateReturn, type UseServerEventsOptions, type UseServerEventsReturn, type UseSlashCommandsOptions, type UseSlashCommandsReturn, type UseToolSystemOptions, type UseToolSystemReturn, type WorkflowProgress, clearTransformationCache, convertToolsToDefinitions, defaultStrings, defaultTheme, defineTool, executeDefinedTool, findTransformerPattern, generateChatId, generateCommandId, generateMessageId, matchesMimeType, processAttachments, useAI, useAIContext, useAIWorkflow, useAgentSelection, useChatManagement, useCommandManagement, useDropdownState, useFeedback, useFileUpload, useMessageQueue, usePromptState, useServerEvents, useSlashCommands, useStableTools, useStrings, useTheme, useToolSystem, validateCommandName };