feat(skills): auto-tag+classify existing 60 skills, auto-tag on import, 409 uniqueness check, add tags column to admin

This commit is contained in:
QihuAI Design committed 2026-07-22 07:58:40 +08:00
1 parent c32eed39bd
commit 6d06f9165c
2 files changed
+199 -8

No files matched your search

+13 -2
View File
@@ -398,6 +398,7 @@ const Skills: React.FC = () => {
<th>技能名称</th>
<th>状态</th>
<th>分类</th>
<th>标签</th>
<th>所有者</th>
<th>版本</th>
<th>使用次数</th>
@@ -408,9 +409,9 @@ const Skills: React.FC = () => {
</thead>
<tbody>
{loading ? (
<tr><td colSpan={9} style={{ textAlign: 'center', padding: 40, color: '#6B7280' }}>加载中...</td></tr>
<tr><td colSpan={10} style={{ textAlign: 'center', padding: 40, color: '#6B7280' }}>加载中...</td></tr>
) : skills.length === 0 ? (
<tr><td colSpan={9} style={{ textAlign: 'center', padding: 40, color: '#6B7280' }}>暂无技能</td></tr>
<tr><td colSpan={10} style={{ textAlign: 'center', padding: 40, color: '#6B7280' }}>暂无技能</td></tr>
) : skills.map(skill => {
const cfg = STATE_CONFIG[skill.state as SkillState] || STATE_CONFIG.baby;
const published = isPublished(skill);
@@ -441,6 +442,16 @@ const Skills: React.FC = () => {
</span>
</td>
<td>{skill.category_label || '-'}</td>
<td>
{skill.tags && skill.tags.length > 0 ? (
<div style={{ display: 'flex', gap: 4, flexWrap: 'wrap' }}>
{skill.tags.slice(0, 3).map(tag => (
<span key={tag} style={{ fontSize: 11, padding: '1px 6px', background: '#EEF2FF', color: '#6366F1', borderRadius: 4 }}>{tag}</span>
))}
{skill.tags.length > 3 && <span style={{ fontSize: 11, color: '#6B7280' }}>+{skill.tags.length - 3}</span>}
</div>
) : <span style={{ color: '#9CA3AF', fontSize: 12 }}>-</span>}
</td>
<td>{skill.owner_username || skill.user_id}</td>
<td>v{skill.version}</td>
<td>{skill.use_count}</td>