From cd20d592b90be1d89d71b68bf3873f26ac311bcf Mon Sep 17 00:00:00 2001 From: isamu Date: Mon, 25 May 2026 14:12:12 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20groupId=20=E2=80=94=20merge=20related?= =?UTF-8?q?=20map=20operations=20onto=20one=20shared=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an optional `groupId` so a host can accumulate several map operations onto ONE map instead of spawning a card per call. - types: `groupId?` on MapArgs / MapToolData / MapJsonData (echoed through execute + emitted result). Documented as distinct from Google Maps' own `mapId` (cloud style id). - definition: `groupId` tool parameter with LLM guidance — reuse the same id for calls that share one map (and for later updates), a new id for a separate map. - systemPrompt: "Grouping operations onto one map" section with a worked example. - View: optional `results` prop — when the host passes the ordered group, the View replays the whole sequence onto its single map (markers accumulate, directions overlay, center follows the latest) and reconstructs that state on remount. Falls back to the single `selectedResult` (legacy one-result-per-map) when omitted. - demo: groups results by `groupId` and renders one merged card per group; "Trip A ①→④" samples accumulate on one map, "Trip B" lands on a separate card. Backward compatible: with no `groupId` / no `results`, behaviour is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- demo/vue/App.vue | 53 +++++++++++++++++++++++++++- src/core/definition.ts | 5 +++ src/core/plugin.ts | 37 +++++++++++++++++--- src/core/samples.ts | 52 ++++++++++++++++++++++++++++ src/core/types.ts | 12 +++++++ src/vue/View.vue | 78 +++++++++++++++++++++++++++++++++++++----- 6 files changed, 223 insertions(+), 14 deletions(-) diff --git a/demo/vue/App.vue b/demo/vue/App.vue index 43c2343..8fd6f84 100644 --- a/demo/vue/App.vue +++ b/demo/vue/App.vue @@ -21,7 +21,7 @@