Read "clear … except" from the map only when it clears every other layer

"clear all flights except ships from the map" no longer offers to turn
Ships on.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-18 20:58:18 -08:00
1 parent 038915bc0b
commit 6f959fc3cc
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -313,7 +313,7 @@ export function normalizeLine(text, { isRequest = isPlainRequest } = {}) {
// "clear" takes the whole map: "clear flights" would read as a place.
const lower = bare.toLowerCase();
return CLEAR_ALL.test(lower) ||
/^clear (?:everything|all|every)\b.*\b(?:except|but|other than|apart from|besides|save for)\b/.test(
/^clear (?:everything|all(?: the)?(?: other)?(?: layers?)?|every layer) (?:except|but|other than|apart from|besides|save for)\b/.test(
lower,
)
? bare