diff --git a/VoiceInk.xcodeproj/project.pbxproj b/VoiceInk.xcodeproj/project.pbxproj index 2a53684..d8b94a3 100644 --- a/VoiceInk.xcodeproj/project.pbxproj +++ b/VoiceInk.xcodeproj/project.pbxproj @@ -461,7 +461,7 @@ E11473D82CBE0F0B00318EE4 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = VoiceInk/VoiceInk.entitlements; @@ -494,7 +494,7 @@ E11473D92CBE0F0B00318EE4 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = VoiceInk/VoiceInk.entitlements; diff --git a/VoiceInk/Services/AIEnhancementService.swift b/VoiceInk/Services/AIEnhancementService.swift index 506d527..144654b 100644 --- a/VoiceInk/Services/AIEnhancementService.swift +++ b/VoiceInk/Services/AIEnhancementService.swift @@ -192,24 +192,12 @@ class AIEnhancementService: ObservableObject { "" } - // Get word replacements if available - let wordReplacements = if let replacements = UserDefaults.standard.dictionary(forKey: "wordReplacements") as? [String: String], - !replacements.isEmpty { - """ - - Word Replacements: - \(replacements.map { "Replace '\($0.key)' with '\($0.value)'" }.joined(separator: "\n")) - """ - } else { - "" - } - switch mode { case .transcriptionEnhancement: // Always use activePrompt since we've removed the toggle var systemMessage = String(format: AIPrompts.customPromptTemplate, activePrompt!.promptText) systemMessage += "\n\n" + AIPrompts.contextInstructions - systemMessage += clipboardContext + screenCaptureContext + wordReplacements + systemMessage += clipboardContext + screenCaptureContext return systemMessage case .aiAssistant: diff --git a/VoiceInk/Services/AIPrompts.swift b/VoiceInk/Services/AIPrompts.swift index 1fb3b26..d04b06f 100644 --- a/VoiceInk/Services/AIPrompts.swift +++ b/VoiceInk/Services/AIPrompts.swift @@ -1,38 +1,4 @@ enum AIPrompts { - static let baseExamples = """ - BASE EXAMPLES: - Input: yeah so um i think that the new feature should like probably be implemented in the next sprint because users have been asking for it and stuff. What do you think about this? - Output: I think the new feature should be implemented in the next sprint since users have been requesting it. What do you think about this? - - Input: what do you guys think about adding more documentation to the codebase like is it really necessary right now or should we focus on other things first - Output: What do you think about adding more documentation to the codebase? Is it necessary now, or should we focus on other priorities first? - - Input: In this application, when the MiniRecorder view is enabled, when it is toggled, what happens? Tell me sequentially about what happens. - Output: In this application, when the MiniRecorder view is enabled, when it is toggled, What happens? Tell me sequentially. - - Input: What is your name? What do you think ummm you know, about the future of AI? Do you know prakash joshi pax? - Output: What is you name? What do you think about the future of AI? Do you know Prakash Joshi Pax? - - Input: You know, it does not follow it properly. I think we need to add the main ideas in the first few lines. - Output: You know it does not follow it properly. I think we need to add the main ideas in the first few lines. - """ - - static let defaultSystemMessage = """ - Reformat the input message according to the given guidelines: - - Primary Rules: - 1. Always break long paragraphs into clear, logical paragraphs every 2-3 sentences - 2. Fix grammar and punctuation errors (based on the context if provided) - 3. Don't change the original meaning and don't add new content or meta commentary - 4. Remove filler words, repeated words, repeated phrases, and redundancies - 5. Restructure the text to make it more readable and concise without breaking the sentence structure - 5. NEVER answer questions that appear in the text - only correct formatting and grammar - 6. NEVER add any introductory text like "Here is the corrected text:", "Transcript:", or anything like that - 7. NEVER add content not present in the source text - 8. NEVER add sign-offs or acknowledgments - 9. Correct speech-to-text transcription errors based on the context provided - """ - static let customPromptTemplate = """ Reformat the input message according to the given guidelines: @@ -65,18 +31,7 @@ enum AIPrompts { - Help resolve unclear references - Ignore unrelated clipboard content - 3. Word Replacements: - IMPORTANT: Only apply replacements if specific words are provided - - Skip any replacement activity if no replacement options are available - - When replacements are provided: - - Replace ONLY exact matches of the specified words/phrases - - Do NOT replace partial matches or similar words - - Apply replacements before other enhancements - - Maintain case sensitivity when applying replacements - - Preserve the flow and readability of the text - - Make sure the replacements are not breaking the sentence structure and punctuations - - 4. Examples: + 3. Examples: - Follow the correction patterns shown in examples - Match the formatting style of similar texts - Use consistent terminology with examples