@industry-theme/agent-panels 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -7
- package/dist/panels/skills/components/SkillCard.d.ts.map +1 -1
- package/dist/panels/skills/hooks/useSkillsData.d.ts +12 -0
- package/dist/panels/skills/hooks/useSkillsData.d.ts.map +1 -1
- package/dist/panels.bundle.js +115 -55
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -416,13 +416,14 @@ const MyPanel: React.FC<PanelComponentProps> = ({ context }) => {
|
|
|
416
416
|
|
|
417
417
|
Panels can access these data slices from the host:
|
|
418
418
|
|
|
419
|
-
| Slice
|
|
420
|
-
|
|
|
421
|
-
| `git`
|
|
422
|
-
| `markdown`
|
|
423
|
-
| `fileTree`
|
|
424
|
-
| `packages`
|
|
425
|
-
| `quality`
|
|
419
|
+
| Slice | Type | Description |
|
|
420
|
+
| -------------- | ------------------ | ------------------------------------- |
|
|
421
|
+
| `git` | `GitStatus` | Git repository status |
|
|
422
|
+
| `markdown` | `MarkdownFile[]` | Markdown files in repository |
|
|
423
|
+
| `fileTree` | `FileTree` | File system tree structure |
|
|
424
|
+
| `packages` | `PackageLayer[]` | Package dependencies |
|
|
425
|
+
| `quality` | `QualityMetrics` | Code quality metrics |
|
|
426
|
+
| `globalSkills` | `GlobalSkillsSlice`| Global skills from user directories |
|
|
426
427
|
|
|
427
428
|
Check availability before use:
|
|
428
429
|
|
|
@@ -432,6 +433,73 @@ if (context.hasSlice('git') && !context.isSliceLoading('git')) {
|
|
|
432
433
|
}
|
|
433
434
|
```
|
|
434
435
|
|
|
436
|
+
### Global Skills Support
|
|
437
|
+
|
|
438
|
+
The Skills List panel supports both project and global skills:
|
|
439
|
+
|
|
440
|
+
**Project Skills** (discovered via `fileTree`):
|
|
441
|
+
- Any `SKILL.md` file in the project file tree
|
|
442
|
+
- Automatically detected and categorized by path:
|
|
443
|
+
- `.agent/skills/` → `project-universal`
|
|
444
|
+
- `.claude/skills/` → `project-claude`
|
|
445
|
+
- Other locations → `project-other`
|
|
446
|
+
|
|
447
|
+
**Global Skills** (provided via `globalSkills` slice):
|
|
448
|
+
- `~/.agent/skills/` → `global-universal`
|
|
449
|
+
- `~/.claude/skills/` → `global-claude`
|
|
450
|
+
|
|
451
|
+
#### Host Implementation
|
|
452
|
+
|
|
453
|
+
To provide global skills, the host application must:
|
|
454
|
+
|
|
455
|
+
1. Scan global skill directories
|
|
456
|
+
2. Read and parse SKILL.md files
|
|
457
|
+
3. Analyze folder structure (scripts/, references/, assets/)
|
|
458
|
+
4. Provide pre-formatted data through the `globalSkills` slice:
|
|
459
|
+
|
|
460
|
+
```typescript
|
|
461
|
+
interface GlobalSkillsSlice {
|
|
462
|
+
skills: Skill[];
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
interface Skill {
|
|
466
|
+
id: string; // e.g., "global:~/.agent/skills/skill-name"
|
|
467
|
+
name: string;
|
|
468
|
+
path: string; // Absolute path to SKILL.md
|
|
469
|
+
source: SkillSource; // 'global-universal' | 'global-claude'
|
|
470
|
+
priority: 1 | 2 | 3 | 4 | 5;
|
|
471
|
+
description?: string;
|
|
472
|
+
content: string; // Full SKILL.md content
|
|
473
|
+
capabilities?: string[];
|
|
474
|
+
skillFolderPath: string;
|
|
475
|
+
hasScripts: boolean;
|
|
476
|
+
hasReferences: boolean;
|
|
477
|
+
hasAssets: boolean;
|
|
478
|
+
scriptFiles?: string[];
|
|
479
|
+
referenceFiles?: string[];
|
|
480
|
+
assetFiles?: string[];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// Example usage:
|
|
484
|
+
context.setSlice('globalSkills', {
|
|
485
|
+
scope: 'global',
|
|
486
|
+
name: 'globalSkills',
|
|
487
|
+
data: { skills: mockGlobalSkills },
|
|
488
|
+
loading: false,
|
|
489
|
+
error: null,
|
|
490
|
+
refresh: async () => {},
|
|
491
|
+
});
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
#### UI Features
|
|
495
|
+
|
|
496
|
+
The Skills List panel includes:
|
|
497
|
+
- **Filter Toggle**: Switch between All/Project/Global skills
|
|
498
|
+
- **Source Badges**: Visual indicators showing skill origin
|
|
499
|
+
- 🌐 Global (purple/cyan)
|
|
500
|
+
- 📁 Project (green/blue/slate)
|
|
501
|
+
- **Merged View**: Seamlessly displays both local and global skills
|
|
502
|
+
|
|
435
503
|
## Event Types
|
|
436
504
|
|
|
437
505
|
Standard panel events:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/components/SkillCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAkDD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"SkillCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/components/SkillCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAkDD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+Q9C,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { PanelContextValue } from '../../../types';
|
|
2
2
|
export type SkillSource = 'project-universal' | 'global-universal' | 'project-claude' | 'global-claude' | 'project-other';
|
|
3
|
+
export interface SkillMetadata {
|
|
4
|
+
installedFrom?: string;
|
|
5
|
+
skillPath?: string;
|
|
6
|
+
owner?: string;
|
|
7
|
+
repo?: string;
|
|
8
|
+
branch?: string;
|
|
9
|
+
installedAt?: string;
|
|
10
|
+
destination?: string;
|
|
11
|
+
sha?: string;
|
|
12
|
+
files?: string[];
|
|
13
|
+
}
|
|
3
14
|
export interface Skill {
|
|
4
15
|
id: string;
|
|
5
16
|
name: string;
|
|
@@ -16,6 +27,7 @@ export interface Skill {
|
|
|
16
27
|
assetFiles?: string[];
|
|
17
28
|
source: SkillSource;
|
|
18
29
|
priority: 1 | 2 | 3 | 4 | 5;
|
|
30
|
+
metadata?: SkillMetadata;
|
|
19
31
|
}
|
|
20
32
|
/**
|
|
21
33
|
* Global skills data provided by the host application
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSkillsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/hooks/useSkillsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useSkillsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/hooks/useSkillsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE5B,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAsID;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAE3B,mBAAmB,KAAG,mBAiHxB,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -2201,7 +2201,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
2201
2201
|
* This source code is licensed under the ISC license.
|
|
2202
2202
|
* See the LICENSE file in the root directory of this source tree.
|
|
2203
2203
|
*/
|
|
2204
|
-
const __iconNode$
|
|
2204
|
+
const __iconNode$j = [
|
|
2205
2205
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
2206
2206
|
[
|
|
2207
2207
|
"path",
|
|
@@ -2211,72 +2211,72 @@ const __iconNode$i = [
|
|
|
2211
2211
|
}
|
|
2212
2212
|
]
|
|
2213
2213
|
];
|
|
2214
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
2214
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$j);
|
|
2215
2215
|
/**
|
|
2216
2216
|
* @license lucide-react v0.552.0 - ISC
|
|
2217
2217
|
*
|
|
2218
2218
|
* This source code is licensed under the ISC license.
|
|
2219
2219
|
* See the LICENSE file in the root directory of this source tree.
|
|
2220
2220
|
*/
|
|
2221
|
-
const __iconNode$
|
|
2222
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
2221
|
+
const __iconNode$i = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
2222
|
+
const Check = createLucideIcon("check", __iconNode$i);
|
|
2223
2223
|
/**
|
|
2224
2224
|
* @license lucide-react v0.552.0 - ISC
|
|
2225
2225
|
*
|
|
2226
2226
|
* This source code is licensed under the ISC license.
|
|
2227
2227
|
* See the LICENSE file in the root directory of this source tree.
|
|
2228
2228
|
*/
|
|
2229
|
-
const __iconNode$
|
|
2230
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
2229
|
+
const __iconNode$h = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
2230
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$h);
|
|
2231
2231
|
/**
|
|
2232
2232
|
* @license lucide-react v0.552.0 - ISC
|
|
2233
2233
|
*
|
|
2234
2234
|
* This source code is licensed under the ISC license.
|
|
2235
2235
|
* See the LICENSE file in the root directory of this source tree.
|
|
2236
2236
|
*/
|
|
2237
|
-
const __iconNode$
|
|
2238
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
2237
|
+
const __iconNode$g = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
2238
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$g);
|
|
2239
2239
|
/**
|
|
2240
2240
|
* @license lucide-react v0.552.0 - ISC
|
|
2241
2241
|
*
|
|
2242
2242
|
* This source code is licensed under the ISC license.
|
|
2243
2243
|
* See the LICENSE file in the root directory of this source tree.
|
|
2244
2244
|
*/
|
|
2245
|
-
const __iconNode$
|
|
2245
|
+
const __iconNode$f = [
|
|
2246
2246
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2247
2247
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2248
2248
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2249
2249
|
];
|
|
2250
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
2250
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$f);
|
|
2251
2251
|
/**
|
|
2252
2252
|
* @license lucide-react v0.552.0 - ISC
|
|
2253
2253
|
*
|
|
2254
2254
|
* This source code is licensed under the ISC license.
|
|
2255
2255
|
* See the LICENSE file in the root directory of this source tree.
|
|
2256
2256
|
*/
|
|
2257
|
-
const __iconNode$
|
|
2257
|
+
const __iconNode$e = [
|
|
2258
2258
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
2259
2259
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
2260
2260
|
];
|
|
2261
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
2261
|
+
const Code = createLucideIcon("code", __iconNode$e);
|
|
2262
2262
|
/**
|
|
2263
2263
|
* @license lucide-react v0.552.0 - ISC
|
|
2264
2264
|
*
|
|
2265
2265
|
* This source code is licensed under the ISC license.
|
|
2266
2266
|
* See the LICENSE file in the root directory of this source tree.
|
|
2267
2267
|
*/
|
|
2268
|
-
const __iconNode$
|
|
2268
|
+
const __iconNode$d = [
|
|
2269
2269
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
2270
2270
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
2271
2271
|
];
|
|
2272
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
2272
|
+
const Copy = createLucideIcon("copy", __iconNode$d);
|
|
2273
2273
|
/**
|
|
2274
2274
|
* @license lucide-react v0.552.0 - ISC
|
|
2275
2275
|
*
|
|
2276
2276
|
* This source code is licensed under the ISC license.
|
|
2277
2277
|
* See the LICENSE file in the root directory of this source tree.
|
|
2278
2278
|
*/
|
|
2279
|
-
const __iconNode$
|
|
2279
|
+
const __iconNode$c = [
|
|
2280
2280
|
["path", { d: "m15 15 6 6", key: "1s409w" }],
|
|
2281
2281
|
["path", { d: "m15 9 6-6", key: "ko1vev" }],
|
|
2282
2282
|
["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
|
|
@@ -2286,14 +2286,14 @@ const __iconNode$b = [
|
|
|
2286
2286
|
["path", { d: "M3 8V3h5", key: "1ln10m" }],
|
|
2287
2287
|
["path", { d: "M9 9 3 3", key: "v551iv" }]
|
|
2288
2288
|
];
|
|
2289
|
-
const Expand = createLucideIcon("expand", __iconNode$
|
|
2289
|
+
const Expand = createLucideIcon("expand", __iconNode$c);
|
|
2290
2290
|
/**
|
|
2291
2291
|
* @license lucide-react v0.552.0 - ISC
|
|
2292
2292
|
*
|
|
2293
2293
|
* This source code is licensed under the ISC license.
|
|
2294
2294
|
* See the LICENSE file in the root directory of this source tree.
|
|
2295
2295
|
*/
|
|
2296
|
-
const __iconNode$
|
|
2296
|
+
const __iconNode$b = [
|
|
2297
2297
|
[
|
|
2298
2298
|
"path",
|
|
2299
2299
|
{
|
|
@@ -2305,14 +2305,14 @@ const __iconNode$a = [
|
|
|
2305
2305
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
2306
2306
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
2307
2307
|
];
|
|
2308
|
-
const FileCode = createLucideIcon("file-code", __iconNode$
|
|
2308
|
+
const FileCode = createLucideIcon("file-code", __iconNode$b);
|
|
2309
2309
|
/**
|
|
2310
2310
|
* @license lucide-react v0.552.0 - ISC
|
|
2311
2311
|
*
|
|
2312
2312
|
* This source code is licensed under the ISC license.
|
|
2313
2313
|
* See the LICENSE file in the root directory of this source tree.
|
|
2314
2314
|
*/
|
|
2315
|
-
const __iconNode$
|
|
2315
|
+
const __iconNode$a = [
|
|
2316
2316
|
[
|
|
2317
2317
|
"path",
|
|
2318
2318
|
{
|
|
@@ -2325,14 +2325,14 @@ const __iconNode$9 = [
|
|
|
2325
2325
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
2326
2326
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
2327
2327
|
];
|
|
2328
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
2328
|
+
const FileText = createLucideIcon("file-text", __iconNode$a);
|
|
2329
2329
|
/**
|
|
2330
2330
|
* @license lucide-react v0.552.0 - ISC
|
|
2331
2331
|
*
|
|
2332
2332
|
* This source code is licensed under the ISC license.
|
|
2333
2333
|
* See the LICENSE file in the root directory of this source tree.
|
|
2334
2334
|
*/
|
|
2335
|
-
const __iconNode$
|
|
2335
|
+
const __iconNode$9 = [
|
|
2336
2336
|
[
|
|
2337
2337
|
"path",
|
|
2338
2338
|
{
|
|
@@ -2341,7 +2341,24 @@ const __iconNode$8 = [
|
|
|
2341
2341
|
}
|
|
2342
2342
|
]
|
|
2343
2343
|
];
|
|
2344
|
-
const Folder = createLucideIcon("folder", __iconNode$
|
|
2344
|
+
const Folder = createLucideIcon("folder", __iconNode$9);
|
|
2345
|
+
/**
|
|
2346
|
+
* @license lucide-react v0.552.0 - ISC
|
|
2347
|
+
*
|
|
2348
|
+
* This source code is licensed under the ISC license.
|
|
2349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
2350
|
+
*/
|
|
2351
|
+
const __iconNode$8 = [
|
|
2352
|
+
[
|
|
2353
|
+
"path",
|
|
2354
|
+
{
|
|
2355
|
+
d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",
|
|
2356
|
+
key: "tonef"
|
|
2357
|
+
}
|
|
2358
|
+
],
|
|
2359
|
+
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
2360
|
+
];
|
|
2361
|
+
const Github = createLucideIcon("github", __iconNode$8);
|
|
2345
2362
|
/**
|
|
2346
2363
|
* @license lucide-react v0.552.0 - ISC
|
|
2347
2364
|
*
|
|
@@ -2478,7 +2495,7 @@ const analyzeSkillStructure = (fileTree, skillPath) => {
|
|
|
2478
2495
|
assetFiles
|
|
2479
2496
|
};
|
|
2480
2497
|
};
|
|
2481
|
-
const parseSkillContent = (content2, path2, fileTree) => {
|
|
2498
|
+
const parseSkillContent = async (content2, path2, fileTree, fileSystemAdapter) => {
|
|
2482
2499
|
const pathParts = path2.split("/");
|
|
2483
2500
|
const skillDirName = pathParts[pathParts.length - 2] || "Unknown Skill";
|
|
2484
2501
|
let description = "";
|
|
@@ -2503,6 +2520,17 @@ const parseSkillContent = (content2, path2, fileTree) => {
|
|
|
2503
2520
|
}
|
|
2504
2521
|
const structure = analyzeSkillStructure(fileTree, path2);
|
|
2505
2522
|
const { source: source2, priority } = determineSkillSource(path2);
|
|
2523
|
+
let metadata;
|
|
2524
|
+
if (fileSystemAdapter && structure.skillFolderPath) {
|
|
2525
|
+
try {
|
|
2526
|
+
const metadataPath = `${structure.skillFolderPath}/.metadata.json`;
|
|
2527
|
+
const metadataContent = await fileSystemAdapter.readFile(metadataPath);
|
|
2528
|
+
metadata = JSON.parse(metadataContent);
|
|
2529
|
+
console.log("[useSkillsData] Loaded metadata for skill:", skillDirName, metadata);
|
|
2530
|
+
} catch (error) {
|
|
2531
|
+
console.debug("[useSkillsData] No metadata file for skill:", skillDirName);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2506
2534
|
return {
|
|
2507
2535
|
id: path2,
|
|
2508
2536
|
name: skillDirName.replace(/-/g, " ").replace(/_/g, " "),
|
|
@@ -2513,7 +2541,8 @@ const parseSkillContent = (content2, path2, fileTree) => {
|
|
|
2513
2541
|
// Limit to first 3 capabilities
|
|
2514
2542
|
...structure,
|
|
2515
2543
|
source: source2,
|
|
2516
|
-
priority
|
|
2544
|
+
priority,
|
|
2545
|
+
metadata
|
|
2517
2546
|
};
|
|
2518
2547
|
};
|
|
2519
2548
|
const useSkillsData = ({
|
|
@@ -2557,7 +2586,7 @@ const useSkillsData = ({
|
|
|
2557
2586
|
try {
|
|
2558
2587
|
const fullPath = `${repoPath}/${skillPath}`;
|
|
2559
2588
|
const content2 = await fileSystem.readFile(fullPath);
|
|
2560
|
-
return parseSkillContent(content2, skillPath, fileTree);
|
|
2589
|
+
return parseSkillContent(content2, skillPath, fileTree, fileSystem);
|
|
2561
2590
|
} catch (err) {
|
|
2562
2591
|
console.error(`Failed to read skill at ${skillPath}:`, err);
|
|
2563
2592
|
return null;
|
|
@@ -2648,7 +2677,7 @@ const SkillCard = ({
|
|
|
2648
2677
|
onClick,
|
|
2649
2678
|
isSelected = false
|
|
2650
2679
|
}) => {
|
|
2651
|
-
var _a, _b, _c, _d, _e2, _f;
|
|
2680
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h;
|
|
2652
2681
|
const { theme: theme2 } = useTheme();
|
|
2653
2682
|
const sourceConfig = getSourceConfig(skill.source);
|
|
2654
2683
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2717,29 +2746,60 @@ const SkillCard = ({
|
|
|
2717
2746
|
children: skill.name
|
|
2718
2747
|
}
|
|
2719
2748
|
),
|
|
2720
|
-
/* @__PURE__ */ jsxs(
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2749
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "4px", alignItems: "center", flexWrap: "wrap" }, children: [
|
|
2750
|
+
/* @__PURE__ */ jsxs(
|
|
2751
|
+
"div",
|
|
2752
|
+
{
|
|
2753
|
+
style: {
|
|
2754
|
+
display: "inline-flex",
|
|
2755
|
+
alignItems: "center",
|
|
2756
|
+
gap: "4px",
|
|
2757
|
+
padding: "2px 6px",
|
|
2758
|
+
borderRadius: theme2.radii[1],
|
|
2759
|
+
backgroundColor: sourceConfig.bgColor,
|
|
2760
|
+
border: `1px solid ${sourceConfig.borderColor}`,
|
|
2761
|
+
fontSize: theme2.fontSizes[0],
|
|
2762
|
+
color: sourceConfig.color,
|
|
2763
|
+
fontWeight: 500,
|
|
2764
|
+
width: "fit-content"
|
|
2765
|
+
},
|
|
2766
|
+
title: `Source: ${skill.source}`,
|
|
2767
|
+
children: [
|
|
2768
|
+
/* @__PURE__ */ jsx(sourceConfig.icon, { size: 10 }),
|
|
2769
|
+
/* @__PURE__ */ jsx("span", { children: sourceConfig.label })
|
|
2770
|
+
]
|
|
2771
|
+
}
|
|
2772
|
+
),
|
|
2773
|
+
((_a = skill.metadata) == null ? void 0 : _a.owner) && ((_b = skill.metadata) == null ? void 0 : _b.repo) && /* @__PURE__ */ jsxs(
|
|
2774
|
+
"div",
|
|
2775
|
+
{
|
|
2776
|
+
style: {
|
|
2777
|
+
display: "inline-flex",
|
|
2778
|
+
alignItems: "center",
|
|
2779
|
+
gap: "4px",
|
|
2780
|
+
padding: "2px 6px",
|
|
2781
|
+
borderRadius: theme2.radii[1],
|
|
2782
|
+
backgroundColor: "#23272d15",
|
|
2783
|
+
border: "1px solid #23272d30",
|
|
2784
|
+
fontSize: theme2.fontSizes[0],
|
|
2785
|
+
color: "#23272d",
|
|
2786
|
+
fontWeight: 500,
|
|
2787
|
+
fontFamily: theme2.fonts.monospace,
|
|
2788
|
+
width: "fit-content"
|
|
2789
|
+
},
|
|
2790
|
+
title: `From: ${skill.metadata.installedFrom}
|
|
2791
|
+
Installed: ${skill.metadata.installedAt ? new Date(skill.metadata.installedAt).toLocaleString() : "Unknown"}`,
|
|
2792
|
+
children: [
|
|
2793
|
+
/* @__PURE__ */ jsx(Github, { size: 10 }),
|
|
2794
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
2795
|
+
skill.metadata.owner,
|
|
2796
|
+
"/",
|
|
2797
|
+
skill.metadata.repo
|
|
2798
|
+
] })
|
|
2799
|
+
]
|
|
2800
|
+
}
|
|
2801
|
+
)
|
|
2802
|
+
] })
|
|
2743
2803
|
] })
|
|
2744
2804
|
] }),
|
|
2745
2805
|
onClick && /* @__PURE__ */ jsx(
|
|
@@ -2825,10 +2885,10 @@ const SkillCard = ({
|
|
|
2825
2885
|
color: theme2.colors.primary,
|
|
2826
2886
|
fontWeight: 500
|
|
2827
2887
|
},
|
|
2828
|
-
title: `Scripts: ${(
|
|
2888
|
+
title: `Scripts: ${(_c = skill.scriptFiles) == null ? void 0 : _c.join(", ")}`,
|
|
2829
2889
|
children: [
|
|
2830
2890
|
/* @__PURE__ */ jsx(Code, { size: 12 }),
|
|
2831
|
-
/* @__PURE__ */ jsx("span", { children: ((
|
|
2891
|
+
/* @__PURE__ */ jsx("span", { children: ((_d = skill.scriptFiles) == null ? void 0 : _d.length) || 0 })
|
|
2832
2892
|
]
|
|
2833
2893
|
}
|
|
2834
2894
|
),
|
|
@@ -2847,10 +2907,10 @@ const SkillCard = ({
|
|
|
2847
2907
|
color: theme2.colors.secondary,
|
|
2848
2908
|
fontWeight: 500
|
|
2849
2909
|
},
|
|
2850
|
-
title: `References: ${(
|
|
2910
|
+
title: `References: ${(_e2 = skill.referenceFiles) == null ? void 0 : _e2.join(", ")}`,
|
|
2851
2911
|
children: [
|
|
2852
2912
|
/* @__PURE__ */ jsx(BookOpen, { size: 12 }),
|
|
2853
|
-
/* @__PURE__ */ jsx("span", { children: ((
|
|
2913
|
+
/* @__PURE__ */ jsx("span", { children: ((_f = skill.referenceFiles) == null ? void 0 : _f.length) || 0 })
|
|
2854
2914
|
]
|
|
2855
2915
|
}
|
|
2856
2916
|
),
|
|
@@ -2869,10 +2929,10 @@ const SkillCard = ({
|
|
|
2869
2929
|
color: theme2.colors.accent,
|
|
2870
2930
|
fontWeight: 500
|
|
2871
2931
|
},
|
|
2872
|
-
title: `Assets: ${(
|
|
2932
|
+
title: `Assets: ${(_g = skill.assetFiles) == null ? void 0 : _g.join(", ")}`,
|
|
2873
2933
|
children: [
|
|
2874
2934
|
/* @__PURE__ */ jsx(Package, { size: 12 }),
|
|
2875
|
-
/* @__PURE__ */ jsx("span", { children: ((
|
|
2935
|
+
/* @__PURE__ */ jsx("span", { children: ((_h = skill.assetFiles) == null ? void 0 : _h.length) || 0 })
|
|
2876
2936
|
]
|
|
2877
2937
|
}
|
|
2878
2938
|
)
|