Display AI-assigned expertise tags on project detail page
Build and Push Docker Image / build (push) Successful in 8m56s
Details
Build and Push Docker Image / build (push) Successful in 8m56s
Details
- Add projectTags relation to project.get query - Show expertise tags with confidence percentages - Tags displayed with their assigned colors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4d8823e8e9
commit
f59cfd393b
|
|
@ -305,6 +305,33 @@ function ProjectDetailContent({ projectId }: { projectId: string }) {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* AI-Assigned Expertise Tags */}
|
||||||
|
{project.projectTags && project.projectTags.length > 0 && (
|
||||||
|
<div>
|
||||||
|
<p className="text-sm font-medium text-muted-foreground mb-2">
|
||||||
|
Expertise Tags
|
||||||
|
</p>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{project.projectTags.map((pt) => (
|
||||||
|
<Badge
|
||||||
|
key={pt.tag.id}
|
||||||
|
variant="secondary"
|
||||||
|
className="flex items-center gap-1"
|
||||||
|
style={pt.tag.color ? { backgroundColor: `${pt.tag.color}20`, borderColor: pt.tag.color } : undefined}
|
||||||
|
>
|
||||||
|
{pt.tag.name}
|
||||||
|
{pt.confidence < 1 && (
|
||||||
|
<span className="text-xs opacity-60">
|
||||||
|
{Math.round(pt.confidence * 100)}%
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</Badge>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Simple Tags (legacy) */}
|
||||||
{project.tags && project.tags.length > 0 && (
|
{project.tags && project.tags.length > 0 && (
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm font-medium text-muted-foreground mb-2">
|
<p className="text-sm font-medium text-muted-foreground mb-2">
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,14 @@ export const projectRouter = router({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
projectTags: {
|
||||||
|
include: {
|
||||||
|
tag: {
|
||||||
|
select: { id: true, name: true, category: true, color: true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
orderBy: { confidence: 'desc' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue