# 2026-08-09 Session Pitfalls

## 两个文件同步陷阱

### index.html vs app.html
- `工具/index.html` → CloudBase `/workbench/index.html`
- `工具/app.html` → 飞书 WebView（landing.html → app.html?line=da/ls）
- **改看板必须两个都改**：getKPI() + renderDashboard() 两处
- 差异：index.html有筛选器(filteredSalesSet)、app.html有统计卡片(stats-grid)

### CloudBase HTML 不自动部署
- `cb_sync_data.sh` 只同步 JSON 数据文件
- HTML 必须手动：`tcb hosting deploy 工具/index.html /workbench/index.html -e bier-sales-d0gatbvlx288724e9`

## Vision 工具集配置

```bash
hermes tools enable vision
hermes config set auxiliary.vision.provider kimi
hermes config set auxiliary.vision.model kimi-k3
# 从终端手动重启gateway
hermes gateway restart
```

- DeepSeek API 不支持 vision（image_url 格式）
- Kimi API 端点已从 `api.kimi.com` 迁移到 `api.moonshot.cn`
- 修复：`hermes config set providers.kimi.base_url https://api.moonshot.cn/v1`

## ytd 数据源修正

- `dash.total_h1` = 仅 H1（2164万），不包含 7-8 月实际
- `dash.total_h1_h2` = H1+H2 累计（2631万）
- getKPI() 必须用 `dash.total_h1_h2 || dash.total_h1`
