@apteva/apteva-kit 0.1.12 → 0.1.14
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.mts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +1156 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1348 -311
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -162,6 +162,11 @@ interface SendMessageParams {
|
|
|
162
162
|
metadata?: Record<string, any>;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
interface SuggestedPrompt {
|
|
166
|
+
text: string;
|
|
167
|
+
icon?: React.ReactNode;
|
|
168
|
+
description?: string;
|
|
169
|
+
}
|
|
165
170
|
interface ChatProps {
|
|
166
171
|
agentId: string;
|
|
167
172
|
threadId?: string | null;
|
|
@@ -170,10 +175,26 @@ interface ChatProps {
|
|
|
170
175
|
apiUrl?: string;
|
|
171
176
|
apiKey?: string;
|
|
172
177
|
useMock?: boolean;
|
|
178
|
+
initialMode?: 'chat' | 'command';
|
|
179
|
+
showModeToggle?: boolean;
|
|
180
|
+
onModeChange?: (mode: 'chat' | 'command') => void;
|
|
181
|
+
commandVariant?: 'default' | 'compact';
|
|
182
|
+
planMode?: boolean;
|
|
183
|
+
onPlanModeChange?: (enabled: boolean) => void;
|
|
184
|
+
enableStreaming?: boolean;
|
|
185
|
+
showProgress?: boolean;
|
|
186
|
+
loadingText?: string;
|
|
187
|
+
welcomeTitle?: string;
|
|
188
|
+
welcomeSubtitle?: string;
|
|
189
|
+
welcomeIcon?: React.ReactNode;
|
|
190
|
+
suggestedPrompts?: (string | SuggestedPrompt)[];
|
|
191
|
+
welcomeVariant?: 'centered' | 'minimal';
|
|
173
192
|
onThreadChange?: (threadId: string) => void;
|
|
174
193
|
onMessageSent?: (message: Message) => void;
|
|
175
194
|
onAction?: (action: ActionEvent) => void;
|
|
176
195
|
onFileUpload?: (files: FileList) => void;
|
|
196
|
+
onComplete?: (result: CommandResult) => void;
|
|
197
|
+
onError?: (error: Error) => void;
|
|
177
198
|
theme?: 'light' | 'dark' | 'auto';
|
|
178
199
|
placeholder?: string;
|
|
179
200
|
showHeader?: boolean;
|
|
@@ -283,7 +304,7 @@ interface UseAptevaKitReturn {
|
|
|
283
304
|
error: Error | null;
|
|
284
305
|
}
|
|
285
306
|
|
|
286
|
-
declare function Chat({ agentId, threadId, initialMessages, context, apiUrl, apiKey, useMock, onThreadChange, onMessageSent, onAction, onFileUpload, placeholder, showHeader, headerTitle, className, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
declare function Chat({ agentId, threadId, initialMessages, context, apiUrl, apiKey, useMock, initialMode, showModeToggle, onModeChange, commandVariant, planMode, onPlanModeChange, enableStreaming, showProgress, loadingText, welcomeTitle, welcomeSubtitle, welcomeIcon, suggestedPrompts, welcomeVariant, onThreadChange, onMessageSent, onAction, onFileUpload, onComplete, onError, placeholder, showHeader, headerTitle, className, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
287
308
|
|
|
288
309
|
declare function Command({ agentId, command: initialCommand, context, autoExecute, allowInput, placeholder, submitButtonText, variant, useMock, planMode, onPlanModeChange, enableFileUpload, onStart, onProgress, onChunk, onComplete, onError, onFileUpload, onAction, loadingText, showProgress, enableStreaming, resultRenderer, className, }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
289
310
|
|
|
@@ -389,4 +410,4 @@ declare const mockMessages: Message[];
|
|
|
389
410
|
declare const mockThreads: Thread[];
|
|
390
411
|
declare const mockWidgets: Widget[];
|
|
391
412
|
|
|
392
|
-
export { type Action, type ActionEvent, AptevaClient, type AptevaClientConfig, type AptevaKitControl, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, Command, type CommandProps, type CommandResult, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, List, type ListItem, type ListWidget, type MapWidget, type Message, Prompt, type PromptProps, type SendMessageParams, Stream, type StreamChunk, type StreamProps, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, aptevaClient, cn, getThemeScript, mockMessages, mockThreads, mockWidgets };
|
|
413
|
+
export { type Action, type ActionEvent, AptevaClient, type AptevaClientConfig, type AptevaKitControl, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, Command, type CommandProps, type CommandResult, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, List, type ListItem, type ListWidget, type MapWidget, type Message, Prompt, type PromptProps, type SendMessageParams, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, aptevaClient, cn, getThemeScript, mockMessages, mockThreads, mockWidgets };
|
package/dist/index.d.ts
CHANGED
|
@@ -162,6 +162,11 @@ interface SendMessageParams {
|
|
|
162
162
|
metadata?: Record<string, any>;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
interface SuggestedPrompt {
|
|
166
|
+
text: string;
|
|
167
|
+
icon?: React.ReactNode;
|
|
168
|
+
description?: string;
|
|
169
|
+
}
|
|
165
170
|
interface ChatProps {
|
|
166
171
|
agentId: string;
|
|
167
172
|
threadId?: string | null;
|
|
@@ -170,10 +175,26 @@ interface ChatProps {
|
|
|
170
175
|
apiUrl?: string;
|
|
171
176
|
apiKey?: string;
|
|
172
177
|
useMock?: boolean;
|
|
178
|
+
initialMode?: 'chat' | 'command';
|
|
179
|
+
showModeToggle?: boolean;
|
|
180
|
+
onModeChange?: (mode: 'chat' | 'command') => void;
|
|
181
|
+
commandVariant?: 'default' | 'compact';
|
|
182
|
+
planMode?: boolean;
|
|
183
|
+
onPlanModeChange?: (enabled: boolean) => void;
|
|
184
|
+
enableStreaming?: boolean;
|
|
185
|
+
showProgress?: boolean;
|
|
186
|
+
loadingText?: string;
|
|
187
|
+
welcomeTitle?: string;
|
|
188
|
+
welcomeSubtitle?: string;
|
|
189
|
+
welcomeIcon?: React.ReactNode;
|
|
190
|
+
suggestedPrompts?: (string | SuggestedPrompt)[];
|
|
191
|
+
welcomeVariant?: 'centered' | 'minimal';
|
|
173
192
|
onThreadChange?: (threadId: string) => void;
|
|
174
193
|
onMessageSent?: (message: Message) => void;
|
|
175
194
|
onAction?: (action: ActionEvent) => void;
|
|
176
195
|
onFileUpload?: (files: FileList) => void;
|
|
196
|
+
onComplete?: (result: CommandResult) => void;
|
|
197
|
+
onError?: (error: Error) => void;
|
|
177
198
|
theme?: 'light' | 'dark' | 'auto';
|
|
178
199
|
placeholder?: string;
|
|
179
200
|
showHeader?: boolean;
|
|
@@ -283,7 +304,7 @@ interface UseAptevaKitReturn {
|
|
|
283
304
|
error: Error | null;
|
|
284
305
|
}
|
|
285
306
|
|
|
286
|
-
declare function Chat({ agentId, threadId, initialMessages, context, apiUrl, apiKey, useMock, onThreadChange, onMessageSent, onAction, onFileUpload, placeholder, showHeader, headerTitle, className, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
declare function Chat({ agentId, threadId, initialMessages, context, apiUrl, apiKey, useMock, initialMode, showModeToggle, onModeChange, commandVariant, planMode, onPlanModeChange, enableStreaming, showProgress, loadingText, welcomeTitle, welcomeSubtitle, welcomeIcon, suggestedPrompts, welcomeVariant, onThreadChange, onMessageSent, onAction, onFileUpload, onComplete, onError, placeholder, showHeader, headerTitle, className, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
287
308
|
|
|
288
309
|
declare function Command({ agentId, command: initialCommand, context, autoExecute, allowInput, placeholder, submitButtonText, variant, useMock, planMode, onPlanModeChange, enableFileUpload, onStart, onProgress, onChunk, onComplete, onError, onFileUpload, onAction, loadingText, showProgress, enableStreaming, resultRenderer, className, }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
289
310
|
|
|
@@ -389,4 +410,4 @@ declare const mockMessages: Message[];
|
|
|
389
410
|
declare const mockThreads: Thread[];
|
|
390
411
|
declare const mockWidgets: Widget[];
|
|
391
412
|
|
|
392
|
-
export { type Action, type ActionEvent, AptevaClient, type AptevaClientConfig, type AptevaKitControl, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, Command, type CommandProps, type CommandResult, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, List, type ListItem, type ListWidget, type MapWidget, type Message, Prompt, type PromptProps, type SendMessageParams, Stream, type StreamChunk, type StreamProps, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, aptevaClient, cn, getThemeScript, mockMessages, mockThreads, mockWidgets };
|
|
413
|
+
export { type Action, type ActionEvent, AptevaClient, type AptevaClientConfig, type AptevaKitControl, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, Command, type CommandProps, type CommandResult, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, List, type ListItem, type ListWidget, type MapWidget, type Message, Prompt, type PromptProps, type SendMessageParams, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, aptevaClient, cn, getThemeScript, mockMessages, mockThreads, mockWidgets };
|