@ensembleapp/client-sdk 0.0.56 → 0.0.57
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/RealtimeVoicePanel-IZD3FICH.js +417 -0
- package/dist/RealtimeVoicePanel-IZD3FICH.js.map +1 -0
- package/dist/VoiceCharts-5TTAROFU.js +295 -0
- package/dist/VoiceCharts-5TTAROFU.js.map +1 -0
- package/dist/chunk-LFKJR7WX.js +1013 -0
- package/dist/chunk-LFKJR7WX.js.map +1 -0
- package/dist/chunk-LQHHZ2OJ.js +4177 -0
- package/dist/chunk-LQHHZ2OJ.js.map +1 -0
- package/dist/chunk-YLJ4XMA6.js +35 -0
- package/dist/chunk-YLJ4XMA6.js.map +1 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +4903 -8746
- package/dist/index.js.map +1 -1
- package/dist/widget/widget.global.js +218 -88
- package/dist/widget/widget.global.js.map +1 -1
- package/lib/chat/ChatWidget.css +111 -0
- package/package.json +7 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
try {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw mod = 0, e;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
__commonJS,
|
|
33
|
+
__toESM
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=chunk-YLJ4XMA6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ type UseChatConfig = DeprecatedChatConfig & {
|
|
|
116
116
|
};
|
|
117
117
|
declare function useChat({ api, threadId, agentId, agentVersion, agentExecutionId, dataContext, messagesToLoad, onError, onAuthError, onFinish, onData, onMessage, onUsage, }: UseChatConfig): {
|
|
118
118
|
messages: ChatMessage[];
|
|
119
|
+
rawMessages: UIMessage<unknown, ai.UIDataTypes, ai.UITools>[];
|
|
119
120
|
status: ai.ChatStatus;
|
|
120
121
|
isLoadingInitial: boolean;
|
|
121
122
|
canSendMessage: boolean;
|
|
@@ -349,6 +350,11 @@ declare const createWidget: <TEnriched extends EnrichedResults = EnrichedResults
|
|
|
349
350
|
render(payload: any, enriched: TEnriched, options: WidgetRenderOptions): unknown;
|
|
350
351
|
}) => UIWidgetDefinition<FlexibleSchema, TEnriched>;
|
|
351
352
|
|
|
353
|
+
interface RealtimeVoiceOptions {
|
|
354
|
+
enabled?: boolean;
|
|
355
|
+
avatar?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
352
358
|
type DisplayMode = 'full' | 'brief' | 'hide-tools';
|
|
353
359
|
|
|
354
360
|
interface ChatWidgetStyles {
|
|
@@ -435,6 +441,8 @@ interface ChatWidgetConfig extends UseChatConfig {
|
|
|
435
441
|
className?: string;
|
|
436
442
|
styles?: ChatWidgetStyles;
|
|
437
443
|
voice?: ChatWidgetVoiceOptions;
|
|
444
|
+
/** Opt-in LiveKit/ElevenLabs calls; prepared Tavus avatar is optional. */
|
|
445
|
+
realtimeVoice?: RealtimeVoiceOptions;
|
|
438
446
|
speechToText?: ChatWidgetSpeechToTextOptions;
|
|
439
447
|
widgets?: AnyUIWidgetDefinition[];
|
|
440
448
|
/** Feedback options for assistant messages. Enabled by default. */
|
|
@@ -669,4 +677,4 @@ declare const getVendorCardsWidget: (isProd?: boolean) => SDKUIWidgetDefinition[
|
|
|
669
677
|
|
|
670
678
|
declare function cn(...inputs: ClassValue[]): string;
|
|
671
679
|
|
|
672
|
-
export { type AgentVersion, type AnyUIWidgetDefinition, type ApiConfig, type ApprovalUIConfig, BriefDisplayMode, BriefDisplayMode as BriefRenderer, type ChatMessage, type ChatMessageSection, type ChatUsageData, ChatWidget, type ChatWidgetFeedbackOptions, type ChatWidgetHandle, type ChatWidgetConfig as ChatWidgetProps, type ChatWidgetSpeechToTextOptions, type ChatWidgetStyles, type ChatWidgetVoiceOptions, type CustomerReactDOM, type DisplayMode, type DisplayModeProps, type EmbeddableChatWidgetConfig, type EnrichedResults, type FeedbackConfig, type FeedbackHandlers, type FetchApprovalConfigOptions, FullDisplayMode, FullDisplayMode as FullRenderer, HideToolsDisplayMode, HideToolsDisplayMode as HideToolsRenderer, type InvokeTool, type MessageContext, MessageRenderer, type MessageRendererProps, type PendingToolApproval, type PendingToolOutput, type PopupAnchorConfig, PopupChatWidget, type PopupChatWidgetProps, type DisplayModeProps as RendererProps, type SDKUIWidgetDefinition, SDK_WIDGET_MARKER, type StructuredMessagePayload, type SubmitFeedbackParams, TagGroupDisplay, type TagGroupDisplayProps, ToolCallDisplay, type ToolCallDisplayProps, type ToolInvokeRequest, type ToolInvokeResult, type ToolPart, type UIMessagePart, type UIWidgetDefinition, type UseChatConfig, type UseFeedbackConfig, type WidgetRenderOptions, buildMessagesUrl, cn, createSDKWidget, createWidget, defaultChatWidgets, extractUsageData, fetchApprovalConfig, getVendorCardsWidget, isSDKWidget, registerChatWidgets, transformMessage, useChat, useFeedback };
|
|
680
|
+
export { type AgentVersion, type AnyUIWidgetDefinition, type ApiConfig, type ApprovalUIConfig, BriefDisplayMode, BriefDisplayMode as BriefRenderer, type ChatMessage, type ChatMessageSection, type ChatUsageData, ChatWidget, type ChatWidgetFeedbackOptions, type ChatWidgetHandle, type ChatWidgetConfig as ChatWidgetProps, type ChatWidgetSpeechToTextOptions, type ChatWidgetStyles, type ChatWidgetVoiceOptions, type CustomerReactDOM, type DisplayMode, type DisplayModeProps, type EmbeddableChatWidgetConfig, type EnrichedResults, type FeedbackConfig, type FeedbackHandlers, type FetchApprovalConfigOptions, FullDisplayMode, FullDisplayMode as FullRenderer, HideToolsDisplayMode, HideToolsDisplayMode as HideToolsRenderer, type InvokeTool, type MessageContext, MessageRenderer, type MessageRendererProps, type PendingToolApproval, type PendingToolOutput, type PopupAnchorConfig, PopupChatWidget, type PopupChatWidgetProps, type RealtimeVoiceOptions, type DisplayModeProps as RendererProps, type SDKUIWidgetDefinition, SDK_WIDGET_MARKER, type StructuredMessagePayload, type SubmitFeedbackParams, TagGroupDisplay, type TagGroupDisplayProps, ToolCallDisplay, type ToolCallDisplayProps, type ToolInvokeRequest, type ToolInvokeResult, type ToolPart, type UIMessagePart, type UIWidgetDefinition, type UseChatConfig, type UseFeedbackConfig, type WidgetRenderOptions, buildMessagesUrl, cn, createSDKWidget, createWidget, defaultChatWidgets, extractUsageData, fetchApprovalConfig, getVendorCardsWidget, isSDKWidget, registerChatWidgets, transformMessage, useChat, useFeedback };
|