normal-computing / fuji-web

Fuji is an AI agent that lives in your browser's sidepanel. You can now get tasks done online with a single command!
Apache License 2.0
195 stars 13 forks source link

Support speech recognition and text to speech #49

Closed lynchee-owo closed 3 months ago

mondaychen commented 3 months ago

You are using useEffect in the PR. It's probably the most misused hook of React. Although this PR is still in draft, I want to remind you to think about the lifecycle of the effects, and how to make sure the dependency array is carefully set up.

If this is new to you, please spend some time read

lynchee-owo commented 3 months ago

You are using useEffect in the PR. It's probably the most misused hook of React. Although this PR is still in draft, I want to remind you to think about the lifecycle of the effects, and how to make sure the dependency array is carefully set up.

If this is new to you, please spend some time read

I think for handling the case "run task immediately" when stop listening, could use an alternative approach than creating an event "document.dispatchEvent(new CustomEvent("stopListening"))" and listen it, could rewrite it in the state management way