@industry-theme/agent-panels 0.1.2 → 0.1.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SkillsLifecycle.stories.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsLifecycle.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAY5D;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;CAYM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAkQnC,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAiFF,eAAO,MAAM,sBAAsB,EAAE,KAUpC,CAAC"}
1
+ {"version":3,"file":"SkillsLifecycle.stories.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsLifecycle.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAY5D;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;CAYM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0WnC,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC;AAiFF,eAAO,MAAM,sBAAsB,EAAE,KAUpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2TzD,CAAC"}
1
+ {"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqZzD,CAAC"}
@@ -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;AAEpD,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;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8N9C,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,CAqP9C,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { PanelContextValue } from '../../../types';
2
+ export type SkillSource = 'project-universal' | 'global-universal' | 'project-claude' | 'global-claude' | 'project-other';
2
3
  export interface Skill {
3
4
  id: string;
4
5
  name: string;
@@ -13,6 +14,14 @@ export interface Skill {
13
14
  scriptFiles?: string[];
14
15
  referenceFiles?: string[];
15
16
  assetFiles?: string[];
17
+ source: SkillSource;
18
+ priority: 1 | 2 | 3 | 4 | 5;
19
+ }
20
+ /**
21
+ * Global skills data provided by the host application
22
+ */
23
+ export interface GlobalSkillsSlice {
24
+ skills: Skill[];
16
25
  }
17
26
  interface UseSkillsDataParams {
18
27
  context: PanelContextValue;
@@ -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,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;CACvB;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;AAgGD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAE3B,mBAAmB,KAAG,mBAsGxB,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,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;CAC7B;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;AAkHD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAE3B,mBAAmB,KAAG,mBAiHxB,CAAC"}
@@ -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$g = [
2204
+ const __iconNode$i = [
2205
2205
  ["path", { d: "M12 7v14", key: "1akyts" }],
2206
2206
  [
2207
2207
  "path",
@@ -2211,72 +2211,72 @@ const __iconNode$g = [
2211
2211
  }
2212
2212
  ]
2213
2213
  ];
2214
- const BookOpen = createLucideIcon("book-open", __iconNode$g);
2214
+ const BookOpen = createLucideIcon("book-open", __iconNode$i);
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$f = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
2222
- const Check = createLucideIcon("check", __iconNode$f);
2221
+ const __iconNode$h = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
2222
+ const Check = createLucideIcon("check", __iconNode$h);
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$e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
2230
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$e);
2229
+ const __iconNode$g = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
2230
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$g);
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$d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
2238
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
2237
+ const __iconNode$f = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
2238
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$f);
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$c = [
2245
+ const __iconNode$e = [
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$c);
2250
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$e);
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$b = [
2257
+ const __iconNode$d = [
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$b);
2261
+ const Code = createLucideIcon("code", __iconNode$d);
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$a = [
2268
+ const __iconNode$c = [
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$a);
2272
+ const Copy = createLucideIcon("copy", __iconNode$c);
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$9 = [
2279
+ const __iconNode$b = [
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$9 = [
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$9);
2289
+ const Expand = createLucideIcon("expand", __iconNode$b);
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$8 = [
2296
+ const __iconNode$a = [
2297
2297
  [
2298
2298
  "path",
2299
2299
  {
@@ -2305,14 +2305,14 @@ const __iconNode$8 = [
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$8);
2308
+ const FileCode = createLucideIcon("file-code", __iconNode$a);
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$7 = [
2315
+ const __iconNode$9 = [
2316
2316
  [
2317
2317
  "path",
2318
2318
  {
@@ -2325,7 +2325,35 @@ const __iconNode$7 = [
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$7);
2328
+ const FileText = createLucideIcon("file-text", __iconNode$9);
2329
+ /**
2330
+ * @license lucide-react v0.552.0 - ISC
2331
+ *
2332
+ * This source code is licensed under the ISC license.
2333
+ * See the LICENSE file in the root directory of this source tree.
2334
+ */
2335
+ const __iconNode$8 = [
2336
+ [
2337
+ "path",
2338
+ {
2339
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
2340
+ key: "1kt360"
2341
+ }
2342
+ ]
2343
+ ];
2344
+ const Folder = createLucideIcon("folder", __iconNode$8);
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$7 = [
2352
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
2353
+ ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
2354
+ ["path", { d: "M2 12h20", key: "9i4pu4" }]
2355
+ ];
2356
+ const Globe = createLucideIcon("globe", __iconNode$7);
2329
2357
  /**
2330
2358
  * @license lucide-react v0.552.0 - ISC
2331
2359
  *
@@ -2419,6 +2447,15 @@ const __iconNode = [
2419
2447
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
2420
2448
  ];
2421
2449
  const X = createLucideIcon("x", __iconNode);
2450
+ const determineSkillSource = (path2) => {
2451
+ if (path2.includes(".agent/skills/")) {
2452
+ return { source: "project-universal", priority: 1 };
2453
+ } else if (path2.includes(".claude/skills/")) {
2454
+ return { source: "project-claude", priority: 3 };
2455
+ } else {
2456
+ return { source: "project-other", priority: 5 };
2457
+ }
2458
+ };
2422
2459
  const findSkillFiles = (fileTree) => {
2423
2460
  const skillFiles = fileTree.allFiles.filter((file) => file.name === "SKILL.md");
2424
2461
  return skillFiles.map((file) => file.relativePath);
@@ -2465,6 +2502,7 @@ const parseSkillContent = (content2, path2, fileTree) => {
2465
2502
  }
2466
2503
  }
2467
2504
  const structure = analyzeSkillStructure(fileTree, path2);
2505
+ const { source: source2, priority } = determineSkillSource(path2);
2468
2506
  return {
2469
2507
  id: path2,
2470
2508
  name: skillDirName.replace(/-/g, " ").replace(/_/g, " "),
@@ -2473,7 +2511,9 @@ const parseSkillContent = (content2, path2, fileTree) => {
2473
2511
  content: content2,
2474
2512
  capabilities: capabilities.slice(0, 3),
2475
2513
  // Limit to first 3 capabilities
2476
- ...structure
2514
+ ...structure,
2515
+ source: source2,
2516
+ priority
2477
2517
  };
2478
2518
  };
2479
2519
  const useSkillsData = ({
@@ -2483,53 +2523,56 @@ const useSkillsData = ({
2483
2523
  const [isLoading, setIsLoading] = useState(true);
2484
2524
  const [error, setError] = useState(null);
2485
2525
  const loadSkills = useCallback(async () => {
2486
- var _a, _b;
2526
+ var _a, _b, _c;
2487
2527
  setIsLoading(true);
2488
2528
  setError(null);
2489
2529
  try {
2490
2530
  const fileTreeSlice = context.getSlice("fileTree");
2491
2531
  const fileTree = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
2492
- if (!fileTree) {
2493
- setSkills([]);
2494
- setIsLoading(false);
2495
- return;
2532
+ let localSkills = [];
2533
+ if (fileTree) {
2534
+ console.log("[useSkillsData] Full context:", context);
2535
+ const fileSystem = (_a = context.adapters) == null ? void 0 : _a.fileSystem;
2536
+ console.log("[useSkillsData] Adapters:", context.adapters);
2537
+ console.log("[useSkillsData] FileSystem adapter:", fileSystem);
2538
+ console.log("[useSkillsData] fileSystem?.readFile:", fileSystem == null ? void 0 : fileSystem.readFile);
2539
+ console.log("[useSkillsData] typeof fileSystem?.readFile:", typeof (fileSystem == null ? void 0 : fileSystem.readFile));
2540
+ console.log("[useSkillsData] Check result (!fileSystem?.readFile):", !(fileSystem == null ? void 0 : fileSystem.readFile));
2541
+ if (!(fileSystem == null ? void 0 : fileSystem.readFile)) {
2542
+ console.error("[useSkillsData] FAILING CHECK - fileSystem:", fileSystem);
2543
+ throw new Error("File system adapter not available");
2544
+ }
2545
+ console.log("[useSkillsData] Check passed! Continuing...");
2546
+ const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
2547
+ if (!repoPath) {
2548
+ throw new Error("Repository path not available");
2549
+ }
2550
+ console.log("[useSkillsData] fileTree:", fileTree);
2551
+ console.log("[useSkillsData] fileTree.allFiles:", fileTree.allFiles);
2552
+ console.log("[useSkillsData] typeof fileTree:", typeof fileTree);
2553
+ console.log("[useSkillsData] fileTree keys:", Object.keys(fileTree));
2554
+ const skillPaths = findSkillFiles(fileTree);
2555
+ console.log("[useSkillsData] Found skill paths:", skillPaths);
2556
+ const skillPromises = skillPaths.map(async (skillPath) => {
2557
+ try {
2558
+ const fullPath = `${repoPath}/${skillPath}`;
2559
+ const content2 = await fileSystem.readFile(fullPath);
2560
+ return parseSkillContent(content2, skillPath, fileTree);
2561
+ } catch (err) {
2562
+ console.error(`Failed to read skill at ${skillPath}:`, err);
2563
+ return null;
2564
+ }
2565
+ });
2566
+ localSkills = (await Promise.all(skillPromises)).filter(
2567
+ (skill) => skill !== null
2568
+ );
2496
2569
  }
2497
- console.log("[useSkillsData] Full context:", context);
2498
- const fileSystem = (_a = context.adapters) == null ? void 0 : _a.fileSystem;
2499
- console.log("[useSkillsData] Adapters:", context.adapters);
2500
- console.log("[useSkillsData] FileSystem adapter:", fileSystem);
2501
- console.log("[useSkillsData] fileSystem?.readFile:", fileSystem == null ? void 0 : fileSystem.readFile);
2502
- console.log("[useSkillsData] typeof fileSystem?.readFile:", typeof (fileSystem == null ? void 0 : fileSystem.readFile));
2503
- console.log("[useSkillsData] Check result (!fileSystem?.readFile):", !(fileSystem == null ? void 0 : fileSystem.readFile));
2504
- if (!(fileSystem == null ? void 0 : fileSystem.readFile)) {
2505
- console.error("[useSkillsData] FAILING CHECK - fileSystem:", fileSystem);
2506
- throw new Error("File system adapter not available");
2507
- }
2508
- console.log("[useSkillsData] Check passed! Continuing...");
2509
- const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
2510
- if (!repoPath) {
2511
- throw new Error("Repository path not available");
2512
- }
2513
- console.log("[useSkillsData] fileTree:", fileTree);
2514
- console.log("[useSkillsData] fileTree.allFiles:", fileTree.allFiles);
2515
- console.log("[useSkillsData] typeof fileTree:", typeof fileTree);
2516
- console.log("[useSkillsData] fileTree keys:", Object.keys(fileTree));
2517
- const skillPaths = findSkillFiles(fileTree);
2518
- console.log("[useSkillsData] Found skill paths:", skillPaths);
2519
- const skillPromises = skillPaths.map(async (skillPath) => {
2520
- try {
2521
- const fullPath = `${repoPath}/${skillPath}`;
2522
- const content2 = await fileSystem.readFile(fullPath);
2523
- return parseSkillContent(content2, skillPath, fileTree);
2524
- } catch (err) {
2525
- console.error(`Failed to read skill at ${skillPath}:`, err);
2526
- return null;
2527
- }
2528
- });
2529
- const loadedSkills = (await Promise.all(skillPromises)).filter(
2530
- (skill) => skill !== null
2531
- );
2532
- setSkills(loadedSkills);
2570
+ const globalSkillsSlice = context.getSlice("globalSkills");
2571
+ const globalSkills = ((_c = globalSkillsSlice == null ? void 0 : globalSkillsSlice.data) == null ? void 0 : _c.skills) || [];
2572
+ console.log("[useSkillsData] Global skills:", globalSkills);
2573
+ const allSkills = [...localSkills, ...globalSkills];
2574
+ console.log("[useSkillsData] Total skills:", allSkills.length);
2575
+ setSkills(allSkills);
2533
2576
  } catch (err) {
2534
2577
  const errorMessage = err instanceof Error ? err.message : "Failed to load skills";
2535
2578
  setError(errorMessage);
@@ -2551,6 +2594,55 @@ const useSkillsData = ({
2551
2594
  refreshSkills
2552
2595
  };
2553
2596
  };
2597
+ const getSourceConfig = (source2) => {
2598
+ switch (source2) {
2599
+ case "global-universal":
2600
+ return {
2601
+ label: "Global",
2602
+ icon: Globe,
2603
+ color: "#7c3aed",
2604
+ // purple
2605
+ bgColor: "#7c3aed15",
2606
+ borderColor: "#7c3aed30"
2607
+ };
2608
+ case "global-claude":
2609
+ return {
2610
+ label: "Global Claude",
2611
+ icon: Globe,
2612
+ color: "#0891b2",
2613
+ // cyan
2614
+ bgColor: "#0891b215",
2615
+ borderColor: "#0891b230"
2616
+ };
2617
+ case "project-universal":
2618
+ return {
2619
+ label: "Project",
2620
+ icon: Folder,
2621
+ color: "#16a34a",
2622
+ // green
2623
+ bgColor: "#16a34a15",
2624
+ borderColor: "#16a34a30"
2625
+ };
2626
+ case "project-claude":
2627
+ return {
2628
+ label: "Project Claude",
2629
+ icon: Folder,
2630
+ color: "#0284c7",
2631
+ // blue
2632
+ bgColor: "#0284c715",
2633
+ borderColor: "#0284c730"
2634
+ };
2635
+ case "project-other":
2636
+ return {
2637
+ label: "Project",
2638
+ icon: Folder,
2639
+ color: "#64748b",
2640
+ // slate
2641
+ bgColor: "#64748b15",
2642
+ borderColor: "#64748b30"
2643
+ };
2644
+ }
2645
+ };
2554
2646
  const SkillCard = ({
2555
2647
  skill,
2556
2648
  onClick,
@@ -2558,6 +2650,7 @@ const SkillCard = ({
2558
2650
  }) => {
2559
2651
  var _a, _b, _c, _d, _e2, _f;
2560
2652
  const { theme: theme2 } = useTheme();
2653
+ const sourceConfig = getSourceConfig(skill.source);
2561
2654
  return /* @__PURE__ */ jsxs(
2562
2655
  "div",
2563
2656
  {
@@ -2607,22 +2700,47 @@ const SkillCard = ({
2607
2700
  children: /* @__PURE__ */ jsx(FileText, { size: 20, color: theme2.colors.primary })
2608
2701
  }
2609
2702
  ),
2610
- /* @__PURE__ */ jsx(
2611
- "h3",
2612
- {
2613
- style: {
2614
- margin: 0,
2615
- fontSize: theme2.fontSizes[2],
2616
- fontWeight: theme2.fontWeights.semibold,
2617
- color: theme2.colors.text,
2618
- overflow: "hidden",
2619
- textOverflow: "ellipsis",
2620
- whiteSpace: "nowrap",
2621
- textTransform: "capitalize"
2622
- },
2623
- children: skill.name
2624
- }
2625
- )
2703
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", flex: 1, minWidth: 0 }, children: [
2704
+ /* @__PURE__ */ jsx(
2705
+ "h3",
2706
+ {
2707
+ style: {
2708
+ margin: 0,
2709
+ fontSize: theme2.fontSizes[2],
2710
+ fontWeight: theme2.fontWeights.semibold,
2711
+ color: theme2.colors.text,
2712
+ overflow: "hidden",
2713
+ textOverflow: "ellipsis",
2714
+ whiteSpace: "nowrap",
2715
+ textTransform: "capitalize"
2716
+ },
2717
+ children: skill.name
2718
+ }
2719
+ ),
2720
+ /* @__PURE__ */ jsxs(
2721
+ "div",
2722
+ {
2723
+ style: {
2724
+ display: "inline-flex",
2725
+ alignItems: "center",
2726
+ gap: "4px",
2727
+ padding: "2px 6px",
2728
+ borderRadius: theme2.radii[1],
2729
+ backgroundColor: sourceConfig.bgColor,
2730
+ border: `1px solid ${sourceConfig.borderColor}`,
2731
+ fontSize: theme2.fontSizes[0],
2732
+ color: sourceConfig.color,
2733
+ fontWeight: 500,
2734
+ width: "fit-content"
2735
+ },
2736
+ title: `Source: ${skill.source}`,
2737
+ children: [
2738
+ /* @__PURE__ */ jsx(sourceConfig.icon, { size: 10 }),
2739
+ /* @__PURE__ */ jsx("span", { children: sourceConfig.label })
2740
+ ]
2741
+ }
2742
+ )
2743
+ ] })
2626
2744
  ] }),
2627
2745
  onClick && /* @__PURE__ */ jsx(
2628
2746
  ChevronRight,
@@ -2789,6 +2907,7 @@ const SkillsListPanel = ({
2789
2907
  const panelRef = useRef(null);
2790
2908
  const [selectedSkillId, setSelectedSkillId] = useState(null);
2791
2909
  const [searchQuery, setSearchQuery] = useState("");
2910
+ const [skillFilter, setSkillFilter] = useState("all");
2792
2911
  const [isRefreshing, setIsRefreshing] = useState(false);
2793
2912
  const { skills, isLoading, error, refreshSkills } = useSkillsData({ context });
2794
2913
  gt("skills-list", events, () => {
@@ -2796,20 +2915,30 @@ const SkillsListPanel = ({
2796
2915
  return (_a = panelRef.current) == null ? void 0 : _a.focus();
2797
2916
  });
2798
2917
  const filteredSkills = useMemo(() => {
2799
- if (!searchQuery.trim()) {
2800
- return skills;
2801
- }
2802
- const query = searchQuery.toLowerCase().trim();
2803
- return skills.filter((skill) => {
2804
- var _a, _b;
2805
- if (skill.name.toLowerCase().includes(query)) return true;
2806
- if ((_a = skill.description) == null ? void 0 : _a.toLowerCase().includes(query)) return true;
2807
- if ((_b = skill.capabilities) == null ? void 0 : _b.some((cap2) => cap2.toLowerCase().includes(query)))
2808
- return true;
2809
- if (skill.path.toLowerCase().includes(query)) return true;
2810
- return false;
2811
- });
2812
- }, [skills, searchQuery]);
2918
+ let filtered = skills;
2919
+ if (skillFilter === "project") {
2920
+ filtered = filtered.filter(
2921
+ (skill) => skill.source === "project-universal" || skill.source === "project-claude" || skill.source === "project-other"
2922
+ );
2923
+ } else if (skillFilter === "global") {
2924
+ filtered = filtered.filter(
2925
+ (skill) => skill.source === "global-universal" || skill.source === "global-claude"
2926
+ );
2927
+ }
2928
+ if (searchQuery.trim()) {
2929
+ const query = searchQuery.toLowerCase().trim();
2930
+ filtered = filtered.filter((skill) => {
2931
+ var _a, _b;
2932
+ if (skill.name.toLowerCase().includes(query)) return true;
2933
+ if ((_a = skill.description) == null ? void 0 : _a.toLowerCase().includes(query)) return true;
2934
+ if ((_b = skill.capabilities) == null ? void 0 : _b.some((cap2) => cap2.toLowerCase().includes(query)))
2935
+ return true;
2936
+ if (skill.path.toLowerCase().includes(query)) return true;
2937
+ return false;
2938
+ });
2939
+ }
2940
+ return filtered;
2941
+ }, [skills, searchQuery, skillFilter]);
2813
2942
  const handleSkillClick = (skill) => {
2814
2943
  setSelectedSkillId(skill.id);
2815
2944
  if (events) {
@@ -3008,6 +3137,90 @@ const SkillsListPanel = ({
3008
3137
  ]
3009
3138
  }
3010
3139
  ),
3140
+ /* @__PURE__ */ jsxs(
3141
+ "div",
3142
+ {
3143
+ style: {
3144
+ flexShrink: 0,
3145
+ display: "flex",
3146
+ gap: "8px"
3147
+ },
3148
+ children: [
3149
+ /* @__PURE__ */ jsx(
3150
+ "button",
3151
+ {
3152
+ onClick: () => setSkillFilter("all"),
3153
+ style: {
3154
+ padding: "8px 16px",
3155
+ fontSize: theme2.fontSizes[1],
3156
+ fontFamily: theme2.fonts.body,
3157
+ border: `1px solid ${skillFilter === "all" ? theme2.colors.primary : theme2.colors.border}`,
3158
+ borderRadius: theme2.radii[1],
3159
+ background: skillFilter === "all" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
3160
+ color: skillFilter === "all" ? theme2.colors.primary : theme2.colors.text,
3161
+ cursor: "pointer",
3162
+ display: "flex",
3163
+ alignItems: "center",
3164
+ gap: "6px",
3165
+ fontWeight: skillFilter === "all" ? 600 : 400,
3166
+ transition: "all 0.2s ease"
3167
+ },
3168
+ children: "All Skills"
3169
+ }
3170
+ ),
3171
+ /* @__PURE__ */ jsxs(
3172
+ "button",
3173
+ {
3174
+ onClick: () => setSkillFilter("project"),
3175
+ style: {
3176
+ padding: "8px 16px",
3177
+ fontSize: theme2.fontSizes[1],
3178
+ fontFamily: theme2.fonts.body,
3179
+ border: `1px solid ${skillFilter === "project" ? theme2.colors.primary : theme2.colors.border}`,
3180
+ borderRadius: theme2.radii[1],
3181
+ background: skillFilter === "project" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
3182
+ color: skillFilter === "project" ? theme2.colors.primary : theme2.colors.text,
3183
+ cursor: "pointer",
3184
+ display: "flex",
3185
+ alignItems: "center",
3186
+ gap: "6px",
3187
+ fontWeight: skillFilter === "project" ? 600 : 400,
3188
+ transition: "all 0.2s ease"
3189
+ },
3190
+ children: [
3191
+ /* @__PURE__ */ jsx(Folder, { size: 14 }),
3192
+ "Project"
3193
+ ]
3194
+ }
3195
+ ),
3196
+ /* @__PURE__ */ jsxs(
3197
+ "button",
3198
+ {
3199
+ onClick: () => setSkillFilter("global"),
3200
+ style: {
3201
+ padding: "8px 16px",
3202
+ fontSize: theme2.fontSizes[1],
3203
+ fontFamily: theme2.fonts.body,
3204
+ border: `1px solid ${skillFilter === "global" ? theme2.colors.primary : theme2.colors.border}`,
3205
+ borderRadius: theme2.radii[1],
3206
+ background: skillFilter === "global" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
3207
+ color: skillFilter === "global" ? theme2.colors.primary : theme2.colors.text,
3208
+ cursor: "pointer",
3209
+ display: "flex",
3210
+ alignItems: "center",
3211
+ gap: "6px",
3212
+ fontWeight: skillFilter === "global" ? 600 : 400,
3213
+ transition: "all 0.2s ease"
3214
+ },
3215
+ children: [
3216
+ /* @__PURE__ */ jsx(Globe, { size: 14 }),
3217
+ "Global"
3218
+ ]
3219
+ }
3220
+ )
3221
+ ]
3222
+ }
3223
+ ),
3011
3224
  error && /* @__PURE__ */ jsxs(
3012
3225
  "div",
3013
3226
  {
@@ -47723,7 +47936,7 @@ const panels = [
47723
47936
  version: "0.1.0",
47724
47937
  author: "Principal ADE",
47725
47938
  description: "Display and manage Agent Skills from SKILL.md files",
47726
- slices: ["fileTree"]
47939
+ slices: ["fileTree", "globalSkills"]
47727
47940
  // Data slices this panel depends on
47728
47941
  },
47729
47942
  component: SkillsListPanel,
@@ -47748,7 +47961,7 @@ const panels = [
47748
47961
  version: "0.1.0",
47749
47962
  author: "Principal ADE",
47750
47963
  description: "Display detailed information about a selected Agent Skill",
47751
- slices: ["fileTree"]
47964
+ slices: ["fileTree", "globalSkills"]
47752
47965
  // Data slices this panel depends on
47753
47966
  },
47754
47967
  component: SkillDetailPanel,