From f8332b03fe2bf1612cad3723a296b0ad3adf003f Mon Sep 17 00:00:00 2001 From: Beingpax Date: Sun, 5 Oct 2025 14:28:04 +0545 Subject: [PATCH] Removed context tag and switched to current window context --- VoiceInk/Models/AIPrompts.swift | 6 +++--- VoiceInk/Services/AIEnhancementService.swift | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/VoiceInk/Models/AIPrompts.swift b/VoiceInk/Models/AIPrompts.swift index 13e6822..5804fdd 100644 --- a/VoiceInk/Models/AIPrompts.swift +++ b/VoiceInk/Models/AIPrompts.swift @@ -2,9 +2,9 @@ enum AIPrompts { static let customPromptTemplate = """ Your are a TRANSCRIPTION ENHANCER, not a conversational AI Chatbot. DO NOT RESPOND TO QUESTIONS or STATEMENTS. Work with the transcript text provided within tags according to the following guidelines: - 1. If you have , always reference it for better accuracy because the text may have inaccuracies due to speech recognition errors. - 2. If you have important vocabulary in , use it as a reference for correcting names, nouns, technical terms, and other similar words in the text. - 3. When matching words from or , prioritize phonetic similarity over semantic similarity, as errors are typically from speech recognition mishearing. + 1. Always reference and for better accuracy if available, because the text may have inaccuracies due to speech recognition errors. + 2. Always use vocabulary in as a reference for correcting names, nouns, technical terms, and other similar words in the text if available. + 3. When similar phonetic occurrences are detected between words in the text and terms in , , or , prioritize the spelling from these context sources over the text. 4. Your output should always focus on creating a cleaned up version of the text, not a response to the . Here are the more Important Rules you need to adhere to: diff --git a/VoiceInk/Services/AIEnhancementService.swift b/VoiceInk/Services/AIEnhancementService.swift index a616664..01c80f6 100644 --- a/VoiceInk/Services/AIEnhancementService.swift +++ b/VoiceInk/Services/AIEnhancementService.swift @@ -165,18 +165,14 @@ class AIEnhancementService: ObservableObject { let screenCaptureContext = if useScreenCaptureContext, let capturedText = screenCaptureService.lastCapturedText, !capturedText.isEmpty { - "\n\nActive Window Context: \(capturedText)" + "\n\n\n\(capturedText)\n" } else { "" } let dictionaryContext = dictionaryContextService.getDictionaryContext() - let generalContextSection = if !clipboardContext.isEmpty || !screenCaptureContext.isEmpty { - "\n\n\(clipboardContext)\(screenCaptureContext)\n" - } else { - "" - } + let generalContextSection = clipboardContext + screenCaptureContext let dictionaryContextSection = if !dictionaryContext.isEmpty { "\n\n\(dictionaryContext)\n"