cmcts-c-agent-embedding 1.0.36 → 1.0.37-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/components/Bot.d.ts +9 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/Toast.d.ts +10 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +7 -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/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 +24 -2
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- 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/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 -5
- package/public/index.html +4 -114
- package/server.js +401 -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,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MAAM,4BAA4B,iDAA4E,aAAa;;;EAU9H,CAAC;AAEL,eAAO,MAAM,6BAA6B,iDAA4E,aAAa;;;EAU/H,CAAC;AAEL,eAAO,MAAM,gBAAgB,uCAAkE,cAAc;;;EAQzG,CAAC;AAEL,eAAO,MAAM,cAAc;;;;eAAgG,MAAM;sDAShI,CAAC;AAEF,eAAO,MAAM,aAAa,iCAA4D,cAAc;;;EAUnG,CAAC;AAEF,eAAO,MAAM,sBAAsB,uCAAkE,cAAc;;;EAQ/G,CAAC;AAEL,eAAO,MAAM,qBAAqB,iCAA4D,cAAc;;;EAUxG,CAAC;AAEL,eAAO,MAAM,gBAAgB;;SAMtB,MAAM;2BACW,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAMjD,CAAC;AAEL,eAAO,MAAM,YAAY,iCAA4D,kBAAkB;;;EASnG,CAAC;AAEL,eAAO,MAAM,eAAe;;;WAQnB,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,qBAAqB;gBAMpB,MAAM;;WAEX,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,cAAc;;UAMnB,MAAM;2BACU,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,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,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,WAAW,EAAE,MAAM,C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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"}
|
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"}
|