Add VedAstro overview card to AI prompt panel
This commit is contained in:
@@ -884,6 +884,7 @@ function renderAIPromptPackPanel(cd) {
|
||||
const core = evidence.core || {};
|
||||
const timing = evidence.timing || {};
|
||||
const strength = evidence.strength || {};
|
||||
const vedastroOverview = evidence.vedastro_overview || {};
|
||||
const docs = pack.retrieval_plan?.local_reference_docs || [];
|
||||
const tags = pack.retrieval_plan?.retrieval_tags || [];
|
||||
const ranking = Array.isArray(strength.shadbala_ranking) ? strength.shadbala_ranking : [];
|
||||
@@ -917,6 +918,7 @@ function renderAIPromptPackPanel(cd) {
|
||||
<strong>${escapeHtml(timing.current_mahadasha || cd?.dasha?.current_md || '-')}</strong>
|
||||
<small>${escapeHtml(timing.current_antardasha ? `AD ${timing.current_antardasha}` : timing.start_date || '')}</small>
|
||||
</div>
|
||||
${renderVedAstroOverviewPromptCard(vedastroOverview)}
|
||||
</div>
|
||||
<div class="ai-prompt-pack-body">
|
||||
<div>
|
||||
@@ -953,6 +955,23 @@ function renderAIPromptPackPanel(cd) {
|
||||
setupAIPromptPackActions(host, cd, pack);
|
||||
}
|
||||
|
||||
function renderVedAstroOverviewPromptCard(overview = {}) {
|
||||
if (!overview || typeof overview !== 'object') return '';
|
||||
const status = overview.status || 'blocked';
|
||||
const label = overview.top_events_by_domain?.marriage?.signal_label
|
||||
|| overview.top_events_by_domain?.career?.signal_label
|
||||
|| overview.top_events_by_domain?.wealth?.signal_label
|
||||
|| overview.source
|
||||
|| '-';
|
||||
return `
|
||||
<div class="ai-prompt-pack-card">
|
||||
<span>VedAstro Overview</span>
|
||||
<strong>${escapeHtml(status)}</strong>
|
||||
<small>${escapeHtml(`${label} · ${overview.search_scope || 'single_day_overview'} · overview only,不替代长周期精扫`)}</small>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
function renderAyanamsaRuntimeStatus(cd, pack) {
|
||||
const settings = readCalculationSettings();
|
||||
const boundary = cd?._calculation_boundary || {};
|
||||
|
||||
@@ -302,6 +302,10 @@ def test_ai_prompt_pack_panel_exposes_copyable_audit_context() -> None:
|
||||
assert "setupAIPromptPackActions" in main
|
||||
assert "copyAIPromptPackSection" in main
|
||||
assert "AI Prompt Pack 审计上下文已复制" in main
|
||||
assert "vedastro_overview" in main
|
||||
assert "renderVedAstroOverviewPromptCard" in main
|
||||
assert "VedAstro Overview" in main
|
||||
assert "overview only,不替代长周期精扫" in main
|
||||
assert ".ai-prompt-pack-actions" in style
|
||||
assert ".ayanamsa-runtime-status" in style
|
||||
|
||||
|
||||
Reference in New Issue
Block a user