@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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @fe-free/ai
2
2
 
3
+ ## 4.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: ai
8
+ - @fe-free/core@4.0.3
9
+ - @fe-free/icons@4.0.3
10
+ - @fe-free/tool@4.0.3
11
+
3
12
  ## 4.0.2
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/ai",
3
- "version": "4.0.2",
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.2"
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.2",
22
- "@fe-free/tool": "4.0.2"
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"
@@ -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
- }, [isLoading, value, onSubmit, setFileList, setFileUrls, onChange, refText]);
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(false);
63
+ const [recording, setRecording] = useState(true);
64
+
64
65
  return <Component {...props} allowSpeech={{ recording, onRecordingChange: setRecording }} />;
65
66
  },
66
67
  };