minor cleanup
This commit is contained in:
parent
c91f92f4d0
commit
1417b7a4fe
@ -134,7 +134,7 @@ class AIEnhancementService: ObservableObject {
|
||||
private func getSystemMessage(for mode: EnhancementPrompt) -> String {
|
||||
let clipboardSnapshot = NSPasteboard.general.string(forType: .string)
|
||||
let selectedText = SelectedTextService.fetchSelectedText()
|
||||
|
||||
|
||||
if let activePrompt = activePrompt,
|
||||
activePrompt.id == PredefinedPrompts.assistantPromptId,
|
||||
let selectedText = selectedText, !selectedText.isEmpty {
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import Foundation
|
||||
import AppKit
|
||||
class SelectedTextService {
|
||||
|
||||
// Private pasteboard type to avoid clipboard history pollution
|
||||
private static let privatePasteboardType = NSPasteboard.PasteboardType("com.prakashjoshipax.VoiceInk.transient")
|
||||
|
||||
static func fetchSelectedText() -> String? {
|
||||
// Don't check for selected text within VoiceInk itself
|
||||
guard let frontmostApp = NSWorkspace.shared.frontmostApplication,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user