Skip to content

Commit

Permalink
feat: only disable textarea when listening
Browse files Browse the repository at this point in the history
  • Loading branch information
mondaychen committed Apr 22, 2024
1 parent 9987405 commit e2a9728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/TaskUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const TaskUI = () => {
instructions: state.ui.instructions,
setInstructions: state.ui.actions.setInstructions,
voiceMode: state.settings.voiceMode,
isListening: state.currentTask.isListening,
}));
const taskInProgress = state.taskStatus === "running";

Expand Down Expand Up @@ -106,7 +107,7 @@ const TaskUI = () => {
autoFocus
placeholder="Try telling WebWand to do something..."
value={state.instructions || ""}
disabled={taskInProgress || state.voiceMode}
disabled={taskInProgress || state.isListening}
onChange={(e) => state.setInstructions(e.target.value)}
mb={2}
onKeyDown={onKeyDown}
Expand All @@ -127,7 +128,8 @@ const TaskUI = () => {
<AlertIcon />
<AlertDescription fontSize="sm">
In Voice Mode, you can press Space to start speaking and Space again
to stop. WebWand will run the task when you stop speaking.
to stop. WebWand will run the task when you stop speaking. To turn
off Voice Mode, click the Setting icon in the top right corner.
</AlertDescription>
</Alert>
)}
Expand Down

0 comments on commit e2a9728

Please sign in to comment.