@fe-free/ai 4.0.2 → 4.0.3
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/CHANGELOG.md +9 -0
- package/package.json +4 -4
- package/src/sender/actions.tsx +11 -2
- package/src/sender/sender.stories.tsx +2 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fe-free/ai",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"author": "",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ahooks": "^3.7.8",
|
|
14
14
|
"classnames": "^2.5.1",
|
|
15
|
-
"@fe-free/core": "4.0.
|
|
15
|
+
"@fe-free/core": "4.0.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"antd": "^5.27.1",
|
|
19
19
|
"dayjs": "~1.11.10",
|
|
20
20
|
"react": "^19.2.0",
|
|
21
|
-
"@fe-free/icons": "4.0.
|
|
22
|
-
"@fe-free/tool": "4.0.
|
|
21
|
+
"@fe-free/icons": "4.0.3",
|
|
22
|
+
"@fe-free/tool": "4.0.3"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"test": "echo \"Error: no test specified\" && exit 1"
|
package/src/sender/actions.tsx
CHANGED
|
@@ -37,7 +37,7 @@ function Actions(
|
|
|
37
37
|
const isLoading = loading || isUploading;
|
|
38
38
|
|
|
39
39
|
const handleSubmit = useCallback(async () => {
|
|
40
|
-
if (isLoading) {
|
|
40
|
+
if (isLoading || allowSpeech?.recording) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -58,7 +58,16 @@ function Actions(
|
|
|
58
58
|
// focus
|
|
59
59
|
refText.current?.focus();
|
|
60
60
|
}
|
|
61
|
-
}, [
|
|
61
|
+
}, [
|
|
62
|
+
isLoading,
|
|
63
|
+
allowSpeech?.recording,
|
|
64
|
+
value,
|
|
65
|
+
onSubmit,
|
|
66
|
+
setFileList,
|
|
67
|
+
setFileUrls,
|
|
68
|
+
onChange,
|
|
69
|
+
refText,
|
|
70
|
+
]);
|
|
62
71
|
|
|
63
72
|
return (
|
|
64
73
|
<div className="flex items-center gap-2">
|
|
@@ -60,7 +60,8 @@ export const AllowUpload: Story = {
|
|
|
60
60
|
|
|
61
61
|
export const AllowSpeech: Story = {
|
|
62
62
|
render: (props) => {
|
|
63
|
-
const [recording, setRecording] = useState(
|
|
63
|
+
const [recording, setRecording] = useState(true);
|
|
64
|
+
|
|
64
65
|
return <Component {...props} allowSpeech={{ recording, onRecordingChange: setRecording }} />;
|
|
65
66
|
},
|
|
66
67
|
};
|