feat(risk-control): record matched keyword in keyword-block logs
The risk control center's moderation log records had no field for the keyword that triggered a keyword block, so the admin UI couldn't show which keyword was hit (only the application slog logged it). - migration 156: add matched_keyword column to content_moderation_logs - ContentModerationLog gains MatchedKeyword; set it on keyword block - repo CreateLog/ListLogs persist and read the column - frontend: show "命中关键词" inline in the log table and detail modal - i18n: add matchedKeyword (zh/en) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -182,6 +182,7 @@ export interface ContentModerationLog {
|
||||
flagged: boolean
|
||||
highest_category: string
|
||||
highest_score: number
|
||||
matched_keyword: string
|
||||
category_scores: Record<string, number>
|
||||
threshold_snapshot: Record<string, number>
|
||||
input_excerpt: string
|
||||
|
||||
Reference in New Issue
Block a user