@@ -59,6 +59,15 @@ const SOURCE_LABELS: Record<string, string> = {
5959 'workspace' : '~/.openclaw/workspace/skills' ,
6060}
6161
62+ function getSourceLabel ( source : string ) : string {
63+ if ( SOURCE_LABELS [ source ] ) return SOURCE_LABELS [ source ]
64+ if ( source . startsWith ( 'workspace-' ) ) {
65+ const agentName = source . replace ( 'workspace-' , '' )
66+ return `${ agentName } workspace`
67+ }
68+ return source
69+ }
70+
6271export function SkillsPanel ( ) {
6372 const t = useTranslations ( 'skills' )
6473 const { dashboardMode, skillsList, skillGroups, skillsTotal, setSkillsData } = useMissionControl ( )
@@ -552,17 +561,19 @@ export function SkillsPanel() {
552561 { t ( 'showAllRoots' ) }
553562 </ button >
554563 ) }
555- { ( skillGroups || [ ] ) . filter ( g => g . skills . length > 0 || [ 'user-agents' , 'user-codex' , 'openclaw' , 'workspace' ] . includes ( g . source ) ) . map ( ( group ) => (
564+ { ( skillGroups || [ ] ) . filter ( g => g . skills . length > 0 || [ 'user-agents' , 'user-codex' , 'openclaw' , 'workspace' ] . includes ( g . source ) || g . source . startsWith ( 'workspace-' ) ) . map ( ( group ) => (
556565 < button
557566 key = { group . source }
558567 onClick = { ( ) => setActiveRoot ( activeRoot === group . source ? null : group . source ) }
559568 className = { `rounded-lg border bg-card p-3 text-left transition-colors ${
560569 activeRoot === group . source
561570 ? 'border-primary ring-1 ring-primary/30'
562- : group . source === 'openclaw' ? 'border-cyan-500/30 hover:border-cyan-500/50' : 'border-border hover:border-border/80'
571+ : group . source === 'openclaw' ? 'border-cyan-500/30 hover:border-cyan-500/50'
572+ : group . source . startsWith ( 'workspace-' ) ? 'border-violet-500/30 hover:border-violet-500/50'
573+ : 'border-border hover:border-border/80'
563574 } `}
564575 >
565- < div className = "text-xs font-medium text-muted-foreground" > { SOURCE_LABELS [ group . source ] || group . source } </ div >
576+ < div className = "text-xs font-medium text-muted-foreground" > { getSourceLabel ( group . source ) } </ div >
566577 < div className = "mt-1 text-lg font-semibold text-foreground" > { group . skills . length } </ div >
567578 < div className = "mt-1 text-2xs text-muted-foreground truncate" > { group . path } </ div >
568579 </ button >
@@ -593,11 +604,13 @@ export function SkillsPanel() {
593604 < span className = { `text-2xs rounded-full border px-2 py-0.5 ${
594605 skill . source === 'openclaw'
595606 ? 'bg-cyan-500/10 text-cyan-400 border-cyan-500/30'
596- : skill . source . startsWith ( 'project-' )
597- ? 'bg-amber-500/10 text-amber-400 border-amber-500/30'
598- : 'border-border text-muted-foreground'
607+ : skill . source . startsWith ( 'workspace-' )
608+ ? 'bg-violet-500/10 text-violet-400 border-violet-500/30'
609+ : skill . source . startsWith ( 'project-' )
610+ ? 'bg-amber-500/10 text-amber-400 border-amber-500/30'
611+ : 'border-border text-muted-foreground'
599612 } `} >
600- { SOURCE_LABELS [ skill . source ] || skill . source }
613+ { getSourceLabel ( skill . source ) }
601614 </ span >
602615 < Button variant = "outline" size = "xs" onClick = { ( ) => checkSecurity ( skill ) } >
603616 { t ( 'scan' ) }
0 commit comments