feat: Add FloatingVoice component for voice-to-text input

- Add FloatingVoice component with Web Speech API transcription
- Each component has its own independent WebSocket session
- Voice panel connects on open, disconnects on close
- Sends transcribed text to Claude Code with Enter key
This commit is contained in:
2026-02-13 20:24:57 -06:00
parent 86b3246fa1
commit 8118356999
3 changed files with 652 additions and 1 deletions

View File

@@ -436,7 +436,14 @@ defineExpose({
isOpen: isOpen.value,
position: position.value,
size: size.value
})
}),
sendInput: (text: string) => {
if (socket && socket.readyState === WebSocket.OPEN) {
socket.send(JSON.stringify({ type: 'input', data: text + '\r' }))
return true
}
return false
}
})
</script>