Skip to content

Commit f0a0ddd

Browse files
committed
Allow snippet expansion by direct trigger match without prefix
Made-with: Cursor
1 parent b62a7cd commit f0a0ddd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

voxtral_realtime/macos/VoxtralRealtime/Services/TextPipeline.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ final class TextPipeline {
163163
}
164164
}
165165

166+
let directMatch = lowered
167+
.trimmingCharacters(in: .punctuationCharacters)
168+
if let snippet = snippetStore.snippets.first(where: {
169+
$0.isEnabled && $0.trigger.compare(directMatch, options: .caseInsensitive) == .orderedSame
170+
}) {
171+
snippetStore.markUsed(snippet.id)
172+
return (snippet.content, [snippet.id])
173+
}
174+
166175
return (text, [])
167176
}
168177

0 commit comments

Comments
 (0)