refactor: 去重器改用 API 并修复 tag 唯一性约束处理

- deduplicator: 从直接数据库查询改为调用 /api/webhook/check-duplicates API
- database-ingestor: 使用 JSON 文件传参避免 curl 编码问题
- webhook: 修复 tag name 唯一性约束冲突,更新时删除旧关联重建
- 添加 check-duplicates API 端点用于批量去重检测
- 适配 ProjectTag 显式关联表的数据查询逻辑
- ProjectCard: 修复 getProjectIcon 空值处理

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-06 14:21:10 +08:00
co-authored by Claude
parent 7baf547bf3
commit 0b9573072f
7 changed files with 425 additions and 71 deletions
+4 -2
View File
@@ -30,8 +30,10 @@ interface ProjectCardProps {
}
// Icon mapping for projects based on tags
function getProjectIcon(tags: Array<{ name: string }>): string {
const tagNames = tags.map(t => t.name.toLowerCase())
function getProjectIcon(tags: Array<{ name: string | null }>): string {
const tagNames = tags
.map(t => t.name?.toLowerCase())
.filter((name): name is string => Boolean(name))
if (tagNames.some(t => t.includes('automation') || t.includes('workflow'))) return '⚙️'
if (tagNames.some(t => t.includes('image') || t.includes('art'))) return '🎨'
if (tagNames.some(t => t.includes('chat') || t.includes('assistant'))) return '💬'