Expose VedAstro overview boundary in AI chat

This commit is contained in:
732642856
2026-06-29 10:23:42 +08:00
parent 28229e1388
commit 3452beee1b
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -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),
'',
+3
View File
@@ -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: