4f4f063200
- drop brand_time_buckets and sparkline/coverage UI; dashboard now returns a single day - compute mention rate from total actual samples instead of averaging per-platform rates - canonicalize ai_platform_id across services and aggregate platform-overview snapshots - strip mojibake and non-answer noise from callback payloads and question detail answers - keep Kimi citations panel-only; still store raw search_results for audit - render linked [n] inline citations for qwen/yuanbao answers with scroll-to-source behavior - restrict立即采集 to today's business date with a clear i18n hint - refresh content-citations into an ant-design table with truncation and hover styling Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
721 B
Go
22 lines
721 B
Go
package app
|
|
|
|
import "testing"
|
|
|
|
func TestRepairMonitoringMojibake(t *testing.T) {
|
|
input := "用户询问åˆè‚¥å…¨å±‹å®šåˆ¶çš„æ€§ä»·æ¯”最高的å“牌"
|
|
got := repairMonitoringMojibake(input)
|
|
want := "用户询问合肥全屋定制的性价比最高的品牌"
|
|
|
|
if got != want {
|
|
t.Fatalf("repairMonitoringMojibake() = %q, want %q", got, want)
|
|
}
|
|
}
|
|
|
|
func TestRepairMonitoringMojibakeLeavesNormalChineseUntouched(t *testing.T) {
|
|
input := "用户询问合肥全屋定制的性价比最高的品牌"
|
|
got := repairMonitoringMojibake(input)
|
|
if got != input {
|
|
t.Fatalf("repairMonitoringMojibake() changed valid text: got %q, want %q", got, input)
|
|
}
|
|
}
|