A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
voice: ignore a trailing "à la place" / "instead"
Claudee04b6e81c4e1
diff --git a/NotchBuddy/Sources/App/Voice/IntentParser.swift b/NotchBuddy/Sources/App/Voice/IntentParser.swiftindex 7fb31941..43ebdbce 100644--- a/NotchBuddy/Sources/App/Voice/IntentParser.swift+++ b/NotchBuddy/Sources/App/Voice/IntentParser.swift@@ -23,6 +23,9 @@ enum IntentParser {// ── 0. Strip a trailing location: "… dans les pilules", "… dans le notch" ──(fwords, frawWords) = stripTrailingLocation(fwords, rawWords: frawWords)+ // …and a trailing "à la place" / "instead" with nothing after it:+ // "enlève GitHub et mets Stripe à la place" → "mets Stripe".+ (fwords, frawWords) = stripTrailingInstead(fwords, rawWords: frawWords)guard !fwords.isEmpty else { return .unknown }// ── 0. Strip spoken interjections from the start ─────────────────────@@ -328,6 +331,18 @@ enum IntentParser {}}+ /// Drops a trailing "à la place" / "à sa place" / "instead" (normalised: "a la place").+ private static func stripTrailingInstead(+ _ words: [String], rawWords: [String]+ ) -> ([String], [String]) {+ let tails: [[String]] = [["a", "la", "place"], ["a", "sa", "place"], ["instead"]]+ for t in tails where words.count > t.count && Array(words.suffix(t.count)) == t {+ let n = words.count - t.count+ return (Array(words.prefix(n)), Array(rawWords.prefix(min(n, rawWords.count))))+ }+ return (words, rawWords)+ }+/// Drops a trailing "dans les pilules" / "dans le notch" / "dans la barre" (after defilter,/// so "piles" is already gone and "mes" is already "les").private static func stripTrailingLocation(diff --git a/tests/IntentParserTests.swift b/tests/IntentParserTests.swiftindex 3da4dd59..0dff281b 100644--- a/tests/IntentParserTests.swift+++ b/tests/IntentParserTests.swift@@ -302,6 +302,13 @@ enum IntentParserTests {check("bon alors ajoute Notion",parse("bon alors ajoute Notion", pills: pills), .pillAdd(id: "integration_notion"))check("On s'en fout c'est", parse("On s'en fout c'est", pills: pills), .unknown)+ checkMultiAction("Enlève la pilule GT et mets Stripe à la place",+ parseMulti("Enlève la pilule GT et mets Stripe à la place"),+ [.pillRemove(id: "integration_github"), .pillAdd(id: "integration_stripe")])+ check("mets Stripe à la place",+ parse("mets Stripe à la place", pills: pills), .pillAdd(id: "integration_stripe"))+ check("add Stripe instead",+ parse("add Stripe instead", pills: pills), .pillAdd(id: "integration_stripe"))// Single pill with conjunction → NOT multi-action (fallback to single-intent)checkNilMultiAction("mets Gemini et Cursor",