erio
a68df457d8
fix: address audit findings across websearch, notify, and channel pricing
Backend fixes:
- Fix balance notify ignoring percentage threshold type (was treating
percentage value as fixed USD amount)
- Remove dead code parseJSONStringArray
- Add ImageOutputTokens to tryModelFilePricing calculation
- Unify zero-value check: cost == 0 → cost <= 0 in calculateTokenStatsCost
- Use MarshalNotifyEmails instead of json.Marshal for consistency
- Rename quotaDim.oldUsed → currentUsed for clarity
- Extract HTML email templates to const variables (function ≤30 lines)
Test fixes:
- Rewrite account_websearch_test.go for GetWebSearchEmulationMode tri-state
- Add 6 tryModelFilePricing test cases
Frontend fixes:
- Replace hardcoded '未命名' with i18n key
- Extract getBillingModeLabel/getBillingModeBadgeClass to shared utils
- Replace inline type with imported NotifyEmailEntry
- Pass platform to AccountStats pricing rules via inferRulePlatform()
- Add billing mode constants (BILLING_MODE_TOKEN/PER_REQUEST/IMAGE)
2026-04-14 09:26:08 +08:00
..
2025-12-18 13:50:39 +08:00
2026-04-14 09:26:08 +08:00
2026-01-12 11:44:34 +08:00
2026-01-05 13:54:43 +08:00
2026-01-05 10:06:31 +08:00
2026-01-06 11:36:38 +08:00
2025-12-26 00:10:44 -08:00
2026-04-11 16:46:46 +08:00
2026-04-11 16:46:46 +08:00
2025-12-26 00:10:44 -08:00
2026-01-16 19:49:33 +08:00
2026-02-02 22:13:50 +08:00
2025-12-18 13:50:39 +08:00
2026-03-05 10:45:51 +08:00
2026-02-28 15:01:20 +08:00