From 3452beee1bc07758d9770b7b227ab3ed911bfbde Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Mon, 29 Jun 2026 10:23:42 +0800 Subject: [PATCH] Expose VedAstro overview boundary in AI chat --- jyotish-app/ai-chat.js | 10 ++++++++++ tests/test_frontend_productization.py | 3 +++ 2 files changed, 13 insertions(+) diff --git a/jyotish-app/ai-chat.js b/jyotish-app/ai-chat.js index d8a4dfb5..51da4075 100644 --- a/jyotish-app/ai-chat.js +++ b/jyotish-app/ai-chat.js @@ -289,12 +289,22 @@ async function sendMessage() { function buildChartContext(cd) { if (!cd?.planets || !cd?.ascendant) return t('ai.no.data'); if (cd.ai_prompt_pack?.prompt_zh && cd.ai_prompt_pack?.evidence_snapshot) { + const vedastroOverview = cd.ai_prompt_pack.evidence_snapshot.vedastro_overview || {}; + const vedastroBoundary = vedastroOverview && typeof vedastroOverview === 'object' + ? [ + '【VedAstro Overview Boundary】', + `status=${vedastroOverview.status || 'blocked'} · scope=${vedastroOverview.search_scope || 'single_day_overview'} · source=${vedastroOverview.source || 'vedastro_service_adapter_candidate'}`, + 'overview only,不替代长周期精扫。', + ].join('\n') + : ''; return [ '【AI Prompt Pack】', cd.ai_prompt_pack.prompt_zh, '', DASHA_SHADBALA_AI_CALIBRATION_BOUNDARY, '', + vedastroBoundary, + '', '【evidence_snapshot】', JSON.stringify(cd.ai_prompt_pack.evidence_snapshot, null, 2), '', diff --git a/tests/test_frontend_productization.py b/tests/test_frontend_productization.py index ec06f419..92c0a3bd 100644 --- a/tests/test_frontend_productization.py +++ b/tests/test_frontend_productization.py @@ -290,6 +290,9 @@ def test_ai_chat_prefers_backend_prompt_pack_context() -> None: assert "JSON.stringify(cd.ai_prompt_pack.evidence_snapshot" in ai_chat assert "JSON.stringify(cd.ai_prompt_pack.retrieval_plan" in ai_chat assert "AI Prompt Pack 已作为上下文入口" in ai_chat + assert "【VedAstro Overview Boundary】" in ai_chat + assert "overview only,不替代长周期精扫" in ai_chat + assert "single_day_overview" in ai_chat def test_ai_prompt_pack_panel_exposes_copyable_audit_context() -> None: