cmcts-c-agent-embedding 1.0.37 → 1.0.38-cagent
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/.eslintrc.cjs +1 -0
- package/AGENTS.md +166 -0
- package/README.md +349 -349
- package/dist/api/chatRoom.d.ts +85 -0
- package/dist/api/chatRoom.d.ts.map +1 -0
- package/dist/components/Bot.d.ts +7 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/RoomReconnectAlert.d.ts +14 -0
- package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +10 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +8 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/ChartBubble.d.ts +73 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts +8 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts +20 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts +4 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts +7 -1
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -1
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StableChartWrapper.d.ts +18 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -1
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts +3 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts +3 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts +3 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +7 -0
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/image/PreviewImage.d.ts +5 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +4 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +16 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/queries/sendMessageQuery.d.ts +34 -2
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/store/constant.d.ts +43 -0
- package/dist/store/constant.d.ts.map +1 -0
- package/dist/types/chart.d.ts +86 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts +43 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts +39 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/chatStreamHelper.d.ts +19 -0
- package/dist/utils/chatStreamHelper.d.ts.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts +2 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/web.d.ts +4 -2
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +2 -1
- package/dist/window.d.ts.map +1 -1
- package/docs/chart-rendering-implementation-plan.md +565 -0
- package/package.json +11 -4
- package/public/index.html +4 -114
- package/server.js +477 -401
- package/.env +0 -36
- package/.husky/pre-commit +0 -18
- package/.idea/AugmentWebviewStateStore.xml +0 -10
- package/.idea/Flowise-share-chatbox.iml +0 -13
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -16
- package/.idea/modules.xml +0 -9
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -7
- package/dist/BubbleChat.d.ts +0 -13
- package/dist/BubbleChat.d.ts.map +0 -1
- package/dist/FullPageChat.d.ts +0 -18
- package/dist/FullPageChat.d.ts.map +0 -1
- package/dist/components/ImageUploadButton.d.ts +0 -11
- package/dist/components/ImageUploadButton.d.ts.map +0 -1
- package/dist/components/RecordAudioButton.d.ts +0 -11
- package/dist/components/RecordAudioButton.d.ts.map +0 -1
- package/dist/components/SendButton.d.ts +0 -12
- package/dist/components/SendButton.d.ts.map +0 -1
- package/dist/index.js +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Setter } from 'solid-js';
|
|
2
2
|
import { FileEvent, IAction, UploadsConfig } from '@/components/Bot';
|
|
3
|
+
type FilePreviewData = string | ArrayBuffer;
|
|
4
|
+
type FilePreview = {
|
|
5
|
+
data: FilePreviewData;
|
|
6
|
+
mime: string;
|
|
7
|
+
name: string;
|
|
8
|
+
preview: string;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
3
11
|
type TextInputProps = {
|
|
4
12
|
placeholder?: string;
|
|
5
13
|
backgroundColor?: string;
|
|
@@ -12,7 +20,7 @@ type TextInputProps = {
|
|
|
12
20
|
onInputChange: (value: string) => void;
|
|
13
21
|
uploadsConfig?: Partial<UploadsConfig>;
|
|
14
22
|
isFullFileUpload?: boolean;
|
|
15
|
-
setPreviews: Setter<
|
|
23
|
+
setPreviews: Setter<FilePreview[]>;
|
|
16
24
|
onMicrophoneClicked: () => void;
|
|
17
25
|
handleFileChange: (event: FileEvent<HTMLInputElement>) => void;
|
|
18
26
|
maxChars?: number;
|
|
@@ -27,6 +35,13 @@ type TextInputProps = {
|
|
|
27
35
|
chatflowid: string;
|
|
28
36
|
isUseFAQ?: boolean;
|
|
29
37
|
setDisableInput: Setter<boolean>;
|
|
38
|
+
isWelcomeScreen?: boolean;
|
|
39
|
+
onFocus?: () => void;
|
|
40
|
+
onBlur?: () => void;
|
|
41
|
+
uploadedFiles: {
|
|
42
|
+
file: File;
|
|
43
|
+
type: string;
|
|
44
|
+
}[];
|
|
30
45
|
};
|
|
31
46
|
export declare const TextInput: (props: TextInputProps) => import("solid-js").JSX.Element;
|
|
32
47
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/inputs/textInput/components/TextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/inputs/textInput/components/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,MAAM,EAAW,MAAM,UAAU,CAAC;AAEtF,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQrE,KAAK,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC;AAC5C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,KAAK,cAAc,GAAG;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACnC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC;AAOF,eAAO,MAAM,SAAS,UAAW,cAAc,mCAgd9C,CAAC"}
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,eAAe,EAAE,WAgB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../../../src/features/bubble/components/Bubble.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAO,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAElD,eAAO,MAAM,MAAM,UAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../../../src/features/bubble/components/Bubble.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAO,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAElD,eAAO,MAAM,MAAM,UAAW,WAAW,mCAqXxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Full.d.ts","sourceRoot":"","sources":["../../../../src/features/full/components/Full.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMvD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhD,eAAO,MAAM,IAAI,UAAW,SAAS;aAA0B,WAAW;
|
|
1
|
+
{"version":3,"file":"Full.d.ts","sourceRoot":"","sources":["../../../../src/features/full/components/Full.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMvD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhD,eAAO,MAAM,IAAI,UAAW,SAAS;aAA0B,WAAW;oCA+FzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../src/features/popup/components/Popup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../src/features/popup/components/Popup.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AA4BF,eAAO,MAAM,KAAK,UAAW,UAAU,mCAkRtC,CAAC"}
|
|
@@ -12,6 +12,7 @@ export type IncomingInput = {
|
|
|
12
12
|
fetch?: boolean;
|
|
13
13
|
faqId?: string;
|
|
14
14
|
useId?: string;
|
|
15
|
+
username?: string;
|
|
15
16
|
};
|
|
16
17
|
type BaseRequest = {
|
|
17
18
|
apiHost?: string;
|
|
@@ -54,7 +55,10 @@ export type GetFeedbackByMessageIdRequest = BaseRequest & {
|
|
|
54
55
|
export type LeadCaptureRequest = BaseRequest & {
|
|
55
56
|
body: Partial<LeadCaptureInput>;
|
|
56
57
|
};
|
|
57
|
-
export declare const getUserFromLocalStorage: () =>
|
|
58
|
+
export declare const getUserFromLocalStorage: () => {
|
|
59
|
+
accessToken: string | null;
|
|
60
|
+
username: string | null;
|
|
61
|
+
};
|
|
58
62
|
export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{
|
|
59
63
|
data?: unknown;
|
|
60
64
|
error?: Error | undefined;
|
|
@@ -83,6 +87,16 @@ export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: Mess
|
|
|
83
87
|
data?: any;
|
|
84
88
|
error?: Error | undefined;
|
|
85
89
|
}>;
|
|
90
|
+
export declare const getMessageById: ({ chatflowid, apiHost, messageId }: BaseRequest & {
|
|
91
|
+
chatflowid?: string | undefined;
|
|
92
|
+
body?: IncomingInput | undefined;
|
|
93
|
+
} & {
|
|
94
|
+
messageId: string;
|
|
95
|
+
}) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
96
|
+
export declare const updateMessage: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
97
|
+
data?: any;
|
|
98
|
+
error?: Error | undefined;
|
|
99
|
+
}>;
|
|
86
100
|
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
87
101
|
data?: any;
|
|
88
102
|
error?: Error | undefined;
|
|
@@ -91,6 +105,14 @@ export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: Messa
|
|
|
91
105
|
data?: any;
|
|
92
106
|
error?: Error | undefined;
|
|
93
107
|
}>;
|
|
108
|
+
export declare const popDataFromCache: ({ apiHost, key, onRequest, }: {
|
|
109
|
+
apiHost?: string | undefined;
|
|
110
|
+
key: string;
|
|
111
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
112
|
+
}) => Promise<{
|
|
113
|
+
data?: any;
|
|
114
|
+
error?: Error | undefined;
|
|
115
|
+
}>;
|
|
94
116
|
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
|
|
95
117
|
data?: any;
|
|
96
118
|
error?: Error | undefined;
|
|
@@ -113,7 +135,7 @@ export declare const vectorSearchFaqsQuery: ({ chatflowid, apiHost, query, onReq
|
|
|
113
135
|
data?: any;
|
|
114
136
|
error?: Error | undefined;
|
|
115
137
|
}>;
|
|
116
|
-
export declare const getFileContent: ({ apiHost, path, onRequest }: {
|
|
138
|
+
export declare const getFileContent: ({ apiHost, path, onRequest, }: {
|
|
117
139
|
apiHost?: string | undefined;
|
|
118
140
|
path: string;
|
|
119
141
|
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
@@ -121,5 +143,15 @@ export declare const getFileContent: ({ apiHost, path, onRequest }: {
|
|
|
121
143
|
data?: any;
|
|
122
144
|
error?: Error | undefined;
|
|
123
145
|
}>;
|
|
146
|
+
export declare const sendEmailQuery: ({ apiHost, body, onRequest, }: {
|
|
147
|
+
apiHost?: string | undefined;
|
|
148
|
+
body: {
|
|
149
|
+
fileUrls: string[];
|
|
150
|
+
};
|
|
151
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
152
|
+
}) => Promise<{
|
|
153
|
+
data?: any;
|
|
154
|
+
error?: Error;
|
|
155
|
+
}>;
|
|
124
156
|
export {};
|
|
125
157
|
//# sourceMappingURL=sendMessageQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIvD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,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AAM,cAAc;;UAMnB,MAAM;2BACU,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,cAAc;;UAMnB;QACJ,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB;2BACqB,WAAW,KAAK,QAAQ,IAAI,CAAC;MACjD,QAAQ;IAAE,IAAI,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAYxC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for chat room and socket connection
|
|
3
|
+
* Used for human advisor/support feature integration
|
|
4
|
+
*/
|
|
5
|
+
export declare const SOCKET_PATH = "/socket.io";
|
|
6
|
+
export declare const ROOM_STATUS: {
|
|
7
|
+
readonly WAITING: "waiting";
|
|
8
|
+
readonly ACTIVE: "active";
|
|
9
|
+
readonly CLOSED: "closed";
|
|
10
|
+
};
|
|
11
|
+
export type RoomStatus = (typeof ROOM_STATUS)[keyof typeof ROOM_STATUS];
|
|
12
|
+
export declare const SENDER_TYPE: {
|
|
13
|
+
readonly USER: "user";
|
|
14
|
+
readonly AGENT: "agent";
|
|
15
|
+
readonly HUMAN: "human";
|
|
16
|
+
readonly SYSTEM: "system";
|
|
17
|
+
};
|
|
18
|
+
export type SenderType = (typeof SENDER_TYPE)[keyof typeof SENDER_TYPE];
|
|
19
|
+
export declare const SOCKET_EVENTS: {
|
|
20
|
+
readonly CONNECT: "connect";
|
|
21
|
+
readonly DISCONNECT: "disconnect";
|
|
22
|
+
readonly CONNECT_ERROR: "connect_error";
|
|
23
|
+
readonly JOIN_ROOM: "join_room";
|
|
24
|
+
readonly LEAVE_ROOM: "leave_room";
|
|
25
|
+
readonly ROOM_JOINED: "room_joined";
|
|
26
|
+
readonly ROOM_CLOSED: "room_closed";
|
|
27
|
+
readonly SEND_MESSAGE: "send_message";
|
|
28
|
+
readonly NEW_MESSAGE: "new_message";
|
|
29
|
+
readonly REQUEST_HUMAN: "request_human";
|
|
30
|
+
readonly HUMAN_JOINED: "human_joined";
|
|
31
|
+
readonly HUMAN_LEFT: "human_left";
|
|
32
|
+
readonly HUMAN_TYPING: "human_typing";
|
|
33
|
+
};
|
|
34
|
+
export declare const API_ENDPOINTS: {
|
|
35
|
+
readonly CREATE_ROOM: "/api/v1/chatroom/create";
|
|
36
|
+
readonly JOIN_ROOM: "/api/v1/chatroom/join";
|
|
37
|
+
readonly LEAVE_ROOM: "/api/v1/chatroom/leave";
|
|
38
|
+
readonly CLOSE_ROOM: "/api/v1/chatroom/close";
|
|
39
|
+
readonly GET_ROOM_STATUS: "/api/v1/chatroom/status";
|
|
40
|
+
readonly GET_MESSAGES: "/api/v1/chatroom/messages";
|
|
41
|
+
readonly REQUEST_HUMAN: "/api/v1/chatroom/request-human";
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/store/constant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,WAAW,eAAe,CAAC;AAGxC,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAGxE,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAGxE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAqBhB,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;;;CAQhB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { ChartData, ChartOptions, ChartType } from 'chart.js';
|
|
2
|
+
/**
|
|
3
|
+
* Supported chart types for the XML tag parser
|
|
4
|
+
*/
|
|
5
|
+
export type SupportedChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter';
|
|
6
|
+
/**
|
|
7
|
+
* Chart configuration parsed from XML tag
|
|
8
|
+
*/
|
|
9
|
+
export interface ChartConfig {
|
|
10
|
+
id: string;
|
|
11
|
+
type: SupportedChartType;
|
|
12
|
+
title?: string;
|
|
13
|
+
unit?: string;
|
|
14
|
+
data: ChartData<ChartType>;
|
|
15
|
+
options?: ChartOptions<ChartType>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result from processing a token through the chart parser
|
|
19
|
+
*/
|
|
20
|
+
export interface ChartParseResult {
|
|
21
|
+
/** Regular text content to render (non-chart content) */
|
|
22
|
+
textContent: string;
|
|
23
|
+
/** IDs of chart placeholders that were added */
|
|
24
|
+
chartPlaceholders: string[];
|
|
25
|
+
/** Fully parsed chart configurations ready to render */
|
|
26
|
+
completedCharts: ChartConfig[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Parser state machine states
|
|
30
|
+
*/
|
|
31
|
+
export declare enum ChartParserState {
|
|
32
|
+
/** Normal text parsing mode */
|
|
33
|
+
IDLE = "IDLE",
|
|
34
|
+
/** Detected potential opening tag, buffering */
|
|
35
|
+
OPENING_TAG = "OPENING_TAG",
|
|
36
|
+
/** Inside chart tag, buffering JSON content */
|
|
37
|
+
INSIDE_TAG = "INSIDE_TAG",
|
|
38
|
+
/** Detected potential closing tag */
|
|
39
|
+
CLOSING_TAG = "CLOSING_TAG"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Chart tag attributes extracted from opening tag
|
|
43
|
+
*/
|
|
44
|
+
export interface ChartTagAttributes {
|
|
45
|
+
type: SupportedChartType;
|
|
46
|
+
title?: string;
|
|
47
|
+
unit?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Partial chart config for pending charts (streaming)
|
|
51
|
+
*/
|
|
52
|
+
export interface PendingChart {
|
|
53
|
+
id: string;
|
|
54
|
+
attributes?: ChartTagAttributes;
|
|
55
|
+
buffer?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Props for ChartBubble component
|
|
59
|
+
*/
|
|
60
|
+
export interface ChartBubbleProps {
|
|
61
|
+
config: ChartConfig;
|
|
62
|
+
backgroundColor?: string;
|
|
63
|
+
textColor?: string;
|
|
64
|
+
/** Enable zoom/pan interactivity (used in popup modal) */
|
|
65
|
+
enableZoom?: boolean;
|
|
66
|
+
/** Callback to open chart in fullscreen popup */
|
|
67
|
+
onOpenFullscreen?: () => void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Props for ChartLoadingPlaceholder component
|
|
71
|
+
*/
|
|
72
|
+
export interface ChartLoadingPlaceholderProps {
|
|
73
|
+
chartId: string;
|
|
74
|
+
backgroundColor?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Props for ChartPopupModal component
|
|
78
|
+
*/
|
|
79
|
+
export interface ChartPopupModalProps {
|
|
80
|
+
isOpen: boolean;
|
|
81
|
+
config: ChartConfig;
|
|
82
|
+
onClose: () => void;
|
|
83
|
+
backgroundColor?: string;
|
|
84
|
+
textColor?: string;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/types/chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB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AAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Chart } from 'chart.js';
|
|
2
|
+
/**
|
|
3
|
+
* Singleton manager for Chart.js instances.
|
|
4
|
+
* Tracks all created chart instances and handles proper cleanup to prevent memory leaks.
|
|
5
|
+
*/
|
|
6
|
+
declare class ChartInstanceManager {
|
|
7
|
+
private instances;
|
|
8
|
+
/**
|
|
9
|
+
* Register a new Chart.js instance
|
|
10
|
+
*/
|
|
11
|
+
register(id: string, chart: Chart): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get a Chart.js instance by ID
|
|
14
|
+
*/
|
|
15
|
+
get(id: string): Chart | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Check if an instance exists
|
|
18
|
+
*/
|
|
19
|
+
has(id: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Destroy a Chart.js instance by ID
|
|
22
|
+
*/
|
|
23
|
+
destroy(id: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Destroy multiple Chart.js instances by their IDs
|
|
26
|
+
*/
|
|
27
|
+
destroyMany(ids: string[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Destroy all registered Chart.js instances
|
|
30
|
+
*/
|
|
31
|
+
destroyAll(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get count of registered instances
|
|
34
|
+
*/
|
|
35
|
+
get count(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Get all registered instance IDs
|
|
38
|
+
*/
|
|
39
|
+
getIds(): string[];
|
|
40
|
+
}
|
|
41
|
+
export declare const chartManager: ChartInstanceManager;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=chartInstanceManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartInstanceManager.d.ts","sourceRoot":"","sources":["../../src/utils/chartInstanceManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,SAAS,CAAiC;IAElD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAQxC;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIlC;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB;;OAEG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAYzB;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI;IAIhC;;OAEG;IACH,UAAU,IAAI,IAAI;IAWlB;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,MAAM,IAAI,MAAM,EAAE;CAGnB;AAGD,eAAO,MAAM,YAAY,sBAA6B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChartParseResult } from '@/types/chart';
|
|
2
|
+
/**
|
|
3
|
+
* State machine parser for extracting chart XML tags from streaming tokens.
|
|
4
|
+
* Handles partial tags split across multiple tokens.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChartTagParser {
|
|
7
|
+
private state;
|
|
8
|
+
private buffer;
|
|
9
|
+
private pendingChart;
|
|
10
|
+
private textOutput;
|
|
11
|
+
private chartPlaceholders;
|
|
12
|
+
private completedCharts;
|
|
13
|
+
/**
|
|
14
|
+
* Process a single token from the SSE stream
|
|
15
|
+
*/
|
|
16
|
+
processToken(token: string): ChartParseResult;
|
|
17
|
+
/**
|
|
18
|
+
* Process a single character through the state machine
|
|
19
|
+
*/
|
|
20
|
+
private processChar;
|
|
21
|
+
private handleIdleState;
|
|
22
|
+
private handleOpeningTagState;
|
|
23
|
+
private handleInsideTagState;
|
|
24
|
+
private handleClosingTagState;
|
|
25
|
+
private parseOpeningTag;
|
|
26
|
+
private finalizeChart;
|
|
27
|
+
private parseChartJson;
|
|
28
|
+
private getDefaultOptions;
|
|
29
|
+
/**
|
|
30
|
+
* Flush any remaining buffered content when stream ends.
|
|
31
|
+
* Incomplete chart tags are treated as plain text.
|
|
32
|
+
*/
|
|
33
|
+
flush(): ChartParseResult;
|
|
34
|
+
/**
|
|
35
|
+
* Reset parser state for a new message
|
|
36
|
+
*/
|
|
37
|
+
reset(): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=chartTagParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartTagParser.d.ts","sourceRoot":"","sources":["../../src/utils/chartTagParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,gBAAgB,EAAwD,MAAM,eAAe,CAAC;AAOzH;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,iBAAiB,CAAgB;IACzC,OAAO,CAAC,eAAe,CAAqB;IAE5C;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAiB7C;;OAEG;IACH,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,qBAAqB;IAwC7B,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,cAAc;IAwCtB,OAAO,CAAC,iBAAiB;IAyBzB;;;OAGG;IACH,KAAK,IAAI,gBAAgB;IAsBzB;;OAEG;IACH,KAAK,IAAI,IAAI;CAQd"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Stream Helper
|
|
3
|
+
* Utilities for handling AI streaming responses and message buffering
|
|
4
|
+
*/
|
|
5
|
+
import { SenderType } from '@/store/constant';
|
|
6
|
+
export interface ChatMessage {
|
|
7
|
+
id: string;
|
|
8
|
+
content: string;
|
|
9
|
+
sender: SenderType;
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
isStreaming?: boolean;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare const generateMessageId: () => string;
|
|
15
|
+
export declare const createChatMessage: (content: string, sender: SenderType, metadata?: Record<string, any>) => ChatMessage;
|
|
16
|
+
export declare const isHumanMessage: (sender: SenderType) => boolean;
|
|
17
|
+
export declare const isAgentMessage: (sender: SenderType) => boolean;
|
|
18
|
+
export declare const formatMessageContent: (content: string) => string;
|
|
19
|
+
//# sourceMappingURL=chatStreamHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatStreamHelper.d.ts","sourceRoot":"","sources":["../../src/utils/chatStreamHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG3D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAGD,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC;AAGF,eAAO,MAAM,iBAAiB,YAAa,MAAM,UAAU,UAAU,aAAa,OAAO,MAAM,EAAE,GAAG,CAAC,KAAG,WASvG,CAAC;AAGF,eAAO,MAAM,cAAc,WAAY,UAAU,KAAG,OAEnD,CAAC;AAGF,eAAO,MAAM,cAAc,WAAY,UAAU,KAAG,OAEnD,CAAC;AAGF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAMtD,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export declare const isNotDefined: <T>(value: T | null | undefined) => value is
|
|
|
2
2
|
export declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
|
|
3
3
|
export declare const isEmpty: (value: string | undefined | null) => value is undefined;
|
|
4
4
|
export declare const isNotEmpty: (value: string | undefined | null) => value is string;
|
|
5
|
+
/**
|
|
6
|
+
* Clears authentication data from localStorage
|
|
7
|
+
* Used when 401 errors are detected or user logs out
|
|
8
|
+
*/
|
|
5
9
|
export declare const sendRequest: <ResponseData>(params: string | {
|
|
6
10
|
url: string;
|
|
7
11
|
method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload audio blob to server and get transcription
|
|
3
|
+
* @param blob - Audio blob to transcribe
|
|
4
|
+
* @param transcriptApiEndpoint - API endpoint for transcription service
|
|
5
|
+
* @returns Promise<string> - Transcribed text
|
|
6
|
+
*/
|
|
7
|
+
export declare const uploadAndTranscriptAudio: (blob: Blob, transcriptApiEndpoint?: string) => Promise<string>;
|
|
8
|
+
//# sourceMappingURL=transcriptApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ultimateJsonParser.d.ts","sourceRoot":"","sources":["../../src/utils/ultimateJsonParser.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAkDzD"}
|
package/dist/web.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ declare const chatbot: {
|
|
|
8
8
|
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
9
9
|
chatwootUrl?: string | undefined;
|
|
10
10
|
roomIds?: Record<string, string> | undefined;
|
|
11
|
-
isUseFAQ?: undefined;
|
|
11
|
+
isUseFAQ?: boolean | undefined;
|
|
12
|
+
onResetChat?: (() => Promise<void>) | undefined;
|
|
12
13
|
} & {
|
|
13
14
|
id?: string | undefined;
|
|
14
15
|
}) => void;
|
|
@@ -21,7 +22,8 @@ declare const chatbot: {
|
|
|
21
22
|
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
22
23
|
chatwootUrl?: string | undefined;
|
|
23
24
|
roomIds?: Record<string, string> | undefined;
|
|
24
|
-
isUseFAQ?: undefined;
|
|
25
|
+
isUseFAQ?: boolean | undefined;
|
|
26
|
+
onResetChat?: (() => Promise<void>) | undefined;
|
|
25
27
|
}) => void;
|
|
26
28
|
destroy: () => void;
|
|
27
29
|
};
|
package/dist/web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAC;AAI/B,eAAe,OAAO,CAAC"}
|