feat: enrich insights cards, add AI chatbot

Add 3 new data-driven insight cards (daily cases, district risk
comparison, weather impact) with real parquet data. Fix season
card to use current date instead of data date. Expand to 11 cards.

Add POST /api/chat endpoint proxying to ai.2890.ltd with JWT auth.
Create ChatBot frontend component with collapsible chat panel,
message bubbles, and auto-scroll. Chat API key stored in .env only.

Clean up duplicate typing imports in insights.py, export cachedPost.
This commit is contained in:
2026-06-05 03:10:28 +08:00
parent 58a6df0e06
commit cb0f6cf7f6
8 changed files with 585 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
import { useEffect } from 'react';
import { useAnalysisStore } from '@/stores/analysisStore';
import { ErrorBanner } from '@/components/ErrorBanner';
import { ChatBot } from '@/components/ChatBot';
import {
Lightbulb,
AlertTriangle,
@@ -193,6 +194,8 @@ export function Insights() {
<p className="text-text-secondary"></p>
</div>
)}
<ChatBot />
</div>
);
}