@chatwidgetai/chat-widget 0.2.3 → 0.2.4
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/actions/google-calendar-appointment/component.d.ts +6 -0
- package/dist/actions/google-calendar-appointment/component.d.ts.map +1 -0
- package/dist/actions/google-calendar-appointment/handler.d.ts +2 -0
- package/dist/actions/google-calendar-appointment/handler.d.ts.map +1 -0
- package/dist/actions/google-calendar-appointment/index.d.ts +3 -0
- package/dist/actions/google-calendar-appointment/index.d.ts.map +1 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/registry.d.ts +24 -0
- package/dist/actions/registry.d.ts.map +1 -0
- package/dist/ai-chat-widget.umd.js +803 -300
- package/dist/ai-chat-widget.umd.js.map +1 -1
- package/dist/api/client.d.ts +8 -20
- package/dist/api/client.d.ts.map +1 -1
- package/dist/components/ChatWidget.d.ts.map +1 -1
- package/dist/components/ChatWindow.d.ts.map +1 -1
- package/dist/components/Message.d.ts.map +1 -1
- package/dist/components/MessageList.d.ts.map +1 -1
- package/dist/components/ToolMessageGroup.d.ts.map +1 -1
- package/dist/hooks/useChat.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +803 -300
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +803 -300
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +86 -40
- package/dist/types/index.d.ts.map +1 -1
- package/dist/umd.d.ts +2 -1
- package/dist/umd.d.ts.map +1 -1
- package/dist/utils/sse-parser.d.ts +2 -0
- package/dist/utils/sse-parser.d.ts.map +1 -0
- package/dist/utils/storage.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAqClD,wBAAgB,6BAA6B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAyL/G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/handler.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/index.tsx"],"names":[],"mappings":"AAEA,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import { ConversationMessage, JsonValue } from "../types";
|
|
3
|
+
export type ActionInput = Record<string, JsonValue>;
|
|
4
|
+
export type ActionState = Record<string, JsonValue>;
|
|
5
|
+
export type ActionContext = {
|
|
6
|
+
widgetId: string;
|
|
7
|
+
conversationId: string;
|
|
8
|
+
toolCallId: string;
|
|
9
|
+
actionId: string;
|
|
10
|
+
implementation: string;
|
|
11
|
+
};
|
|
12
|
+
export type FrontendActionHandler = (input: ActionInput, state: ActionState, context: ActionContext) => Promise<ActionState>;
|
|
13
|
+
export type ActionRenderer = (message: ConversationMessage) => ReactElement | null;
|
|
14
|
+
export type ActionResumeCallback = (state: ActionState) => Promise<void>;
|
|
15
|
+
export declare const frontendActionHandlers: Record<string, FrontendActionHandler>;
|
|
16
|
+
export declare const actionRenderers: Record<string, ActionRenderer>;
|
|
17
|
+
export declare function getFrontendActionHandler(implementation: string): FrontendActionHandler | undefined;
|
|
18
|
+
export declare function getActionRenderer(implementation: string): ActionRenderer | undefined;
|
|
19
|
+
export declare function getActionPrompt(implementation: string): string;
|
|
20
|
+
export declare function waitForActionState(toolCallId: string): Promise<ActionState>;
|
|
21
|
+
export declare function resolveActionState(toolCallId: string, state: ActionState): void;
|
|
22
|
+
export declare function registerActionResumeCallback(toolCallId: string, callback: ActionResumeCallback): void;
|
|
23
|
+
export declare function unregisterActionResumeCallback(toolCallId: string): void;
|
|
24
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,aAAa,KACnB,OAAO,CAAC,WAAW,CAAC,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,YAAY,GAAG,IAAI,CAAC;AAEnF,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,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