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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user