fix(voice): resolve areas per view, without accents and per natural place

From review:
- An answer the view picked ("Springfield" over Illinois) is reused or
  shared only within the same ~2° view cell, so asking again elsewhere no
  longer gets the first state's area.
- Admin names compare with accents folded on Latin letters only: "Quebec"
  matches "Québec" and "Cordoba" asks between Argentina and Spain, while a
  Thai or Devanagari mark still tells names apart.
- A Natural Earth name used by several features is one place with every
  part when they touch (the Great Rift Valley, the Lau Group across 180°)
  and a question when they are far apart (Flores); natural places can now
  be candidates.
- The AREAS rule and the area tool descriptions are tighter, leaving a
  ~270-character margin under the 55,500 prompt ceiling, and resolve_area
  no longer names osm_query when that tool is not offered.
This commit is contained in:
Manjunath committed 2026-11-03 19:36:25 +05:30
1 parent fb74354d30
commit 207373389a
12 files changed
+328 -22

No files matched your search

+3 -1
View File
@@ -344,7 +344,9 @@ test('deixis prompt lint: one short rule, and every sentinel it names exists in
// characters. It was 56,308 after the area/imagery/OSM merge; stating each
// policy once (WHERE precedence, AREAS routing, AFTER TOOLS speech) brought
// it to 51,646. Voice geometry (resolve_area, find_imagery, osm_query and
// the analyst area scopes) raised the ceiling to 55,500. A new tool or rule
// the analyst area scopes) raised the ceiling to 55,500; tightening the
// AREAS rule and the area tool descriptions left it at 55,233 with an
// operator Overpass, a deliberate ~270-character margin. A new tool or rule
// has to fit under this ceiling.
const size = instructions.length + JSON.stringify(GEV_REALTIME_TOOLS).length;
assert.ok(size <= 55_500, `prompt size ${size}`);