提示词优化
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 11s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s

This commit is contained in:
孙诚
2026-01-12 16:20:06 +08:00
parent 8c7dbd24ad
commit a8da1c6a70
2 changed files with 16 additions and 3 deletions

View File

@@ -419,7 +419,9 @@ public class BudgetService(
【格式要求】
1. 使用HTML格式移动端H5页面风格
2. 生成清晰的报告标题(基于用户问题)
3. 使用表格展示统计数据table > thead/tbody > tr > th/td
3. 使用表格展示统计数据table > thead/tbody > tr > th/td
3.1 table要求不能超过屏幕宽度尽可能简洁明了避免冗余信息
3.2 预算金额精确到整数即可实际金额精确到小数点后1位
4. 使用合适的HTML标签h2标题、h3小节、p段落、table表格、ul/li列表、strong强调
5. 支出金额用 <span class='expense-value'>金额</span> 包裹
6. 收入金额用 <span class='income-value'>金额</span> 包裹
@@ -574,7 +576,18 @@ public class BudgetService(
if (expenseItems.Count == 0) description.Append("<p>无支出预算</p>");
else
{
description.Append("<table><thead><tr><th>名称</th><th>金额</th><th>折算</th><th>合计</th></tr></thead><tbody>");
description.Append("""
<table>
<thead>
<tr>
<th style="width: 40%;"></th>
<th style="width: 20%;"></th>
<th style="width: 20%;"></th>
<th style="width: 20%;"></th>
</tr>
</thead>
<tbody>
""");
foreach (var item in expenseItems)
{
description.Append($"<tr><td>{item.Name}</td><td>{item.Limit:N0}</td><td>x{item.Factor:0.##}</td><td><span class='expense-value'>{item.Total:N0}</span></td></tr>");