mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
Merge branch 'dev' of github.com:rowboatlabs/rowboat into dev
This commit is contained in:
commit
9a70e90220
2 changed files with 15 additions and 1 deletions
|
|
@ -630,7 +630,6 @@ export function OnboardingModal({ open, onComplete }: OnboardingModalProps) {
|
|||
return (
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-center justify-center gap-3 mb-3">
|
||||
<img src="/logo-only.png" alt="Rowboat" className="size-10" />
|
||||
<span className="text-lg font-medium text-muted-foreground">Your AI coworker, with memory</span>
|
||||
</div>
|
||||
<DialogHeader className="text-center mb-3">
|
||||
|
|
|
|||
|
|
@ -460,12 +460,25 @@ async function transcribeWithDeepgram(audioBlob: Blob): Promise<string | null> {
|
|||
// Voice Note Recording Button
|
||||
function VoiceNoteButton({ onNoteCreated }: { onNoteCreated?: (path: string) => void }) {
|
||||
const [isRecording, setIsRecording] = React.useState(false)
|
||||
const [hasDeepgramKey, setHasDeepgramKey] = React.useState(false)
|
||||
const mediaRecorderRef = React.useRef<MediaRecorder | null>(null)
|
||||
const chunksRef = React.useRef<Blob[]>([])
|
||||
const notePathRef = React.useRef<string | null>(null)
|
||||
const timestampRef = React.useRef<string | null>(null)
|
||||
const relativePathRef = React.useRef<string | null>(null)
|
||||
|
||||
React.useEffect(() => {
|
||||
window.ipc.invoke('workspace:readFile', {
|
||||
path: 'config/deepgram.json',
|
||||
encoding: 'utf8',
|
||||
}).then((result: { data: string }) => {
|
||||
const { apiKey } = JSON.parse(result.data) as { apiKey: string }
|
||||
setHasDeepgramKey(!!apiKey)
|
||||
}).catch(() => {
|
||||
setHasDeepgramKey(false)
|
||||
})
|
||||
}, [])
|
||||
|
||||
const startRecording = async () => {
|
||||
try {
|
||||
// Generate timestamp and paths immediately
|
||||
|
|
@ -627,6 +640,8 @@ ${transcript}
|
|||
setIsRecording(false)
|
||||
}
|
||||
|
||||
if (!hasDeepgramKey) return null
|
||||
|
||||
return (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue