@ensembleapp/client-sdk 0.0.17 → 0.0.19
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 +9 -17
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -41,15 +41,17 @@ type ToolCallConfig = {
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
type WidgetEnrichConfig = Record<string, ToolCallConfig>;
|
|
44
|
-
/**
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Enrichment result containing the full tool response.
|
|
46
|
+
* This should mirror ToolResult on server-side without debug/metadata info.
|
|
47
|
+
*/
|
|
48
|
+
type EnrichmentResult<TData = unknown> = {
|
|
46
49
|
success: boolean;
|
|
47
50
|
error?: {
|
|
48
|
-
message
|
|
51
|
+
message?: string;
|
|
49
52
|
code?: string;
|
|
50
53
|
};
|
|
51
|
-
data?:
|
|
52
|
-
metadata?: Record<string, unknown>;
|
|
54
|
+
data?: TData;
|
|
53
55
|
};
|
|
54
56
|
/** Widget output shape sent to the client */
|
|
55
57
|
type UIWidget = {
|
|
@@ -57,7 +59,7 @@ type UIWidget = {
|
|
|
57
59
|
/** LLM-generated data based on the widget schema specified by the client */
|
|
58
60
|
payload: unknown;
|
|
59
61
|
/** Server-injected enrichment results from tool calls, keyed by enrichment name */
|
|
60
|
-
enriched?: Record<string, EnrichmentResult
|
|
62
|
+
enriched?: Record<string, EnrichmentResult>;
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
type DeprecatedChatConfig = {
|
|
@@ -176,16 +178,6 @@ declare function useFeedback({ api, threadId, agentId, agentExecutionId, }: UseF
|
|
|
176
178
|
error: Error | null;
|
|
177
179
|
};
|
|
178
180
|
|
|
179
|
-
/** Enrichment result containing the full tool response - this should mirror ToolResult */
|
|
180
|
-
interface EnrichmentResult<TData = unknown> {
|
|
181
|
-
success: boolean;
|
|
182
|
-
error?: {
|
|
183
|
-
message: string;
|
|
184
|
-
code?: string;
|
|
185
|
-
};
|
|
186
|
-
data?: TData;
|
|
187
|
-
metadata?: Record<string, unknown>;
|
|
188
|
-
}
|
|
189
181
|
/** Enriched results keyed by enrichment name */
|
|
190
182
|
type EnrichedResults<T = unknown> = Record<string, EnrichmentResult<T>>;
|
|
191
183
|
interface UIWidgetDefinition<TSchema extends AnyZodObject = AnyZodObject, TEnriched extends EnrichedResults = EnrichedResults> {
|
|
@@ -358,4 +350,4 @@ declare const defaultChatWidgets: UIWidgetDefinition[];
|
|
|
358
350
|
|
|
359
351
|
declare function cn(...inputs: ClassValue[]): string;
|
|
360
352
|
|
|
361
|
-
export { type ApiConfig, type ChatContentItem, type ChatMessage, ChatWidget, type ChatWidgetFeedbackOptions, type ChatWidgetInstance, type ChatWidgetConfig as ChatWidgetProps, type ChatWidgetSpeechToTextOptions, type ChatWidgetStyles, type ChatWidgetVoiceOptions, type EmbeddableChatWidgetConfig, type EnrichedResults, type
|
|
353
|
+
export { type ApiConfig, type ChatContentItem, type ChatMessage, ChatWidget, type ChatWidgetFeedbackOptions, type ChatWidgetInstance, type ChatWidgetConfig as ChatWidgetProps, type ChatWidgetSpeechToTextOptions, type ChatWidgetStyles, type ChatWidgetVoiceOptions, type EmbeddableChatWidgetConfig, type EnrichedResults, type FeedbackRating, type FeedbackState, type MessageFeedback, type MessageSection, type PopupAnchorConfig, PopupChatWidget, type PopupChatWidgetProps, type SubmitFeedbackParams, type TagGroup, TagGroupDisplay, type TagGroupDisplayProps, type ToolCallContent, ToolCallDisplay, type ToolCallDisplayProps, type UIWidgetDefinition, type UseChatConfig, type UseFeedbackConfig, type WidgetEnrichConfig, cn, createChatWidget, createWidget, defaultChatWidgets, registerChatWidgets, useChat, useFeedback };
|
package/dist/index.js
CHANGED
|
@@ -25017,7 +25017,7 @@ var defaultChatWidgets = [
|
|
|
25017
25017
|
widgetType: "person-card",
|
|
25018
25018
|
schema: zod_default.object({
|
|
25019
25019
|
name: zod_default.string(),
|
|
25020
|
-
|
|
25020
|
+
photoUri: zod_default.string().optional().describe("URL to a photo of the person"),
|
|
25021
25021
|
details: zod_default.record(zod_default.any()).optional()
|
|
25022
25022
|
}).describe("showing a person card with name, photo and additional details"),
|
|
25023
25023
|
render: (payload) => /* @__PURE__ */ jsx9(
|
|
@@ -25034,10 +25034,10 @@ var defaultChatWidgets = [
|
|
|
25034
25034
|
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"
|
|
25035
25035
|
},
|
|
25036
25036
|
children: /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.75rem" }, children: [
|
|
25037
|
-
payload.
|
|
25037
|
+
payload.photoUri && /* @__PURE__ */ jsx9(
|
|
25038
25038
|
"img",
|
|
25039
25039
|
{
|
|
25040
|
-
src: payload.
|
|
25040
|
+
src: payload.photoUri,
|
|
25041
25041
|
alt: payload.name,
|
|
25042
25042
|
style: {
|
|
25043
25043
|
width: "3rem",
|