fix(navigation): resolve VLM hallucination on EXPLORE_GRID and optimize GOAP logging

1. Fixed a bug where 'tap first grid item' was not matching the telepathic fast-path string
   ('first image in explore grid'). This caused the intent to fall through to the VLM
   for visual discovery. Since 'tap first grid item' is highly ambiguous for a VLM,
   it hallucinated and selected the search bar (Box 10), causing the keyboard to open
   and the bot to transition to an UNKNOWN state.
2. Optimized GOAP Step and Brain logging to always explicitly include the user's
   ultimate goal string, ensuring a transparent 'goal-oriented' debugging trail.
This commit is contained in:
2026-04-29 00:38:58 +02:00
parent 0dbafd0a82
commit a846462d02
3 changed files with 3 additions and 3 deletions

View File

@@ -146,7 +146,7 @@ class GoalExecutor:
screen["available_actions"] = masked_available
logger.debug(
f"📍 [GOAP Step {step_num + 1}] On: {screen_type.value} | "
f"📍 [GOAP Step {step_num + 1}] Goal: '{goal}' | On: {screen_type.value} | "
f"Available: {screen.get('available_actions', [])[:5]}"
)

View File

@@ -157,7 +157,7 @@ class GoalPlanner:
brain_action = ask_brain_for_action(goal, screen_type.name, available, avoid_actions)
if brain_action:
logger.info(f"🧠 [Brain] Decided dynamically to execute: '{brain_action}'")
logger.info(f"🧠 [Brain] Decided to execute: '{brain_action}' (to achieve: '{goal}')")
return brain_action
# ── 2. HD Map Routing (Fallback) ──

View File

@@ -139,7 +139,7 @@ class TelepathicEngine:
skip_positions = set()
intent_lower = intent_description.lower()
if "first image in explore grid" in intent_lower:
if "first image in explore grid" in intent_lower or "tap first grid item" in intent_lower:
grid_items = [
n
for n in nodes