@autobe/ui 0.30.3 → 0.30.4-dev.20260324

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.
Files changed (65) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +261 -0
  3. package/lib/components/AutoBeChatMain.d.ts +6 -0
  4. package/lib/components/AutoBeChatMain.js +46 -37
  5. package/lib/components/AutoBeChatMain.js.map +1 -1
  6. package/lib/components/AutoBeConfigModal.js +9 -9
  7. package/lib/components/upload/AutoBeChatUploadBox.d.ts +1 -0
  8. package/lib/components/upload/AutoBeChatUploadBox.js +11 -16
  9. package/lib/components/upload/AutoBeChatUploadBox.js.map +1 -1
  10. package/lib/context/AutoBeAgentContext.js +78 -30
  11. package/lib/context/AutoBeAgentContext.js.map +1 -1
  12. package/lib/context/SearchParamsContext.js +1 -1
  13. package/lib/context/SearchParamsContext.js.map +1 -1
  14. package/lib/structure/AutoBeListener.d.ts +1 -0
  15. package/lib/structure/AutoBeListener.js +9 -1
  16. package/lib/structure/AutoBeListener.js.map +1 -1
  17. package/package.json +2 -2
  18. package/src/components/AutoBeAssistantMessageMovie.tsx +22 -22
  19. package/src/components/AutoBeChatMain.tsx +394 -376
  20. package/src/components/AutoBeChatSidebar.tsx +414 -414
  21. package/src/components/AutoBeConfigButton.tsx +83 -83
  22. package/src/components/AutoBeConfigModal.tsx +443 -443
  23. package/src/components/AutoBeStatusButton.tsx +75 -75
  24. package/src/components/AutoBeStatusModal.tsx +486 -486
  25. package/src/components/AutoBeUserMessageMovie.tsx +27 -27
  26. package/src/components/common/ActionButton.tsx +205 -205
  27. package/src/components/common/ActionButtonGroup.tsx +80 -80
  28. package/src/components/common/AutoBeConfigInput.tsx +185 -185
  29. package/src/components/common/ChatBubble.tsx +119 -119
  30. package/src/components/common/Collapsible.tsx +95 -95
  31. package/src/components/common/CompactSessionIndicator.tsx +73 -73
  32. package/src/components/common/CompactSessionList.tsx +82 -82
  33. package/src/components/common/openai/OpenAIContent.tsx +53 -53
  34. package/src/components/common/openai/OpenAIUserAudioContent.tsx +70 -70
  35. package/src/components/common/openai/OpenAIUserFileContent.tsx +76 -76
  36. package/src/components/common/openai/OpenAIUserImageContent.tsx +34 -34
  37. package/src/components/common/openai/OpenAIUserTextContent.tsx +15 -15
  38. package/src/components/events/AutoBeCompleteEventMovie.tsx +402 -402
  39. package/src/components/events/AutoBeCorrectEventMovie.tsx +354 -354
  40. package/src/components/events/AutoBeEventGroupMovie.tsx +18 -18
  41. package/src/components/events/AutoBeEventMovie.tsx +154 -154
  42. package/src/components/events/AutoBeProgressEventMovie.tsx +207 -207
  43. package/src/components/events/AutoBeScenarioEventMovie.tsx +135 -135
  44. package/src/components/events/AutoBeStartEventMovie.tsx +82 -82
  45. package/src/components/events/AutoBeValidateEventMovie.tsx +249 -249
  46. package/src/components/events/README.md +300 -300
  47. package/src/components/events/common/CollapsibleEventGroup.tsx +211 -211
  48. package/src/components/events/common/EventCard.tsx +61 -61
  49. package/src/components/events/common/EventContent.tsx +31 -31
  50. package/src/components/events/common/EventHeader.tsx +85 -85
  51. package/src/components/events/common/EventIcon.tsx +82 -82
  52. package/src/components/events/common/ProgressBar.tsx +64 -64
  53. package/src/components/events/groups/CorrectEventGroup.tsx +183 -183
  54. package/src/components/events/groups/ValidateEventGroup.tsx +143 -143
  55. package/src/components/events/utils/eventGrouper.tsx +116 -116
  56. package/src/components/upload/AutoBeChatUploadBox.tsx +433 -425
  57. package/src/components/upload/AutoBeChatUploadSendButton.tsx +66 -66
  58. package/src/components/upload/AutoBeFileUploadBox.tsx +123 -123
  59. package/src/components/upload/AutoBeVoiceRecoderButton.tsx +100 -100
  60. package/src/context/AutoBeAgentContext.tsx +301 -245
  61. package/src/context/AutoBeAgentSessionList.tsx +58 -58
  62. package/src/context/SearchParamsContext.tsx +49 -49
  63. package/src/icons/Receipt.tsx +74 -74
  64. package/src/structure/AutoBeListener.ts +368 -363
  65. package/tsconfig.json +9 -9
@@ -1,66 +1,66 @@
1
- /** Props interface for AutoBeChatUploadSendButton component */
2
- interface IAutoBeChatUploadSendButtonProps {
3
- /** Function to trigger conversation */
4
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
5
- /** Whether the button is enabled */
6
- enabled: boolean;
7
- }
8
-
9
- /**
10
- * Chat upload send button component for triggering conversations
11
- *
12
- * @param props - Component props
13
- * @returns JSX element representing the send button
14
- */
15
- export const AutoBeChatUploadSendButton = (
16
- props: IAutoBeChatUploadSendButtonProps,
17
- ) => {
18
- const baseStyles: React.CSSProperties = {
19
- padding: "6px",
20
- border: "none",
21
- borderRadius: "50%",
22
- backgroundColor: props.enabled ? "#1976d2" : "#e0e0e0",
23
- color: props.enabled ? "#ffffff" : "#9e9e9e",
24
- cursor: props.enabled ? "pointer" : "not-allowed",
25
- display: "inline-flex",
26
- alignItems: "center",
27
- justifyContent: "center",
28
- transition: "background-color 0.3s ease",
29
- outline: "none",
30
- width: "32px",
31
- height: "32px",
32
- };
33
-
34
- const hoverStyles: React.CSSProperties = {
35
- ...baseStyles,
36
- backgroundColor: props.enabled ? "#1565c0" : "#e0e0e0",
37
- };
38
-
39
- return (
40
- <button
41
- style={baseStyles}
42
- onClick={(e) => void props.onClick?.(e)}
43
- disabled={!props.enabled}
44
- onMouseEnter={(e) => {
45
- if (props.enabled) {
46
- Object.assign(e.currentTarget.style, hoverStyles);
47
- }
48
- }}
49
- onMouseLeave={(e) => {
50
- Object.assign(e.currentTarget.style, baseStyles);
51
- }}
52
- >
53
- <svg
54
- width="16"
55
- height="16"
56
- viewBox="0 0 24 24"
57
- fill="currentColor"
58
- style={{ display: "block" }}
59
- >
60
- <path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z" />
61
- </svg>
62
- </button>
63
- );
64
- };
65
-
66
- export default AutoBeChatUploadSendButton;
1
+ /** Props interface for AutoBeChatUploadSendButton component */
2
+ interface IAutoBeChatUploadSendButtonProps {
3
+ /** Function to trigger conversation */
4
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
5
+ /** Whether the button is enabled */
6
+ enabled: boolean;
7
+ }
8
+
9
+ /**
10
+ * Chat upload send button component for triggering conversations
11
+ *
12
+ * @param props - Component props
13
+ * @returns JSX element representing the send button
14
+ */
15
+ export const AutoBeChatUploadSendButton = (
16
+ props: IAutoBeChatUploadSendButtonProps,
17
+ ) => {
18
+ const baseStyles: React.CSSProperties = {
19
+ padding: "6px",
20
+ border: "none",
21
+ borderRadius: "50%",
22
+ backgroundColor: props.enabled ? "#1976d2" : "#e0e0e0",
23
+ color: props.enabled ? "#ffffff" : "#9e9e9e",
24
+ cursor: props.enabled ? "pointer" : "not-allowed",
25
+ display: "inline-flex",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ transition: "background-color 0.3s ease",
29
+ outline: "none",
30
+ width: "32px",
31
+ height: "32px",
32
+ };
33
+
34
+ const hoverStyles: React.CSSProperties = {
35
+ ...baseStyles,
36
+ backgroundColor: props.enabled ? "#1565c0" : "#e0e0e0",
37
+ };
38
+
39
+ return (
40
+ <button
41
+ style={baseStyles}
42
+ onClick={(e) => void props.onClick?.(e)}
43
+ disabled={!props.enabled}
44
+ onMouseEnter={(e) => {
45
+ if (props.enabled) {
46
+ Object.assign(e.currentTarget.style, hoverStyles);
47
+ }
48
+ }}
49
+ onMouseLeave={(e) => {
50
+ Object.assign(e.currentTarget.style, baseStyles);
51
+ }}
52
+ >
53
+ <svg
54
+ width="16"
55
+ height="16"
56
+ viewBox="0 0 24 24"
57
+ fill="currentColor"
58
+ style={{ display: "block" }}
59
+ >
60
+ <path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z" />
61
+ </svg>
62
+ </button>
63
+ );
64
+ };
65
+
66
+ export default AutoBeChatUploadSendButton;
@@ -1,123 +1,123 @@
1
- import { ReactNode, useState } from "react";
2
-
3
- export interface IAutoBeFileUploadBoxProps {
4
- extensionError: ReactNode | null;
5
- onClick: () => void;
6
- enabled: boolean;
7
- }
8
-
9
- export const AutoBeFileUploadBox = (props: IAutoBeFileUploadBoxProps) => {
10
- const [isHovered, setIsHovered] = useState(false);
11
-
12
- const hasError = !!props.extensionError;
13
-
14
- const getButtonStyles = () => {
15
- const baseStyles = {
16
- display: "inline-flex",
17
- alignItems: "center",
18
- justifyContent: "center",
19
- width: "40px",
20
- height: "40px",
21
- padding: "0",
22
- border: "1px solid",
23
- borderRadius: "50%",
24
- cursor: props.enabled ? "pointer" : "not-allowed",
25
- backgroundColor: hasError ? "#fef2f2" : "transparent",
26
- borderColor: hasError ? "#f87171" : isHovered ? "#3b82f6" : "#d1d5db",
27
- opacity: props.enabled ? 1 : 0.5,
28
- transition: "all 0.3s ease",
29
- position: "relative" as const,
30
- };
31
-
32
- if (isHovered && props.enabled) {
33
- return {
34
- ...baseStyles,
35
- backgroundColor: hasError ? "#fef2f2" : "#f3f4f6",
36
- borderColor: hasError ? "#f87171" : "#3b82f6",
37
- };
38
- }
39
-
40
- return baseStyles;
41
- };
42
-
43
- const iconColor = hasError ? "#ef4444" : "#6b7280";
44
-
45
- return (
46
- <div style={{ position: "relative", display: "inline-block" }}>
47
- <button
48
- onClick={props.onClick}
49
- disabled={!props.enabled}
50
- style={getButtonStyles()}
51
- onMouseEnter={() => {
52
- setIsHovered(true);
53
- }}
54
- onMouseLeave={() => {
55
- setIsHovered(false);
56
- }}
57
- >
58
- {hasError ? (
59
- // Error Icon (SVG)
60
- <svg
61
- width="20"
62
- height="20"
63
- viewBox="0 0 24 24"
64
- fill="currentColor"
65
- style={{ color: iconColor }}
66
- >
67
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" />
68
- </svg>
69
- ) : (
70
- // Add Icon (SVG)
71
- <svg
72
- width="20"
73
- height="20"
74
- viewBox="0 0 24 24"
75
- fill="currentColor"
76
- style={{ color: iconColor }}
77
- >
78
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
79
- </svg>
80
- )}
81
- </button>
82
-
83
- {/* Custom Tooltip - Always show when there's an error */}
84
- {hasError && (
85
- <div
86
- style={{
87
- position: "absolute",
88
- bottom: "100%",
89
- left: "50%",
90
- transform: "translateX(-50%)",
91
- marginBottom: "8px",
92
- padding: "8px 12px",
93
- backgroundColor: "#ef4444",
94
- color: "#ffffff",
95
- borderRadius: "6px",
96
- fontSize: "14px",
97
- whiteSpace: "nowrap",
98
- zIndex: 1000,
99
- boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
100
- }}
101
- >
102
- {props.extensionError}
103
- {/* Tooltip Arrow */}
104
- <div
105
- style={{
106
- position: "absolute",
107
- top: "100%",
108
- left: "50%",
109
- transform: "translateX(-50%)",
110
- width: 0,
111
- height: 0,
112
- borderLeft: "6px solid transparent",
113
- borderRight: "6px solid transparent",
114
- borderTop: "6px solid #ef4444",
115
- }}
116
- />
117
- </div>
118
- )}
119
- </div>
120
- );
121
- };
122
-
123
- export default AutoBeFileUploadBox;
1
+ import { ReactNode, useState } from "react";
2
+
3
+ export interface IAutoBeFileUploadBoxProps {
4
+ extensionError: ReactNode | null;
5
+ onClick: () => void;
6
+ enabled: boolean;
7
+ }
8
+
9
+ export const AutoBeFileUploadBox = (props: IAutoBeFileUploadBoxProps) => {
10
+ const [isHovered, setIsHovered] = useState(false);
11
+
12
+ const hasError = !!props.extensionError;
13
+
14
+ const getButtonStyles = () => {
15
+ const baseStyles = {
16
+ display: "inline-flex",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ width: "40px",
20
+ height: "40px",
21
+ padding: "0",
22
+ border: "1px solid",
23
+ borderRadius: "50%",
24
+ cursor: props.enabled ? "pointer" : "not-allowed",
25
+ backgroundColor: hasError ? "#fef2f2" : "transparent",
26
+ borderColor: hasError ? "#f87171" : isHovered ? "#3b82f6" : "#d1d5db",
27
+ opacity: props.enabled ? 1 : 0.5,
28
+ transition: "all 0.3s ease",
29
+ position: "relative" as const,
30
+ };
31
+
32
+ if (isHovered && props.enabled) {
33
+ return {
34
+ ...baseStyles,
35
+ backgroundColor: hasError ? "#fef2f2" : "#f3f4f6",
36
+ borderColor: hasError ? "#f87171" : "#3b82f6",
37
+ };
38
+ }
39
+
40
+ return baseStyles;
41
+ };
42
+
43
+ const iconColor = hasError ? "#ef4444" : "#6b7280";
44
+
45
+ return (
46
+ <div style={{ position: "relative", display: "inline-block" }}>
47
+ <button
48
+ onClick={props.onClick}
49
+ disabled={!props.enabled}
50
+ style={getButtonStyles()}
51
+ onMouseEnter={() => {
52
+ setIsHovered(true);
53
+ }}
54
+ onMouseLeave={() => {
55
+ setIsHovered(false);
56
+ }}
57
+ >
58
+ {hasError ? (
59
+ // Error Icon (SVG)
60
+ <svg
61
+ width="20"
62
+ height="20"
63
+ viewBox="0 0 24 24"
64
+ fill="currentColor"
65
+ style={{ color: iconColor }}
66
+ >
67
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" />
68
+ </svg>
69
+ ) : (
70
+ // Add Icon (SVG)
71
+ <svg
72
+ width="20"
73
+ height="20"
74
+ viewBox="0 0 24 24"
75
+ fill="currentColor"
76
+ style={{ color: iconColor }}
77
+ >
78
+ <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
79
+ </svg>
80
+ )}
81
+ </button>
82
+
83
+ {/* Custom Tooltip - Always show when there's an error */}
84
+ {hasError && (
85
+ <div
86
+ style={{
87
+ position: "absolute",
88
+ bottom: "100%",
89
+ left: "50%",
90
+ transform: "translateX(-50%)",
91
+ marginBottom: "8px",
92
+ padding: "8px 12px",
93
+ backgroundColor: "#ef4444",
94
+ color: "#ffffff",
95
+ borderRadius: "6px",
96
+ fontSize: "14px",
97
+ whiteSpace: "nowrap",
98
+ zIndex: 1000,
99
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
100
+ }}
101
+ >
102
+ {props.extensionError}
103
+ {/* Tooltip Arrow */}
104
+ <div
105
+ style={{
106
+ position: "absolute",
107
+ top: "100%",
108
+ left: "50%",
109
+ transform: "translateX(-50%)",
110
+ width: 0,
111
+ height: 0,
112
+ borderLeft: "6px solid transparent",
113
+ borderRight: "6px solid transparent",
114
+ borderTop: "6px solid #ef4444",
115
+ }}
116
+ />
117
+ </div>
118
+ )}
119
+ </div>
120
+ );
121
+ };
122
+
123
+ export default AutoBeFileUploadBox;
@@ -1,100 +1,100 @@
1
- import { AutoBeUserMessageAudioContent } from "@autobe/interface";
2
- import { useState } from "react";
3
-
4
- import { AutoBeVoiceRecorder } from "../../utils/AutoBeVoiceRecorder";
5
-
6
- export const AutoBeVoiceRecoderButton = (
7
- props: AutoBeVoiceRecoderButton.IProps,
8
- ) => {
9
- const [isRecording, setIsRecording] = useState(false);
10
- const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder | null>(
11
- null,
12
- );
13
-
14
- const startRecording = async () => {
15
- const recorder = await AutoBeVoiceRecorder.start(props.onComplete);
16
- recorder.start();
17
- setMediaRecorder(recorder);
18
- setIsRecording(true);
19
- };
20
-
21
- const stopRecording = () => {
22
- if (mediaRecorder && mediaRecorder.state !== "inactive") {
23
- mediaRecorder.stop();
24
- setIsRecording(false);
25
- }
26
- };
27
-
28
- const baseStyles: React.CSSProperties = {
29
- padding: "6px",
30
- border: "1px solid",
31
- borderColor: isRecording ? "#f44336" : "#e0e0e0",
32
- borderRadius: "4px",
33
- backgroundColor: isRecording ? "#ffebee" : "transparent",
34
- color: isRecording ? "#f44336" : "#1976d2",
35
- cursor: props.enabled ? "pointer" : "not-allowed",
36
- display: "inline-flex",
37
- alignItems: "center",
38
- justifyContent: "center",
39
- transition: "all 0.3s ease",
40
- outline: "none",
41
- width: "32px",
42
- height: "32px",
43
- opacity: props.enabled ? 1 : 0.5,
44
- };
45
-
46
- const hoverStyles: React.CSSProperties = {
47
- ...baseStyles,
48
- backgroundColor: isRecording ? "#f44336" : "#f5f5f5",
49
- borderColor: isRecording ? "#d32f2f" : "#1976d2",
50
- color: isRecording ? "#ffffff" : "#1976d2",
51
- };
52
-
53
- return (
54
- <button
55
- style={baseStyles}
56
- onClick={isRecording ? stopRecording : () => void startRecording()}
57
- disabled={!props.enabled}
58
- onMouseEnter={(e) => {
59
- if (props.enabled) {
60
- Object.assign(e.currentTarget.style, hoverStyles);
61
- }
62
- }}
63
- onMouseLeave={(e) => {
64
- Object.assign(e.currentTarget.style, baseStyles);
65
- }}
66
- >
67
- {isRecording ? (
68
- <svg
69
- width="16"
70
- height="16"
71
- viewBox="0 0 24 24"
72
- fill="currentColor"
73
- style={{ display: "block" }}
74
- >
75
- <path d="M6 6h12v12H6z" />
76
- </svg>
77
- ) : (
78
- <svg
79
- width="16"
80
- height="16"
81
- viewBox="0 0 24 24"
82
- fill="currentColor"
83
- style={{ display: "block" }}
84
- >
85
- <path d="M12 2C13.1 2 14 2.9 14 4V10C14 11.1 13.1 12 12 12C10.9 12 10 11.1 10 10V4C10 2.9 10.9 2 12 2ZM19 10V12C19 15.866 15.866 19 12 19C8.134 19 5 15.866 5 12V10H7V12C7 14.761 9.239 17 12 17C14.761 17 17 14.761 17 12V10H19ZM11 20V22H13V20H16V22H8V20H11Z" />
86
- </svg>
87
- )}
88
- </button>
89
- );
90
- };
91
-
92
- export namespace AutoBeVoiceRecoderButton {
93
- export interface IProps {
94
- enabled: boolean;
95
- onComplete: (content: {
96
- file: File;
97
- content: AutoBeUserMessageAudioContent;
98
- }) => void;
99
- }
100
- }
1
+ import { AutoBeUserMessageAudioContent } from "@autobe/interface";
2
+ import { useState } from "react";
3
+
4
+ import { AutoBeVoiceRecorder } from "../../utils/AutoBeVoiceRecorder";
5
+
6
+ export const AutoBeVoiceRecoderButton = (
7
+ props: AutoBeVoiceRecoderButton.IProps,
8
+ ) => {
9
+ const [isRecording, setIsRecording] = useState(false);
10
+ const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder | null>(
11
+ null,
12
+ );
13
+
14
+ const startRecording = async () => {
15
+ const recorder = await AutoBeVoiceRecorder.start(props.onComplete);
16
+ recorder.start();
17
+ setMediaRecorder(recorder);
18
+ setIsRecording(true);
19
+ };
20
+
21
+ const stopRecording = () => {
22
+ if (mediaRecorder && mediaRecorder.state !== "inactive") {
23
+ mediaRecorder.stop();
24
+ setIsRecording(false);
25
+ }
26
+ };
27
+
28
+ const baseStyles: React.CSSProperties = {
29
+ padding: "6px",
30
+ border: "1px solid",
31
+ borderColor: isRecording ? "#f44336" : "#e0e0e0",
32
+ borderRadius: "4px",
33
+ backgroundColor: isRecording ? "#ffebee" : "transparent",
34
+ color: isRecording ? "#f44336" : "#1976d2",
35
+ cursor: props.enabled ? "pointer" : "not-allowed",
36
+ display: "inline-flex",
37
+ alignItems: "center",
38
+ justifyContent: "center",
39
+ transition: "all 0.3s ease",
40
+ outline: "none",
41
+ width: "32px",
42
+ height: "32px",
43
+ opacity: props.enabled ? 1 : 0.5,
44
+ };
45
+
46
+ const hoverStyles: React.CSSProperties = {
47
+ ...baseStyles,
48
+ backgroundColor: isRecording ? "#f44336" : "#f5f5f5",
49
+ borderColor: isRecording ? "#d32f2f" : "#1976d2",
50
+ color: isRecording ? "#ffffff" : "#1976d2",
51
+ };
52
+
53
+ return (
54
+ <button
55
+ style={baseStyles}
56
+ onClick={isRecording ? stopRecording : () => void startRecording()}
57
+ disabled={!props.enabled}
58
+ onMouseEnter={(e) => {
59
+ if (props.enabled) {
60
+ Object.assign(e.currentTarget.style, hoverStyles);
61
+ }
62
+ }}
63
+ onMouseLeave={(e) => {
64
+ Object.assign(e.currentTarget.style, baseStyles);
65
+ }}
66
+ >
67
+ {isRecording ? (
68
+ <svg
69
+ width="16"
70
+ height="16"
71
+ viewBox="0 0 24 24"
72
+ fill="currentColor"
73
+ style={{ display: "block" }}
74
+ >
75
+ <path d="M6 6h12v12H6z" />
76
+ </svg>
77
+ ) : (
78
+ <svg
79
+ width="16"
80
+ height="16"
81
+ viewBox="0 0 24 24"
82
+ fill="currentColor"
83
+ style={{ display: "block" }}
84
+ >
85
+ <path d="M12 2C13.1 2 14 2.9 14 4V10C14 11.1 13.1 12 12 12C10.9 12 10 11.1 10 10V4C10 2.9 10.9 2 12 2ZM19 10V12C19 15.866 15.866 19 12 19C8.134 19 5 15.866 5 12V10H7V12C7 14.761 9.239 17 12 17C14.761 17 17 14.761 17 12V10H19ZM11 20V22H13V20H16V22H8V20H11Z" />
86
+ </svg>
87
+ )}
88
+ </button>
89
+ );
90
+ };
91
+
92
+ export namespace AutoBeVoiceRecoderButton {
93
+ export interface IProps {
94
+ enabled: boolean;
95
+ onComplete: (content: {
96
+ file: File;
97
+ content: AutoBeUserMessageAudioContent;
98
+ }) => void;
99
+ }
100
+ }