feat: 每日AI分析改造——定调摘要、环比快照、完整连板梯队带涨停原因、生成次数记账
This commit is contained in:
@@ -14,7 +14,9 @@ export interface AiReport {
|
||||
toolsUsed: string[];
|
||||
model: string;
|
||||
tokens_used: number;
|
||||
generation_count?: number;
|
||||
created_at: string;
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
export async function fetchAiLatestReport(): Promise<AiReport> {
|
||||
|
||||
@@ -53,9 +53,12 @@ function AiAnalysisPage() {
|
||||
<div className="flex flex-wrap items-center gap-x-3 gap-y-1 sm:gap-4 text-xs sm:text-sm text-muted-foreground">
|
||||
<span className="flex items-center gap-1.5">
|
||||
<Clock className="h-3.5 w-3.5 shrink-0" />
|
||||
<span className="truncate">{report.created_at}</span>
|
||||
<span className="truncate">{report.updated_at || report.created_at}</span>
|
||||
</span>
|
||||
<span>{report.tokens_used?.toLocaleString()} tokens</span>
|
||||
{(report.generation_count ?? 1) > 1 && (
|
||||
<span>第 {report.generation_count} 次生成</span>
|
||||
)}
|
||||
{report.toolsUsed && report.toolsUsed.length > 0 && (
|
||||
<span className="flex items-center gap-1.5">
|
||||
<Wrench className="h-3.5 w-3.5 shrink-0" />
|
||||
@@ -66,6 +69,18 @@ function AiAnalysisPage() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* 今日定调摘要 */}
|
||||
{report.summary && (
|
||||
<div className="mb-3 sm:mb-4 rounded-lg border border-primary/30 bg-primary/5 px-3 sm:px-4 py-3">
|
||||
<div className="flex items-start gap-2.5">
|
||||
<span className="shrink-0 mt-0.5 rounded bg-primary/10 px-1.5 py-0.5 text-[11px] font-semibold text-primary">
|
||||
今日定调
|
||||
</span>
|
||||
<p className="text-sm leading-relaxed">{report.summary}</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Report Content */}
|
||||
<Card className="bg-card border-border">
|
||||
<CardContent className="p-3 sm:p-4 md:p-6 ai-report-content">
|
||||
|
||||
Reference in New Issue
Block a user