@@ -24,22 +24,49 @@ export default function SkillPanel({ global: isGlobal }: { global?: boolean }) {
2424 . finally ( ( ) => setLoading ( false ) ) ;
2525 } , [ rootPath , isGlobal ] ) ;
2626
27- if ( loading ) return < div className = "px-6 py-8 text-[14px] text-[var(--text-disabled)]" > 加载中…</ div > ;
28- if ( skills . length === 0 ) return < div className = "px-6 py-8 text-[14px] text-[var(--text-disabled)] text-center" > 未找到 Skill</ div > ;
27+ if ( loading )
28+ return < div className = "px-6 py-8 text-[14px] text-[var(--text-disabled)]" > 加载中…</ div > ;
29+ if ( skills . length === 0 )
30+ return (
31+ < div className = "px-6 py-8 text-[14px] text-[var(--text-disabled)] text-center" >
32+ 未找到 Skill
33+ </ div >
34+ ) ;
2935
3036 return (
3137 < div className = "px-6 py-5" >
3238 < div className = "space-y-3" >
3339 { skills . map ( ( skill ) => (
34- < div key = { skill . name } className = "px-4 py-3.5 rounded-xl bg-[var(--bg-card)] border border-[var(--border-card)]" >
40+ < div
41+ key = { skill . name }
42+ className = "px-4 py-3.5 rounded-xl bg-[var(--bg-card)] border border-[var(--border-card)]"
43+ >
3544 < div className = "flex items-center gap-2" >
3645 < span className = "text-[15px] text-[var(--text-title)] truncate" > { skill . name } </ span >
37- { skill . source === 'global' && < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--tag-info-bg)] text-[var(--tag-info-text)]" > 全局</ span > }
38- { skill . source === 'project' && < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--tag-action-bg)] text-[var(--tag-action-text)]" > 项目</ span > }
39- { skill . hasProjectOverride && < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--accent-primary)]/10 text-[var(--accent-primary)]" > 覆盖全局</ span > }
46+ { skill . source === 'global' && (
47+ < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--tag-info-bg)] text-[var(--tag-info-text)]" >
48+ 全局
49+ </ span >
50+ ) }
51+ { skill . source === 'project' && (
52+ < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--tag-action-bg)] text-[var(--tag-action-text)]" >
53+ 项目
54+ </ span >
55+ ) }
56+ { skill . hasProjectOverride && (
57+ < span className = "text-[11px] px-2 py-0.5 rounded bg-[var(--accent-primary)]/10 text-[var(--accent-primary)]" >
58+ 覆盖全局
59+ </ span >
60+ ) }
61+ </ div >
62+ { skill . description && (
63+ < div className = "text-[13px] text-[var(--text-placeholder)] mt-1" >
64+ { skill . description }
65+ </ div >
66+ ) }
67+ < div className = "text-[11px] text-[var(--text-disabled)] mt-1 truncate" >
68+ { skill . skillPath }
4069 </ div >
41- { skill . description && < div className = "text-[13px] text-[var(--text-placeholder)] mt-1" > { skill . description } </ div > }
42- < div className = "text-[11px] text-[var(--text-disabled)] mt-1 truncate" > { skill . skillPath } </ div >
4370 </ div >
4471 ) ) }
4572 </ div >
0 commit comments