feat: 记录并展示每次生成消耗的LLM调用次数(llm_calls)

This commit is contained in:
Sakurasan
2026-09-02 14:10:49 +08:00
parent 734a449037
commit fefb1b4736
6 changed files with 17 additions and 7 deletions
+1
View File
@@ -15,6 +15,7 @@ export interface AiReport {
model: string;
tokens_used: number;
generation_count?: number;
llm_calls?: number | null;
issue_number?: number;
created_at: string;
updated_at?: string | null;
+1
View File
@@ -132,6 +132,7 @@ function AiAnalysisPage() {
<span className="truncate">{report.updated_at || report.created_at}</span>
</span>
<span>{report.tokens_used?.toLocaleString()} tokens</span>
{report.llm_calls ? <span>{report.llm_calls} 次 LLM 调用</span> : null}
{(report.generation_count ?? 1) > 1 && (
<span>第 {report.generation_count} 次生成</span>
)}