From e58d178c9d3c57c223a39bf70dee9d975bc115bc Mon Sep 17 00:00:00 2001 From: Beingpax Date: Wed, 8 Oct 2025 15:48:33 +0545 Subject: [PATCH] Add prompt picker to audio transcribe tab --- VoiceInk/Views/AudioTranscribeView.swift | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/VoiceInk/Views/AudioTranscribeView.swift b/VoiceInk/Views/AudioTranscribeView.swift index 647dca1..b62d023 100644 --- a/VoiceInk/Views/AudioTranscribeView.swift +++ b/VoiceInk/Views/AudioTranscribeView.swift @@ -84,6 +84,31 @@ struct AudioTranscribeView: View { HStack(spacing: 8) { Text("Prompt:") .font(.subheadline) + + if enhancementService.allPrompts.isEmpty { + Text("No prompts available") + .foregroundColor(.secondary) + .italic() + .font(.caption) + } else { + let promptBinding = Binding( + get: { + selectedPromptId ?? enhancementService.allPrompts.first?.id ?? UUID() + }, + set: { newValue in + selectedPromptId = newValue + enhancementService.selectedPromptId = newValue + } + ) + + Picker("", selection: promptBinding) { + ForEach(enhancementService.allPrompts) { prompt in + Text(prompt.title).tag(prompt.id) + } + } + .labelsHidden() + .fixedSize() + } } } }