@industry-theme/agent-panels 0.2.23 → 0.2.24
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/dist/panels/AgentDetailPanel.d.ts.map +1 -1
- package/dist/panels/SkillsBrowsePanel.d.ts +8 -1
- package/dist/panels/SkillsBrowsePanel.d.ts.map +1 -1
- package/dist/panels/SkillsListPanel.d.ts +5 -0
- package/dist/panels/SkillsListPanel.d.ts.map +1 -1
- package/dist/panels/skills/components/SkillCard.d.ts +5 -0
- package/dist/panels/skills/components/SkillCard.d.ts.map +1 -1
- package/dist/panels.bundle.js +96 -57
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AASpD,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAOrE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgc5D,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PanelComponentProps } from '../types';
|
|
3
|
+
export interface SkillsBrowsePanelProps extends PanelComponentProps {
|
|
4
|
+
/**
|
|
5
|
+
* When true, shows the refresh button and enables refresh functionality.
|
|
6
|
+
* The host must support handling 'skills:refresh' events.
|
|
7
|
+
*/
|
|
8
|
+
supportsRefresh?: boolean;
|
|
9
|
+
}
|
|
3
10
|
/**
|
|
4
11
|
* SkillsBrowsePanel - A panel for browsing Agent Skills from GitHub repositories
|
|
5
12
|
*
|
|
@@ -11,5 +18,5 @@ import type { PanelComponentProps } from '../types';
|
|
|
11
18
|
*
|
|
12
19
|
* Note: This panel does NOT show global/installed skills - it's specifically for browsing remote repositories
|
|
13
20
|
*/
|
|
14
|
-
export declare const SkillsBrowsePanel: React.FC<
|
|
21
|
+
export declare const SkillsBrowsePanel: React.FC<SkillsBrowsePanelProps>;
|
|
15
22
|
//# sourceMappingURL=SkillsBrowsePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillsBrowsePanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsBrowsePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"SkillsBrowsePanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsBrowsePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+V9D,CAAC"}
|
|
@@ -6,6 +6,11 @@ export interface SkillsListPanelProps extends PanelComponentProps {
|
|
|
6
6
|
* - Changes "Project" filter label to "Git Repo"
|
|
7
7
|
*/
|
|
8
8
|
browseMode?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* When true, shows the refresh button and enables refresh functionality.
|
|
11
|
+
* The host must support handling 'skills:refresh' events.
|
|
12
|
+
*/
|
|
13
|
+
supportsRefresh?: boolean;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* SkillsListPanel - A panel for displaying Agent Skills from SKILL.md files
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOpD,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOpD,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAic1D,CAAC"}
|
|
@@ -4,6 +4,11 @@ interface SkillCardProps {
|
|
|
4
4
|
skill: Skill;
|
|
5
5
|
onClick?: (skill: Skill) => void;
|
|
6
6
|
isSelected?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The current filter context ('project' or 'global')
|
|
9
|
+
* Used to determine which path to copy when skill has multiple installations
|
|
10
|
+
*/
|
|
11
|
+
filterContext?: 'project' | 'global';
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* SkillCard - Displays a single skill with its metadata
|
|
@@ -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;
|
|
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;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CACtC;AAoED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkZ9C,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -3002,16 +3002,35 @@ const abbreviateSourceName = (source2) => {
|
|
|
3002
3002
|
const SkillCard = ({
|
|
3003
3003
|
skill,
|
|
3004
3004
|
onClick,
|
|
3005
|
-
isSelected = false
|
|
3005
|
+
isSelected = false,
|
|
3006
|
+
filterContext
|
|
3006
3007
|
}) => {
|
|
3007
3008
|
var _a, _b, _c, _d, _e2, _f, _g, _h;
|
|
3008
3009
|
const { theme: theme2 } = useTheme();
|
|
3009
3010
|
const sourceConfig = getSourceConfig$1(skill.source);
|
|
3010
3011
|
const [pathCopied, setPathCopied] = React2__default.useState(false);
|
|
3012
|
+
const getPathToCopy = () => {
|
|
3013
|
+
if (!filterContext || !skill.installedLocations || skill.installedLocations.length <= 1) {
|
|
3014
|
+
return skill.path;
|
|
3015
|
+
}
|
|
3016
|
+
if (filterContext === "project") {
|
|
3017
|
+
const projectInstallation = skill.installedLocations.find(
|
|
3018
|
+
(loc) => loc.source === "project-universal" || loc.source === "project-claude" || loc.source === "project-other"
|
|
3019
|
+
);
|
|
3020
|
+
return (projectInstallation == null ? void 0 : projectInstallation.path) || skill.path;
|
|
3021
|
+
} else if (filterContext === "global") {
|
|
3022
|
+
const globalInstallation = skill.installedLocations.find(
|
|
3023
|
+
(loc) => loc.source === "global-universal" || loc.source === "global-claude"
|
|
3024
|
+
);
|
|
3025
|
+
return (globalInstallation == null ? void 0 : globalInstallation.path) || skill.path;
|
|
3026
|
+
}
|
|
3027
|
+
return skill.path;
|
|
3028
|
+
};
|
|
3011
3029
|
const handleCopyPath = async (e) => {
|
|
3012
3030
|
e.stopPropagation();
|
|
3013
3031
|
try {
|
|
3014
|
-
|
|
3032
|
+
const pathToCopy = getPathToCopy();
|
|
3033
|
+
await navigator.clipboard.writeText(pathToCopy);
|
|
3015
3034
|
setPathCopied(true);
|
|
3016
3035
|
setTimeout(() => setPathCopied(false), 2e3);
|
|
3017
3036
|
} catch (err) {
|
|
@@ -3068,7 +3087,7 @@ const SkillCard = ({
|
|
|
3068
3087
|
}
|
|
3069
3088
|
),
|
|
3070
3089
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "4px", alignItems: "center", flexWrap: "wrap" }, children: [
|
|
3071
|
-
/* @__PURE__ */ jsxs(
|
|
3090
|
+
!filterContext && /* @__PURE__ */ jsxs(
|
|
3072
3091
|
"div",
|
|
3073
3092
|
{
|
|
3074
3093
|
style: {
|
|
@@ -3092,8 +3111,12 @@ const SkillCard = ({
|
|
|
3092
3111
|
}
|
|
3093
3112
|
),
|
|
3094
3113
|
((_a = skill.metadata) == null ? void 0 : _a.owner) && ((_b = skill.metadata) == null ? void 0 : _b.repo) && /* @__PURE__ */ jsxs(
|
|
3095
|
-
"
|
|
3114
|
+
"a",
|
|
3096
3115
|
{
|
|
3116
|
+
href: skill.metadata.installedFrom || `https://github.com/${skill.metadata.owner}/${skill.metadata.repo}`,
|
|
3117
|
+
target: "_blank",
|
|
3118
|
+
rel: "noopener noreferrer",
|
|
3119
|
+
onClick: (e) => e.stopPropagation(),
|
|
3097
3120
|
style: {
|
|
3098
3121
|
display: "inline-flex",
|
|
3099
3122
|
alignItems: "center",
|
|
@@ -3106,13 +3129,25 @@ const SkillCard = ({
|
|
|
3106
3129
|
color: theme2.colors.textSecondary,
|
|
3107
3130
|
fontWeight: 500,
|
|
3108
3131
|
fontFamily: theme2.fonts.monospace,
|
|
3109
|
-
width: "fit-content"
|
|
3132
|
+
width: "fit-content",
|
|
3133
|
+
textDecoration: "none",
|
|
3134
|
+
cursor: "pointer",
|
|
3135
|
+
transition: "all 0.2s ease"
|
|
3110
3136
|
},
|
|
3111
|
-
title: `
|
|
3137
|
+
title: `Click to open: ${skill.metadata.installedFrom || `https://github.com/${skill.metadata.owner}/${skill.metadata.repo}`}
|
|
3112
3138
|
Installed: ${skill.metadata.installedAt ? new Date(skill.metadata.installedAt).toLocaleString() : "Unknown"}`,
|
|
3139
|
+
onMouseEnter: (e) => {
|
|
3140
|
+
e.currentTarget.style.backgroundColor = `${theme2.colors.textSecondary}25`;
|
|
3141
|
+
e.currentTarget.style.borderColor = `${theme2.colors.textSecondary}50`;
|
|
3142
|
+
},
|
|
3143
|
+
onMouseLeave: (e) => {
|
|
3144
|
+
e.currentTarget.style.backgroundColor = `${theme2.colors.textSecondary}15`;
|
|
3145
|
+
e.currentTarget.style.borderColor = `${theme2.colors.textSecondary}30`;
|
|
3146
|
+
},
|
|
3113
3147
|
children: [
|
|
3114
3148
|
/* @__PURE__ */ jsx(Github, { size: 10 }),
|
|
3115
3149
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
3150
|
+
"From ",
|
|
3116
3151
|
skill.metadata.owner,
|
|
3117
3152
|
"/",
|
|
3118
3153
|
skill.metadata.repo
|
|
@@ -3145,8 +3180,21 @@ Installed: ${skill.metadata.installedAt ? new Date(skill.metadata.installedAt).t
|
|
|
3145
3180
|
}
|
|
3146
3181
|
),
|
|
3147
3182
|
skill.installedLocations && skill.installedLocations.length > 1 && (() => {
|
|
3148
|
-
|
|
3149
|
-
|
|
3183
|
+
let otherLocations = [];
|
|
3184
|
+
if (filterContext === "project") {
|
|
3185
|
+
otherLocations = skill.installedLocations.filter(
|
|
3186
|
+
(loc) => loc.source === "global-universal" || loc.source === "global-claude"
|
|
3187
|
+
);
|
|
3188
|
+
} else if (filterContext === "global") {
|
|
3189
|
+
otherLocations = skill.installedLocations.filter(
|
|
3190
|
+
(loc) => loc.source === "project-universal" || loc.source === "project-claude" || loc.source === "project-other"
|
|
3191
|
+
);
|
|
3192
|
+
} else {
|
|
3193
|
+
otherLocations = skill.installedLocations.filter((loc) => loc.path !== skill.path);
|
|
3194
|
+
}
|
|
3195
|
+
if (otherLocations.length === 0) return null;
|
|
3196
|
+
const locationNames = otherLocations.map((loc) => abbreviateSourceName(loc.source));
|
|
3197
|
+
const uniqueLocations = Array.from(new Set(locationNames));
|
|
3150
3198
|
const locationText = uniqueLocations.join(", ");
|
|
3151
3199
|
return /* @__PURE__ */ jsxs(
|
|
3152
3200
|
"div",
|
|
@@ -3165,7 +3213,7 @@ Installed: ${skill.metadata.installedAt ? new Date(skill.metadata.installedAt).t
|
|
|
3165
3213
|
width: "fit-content"
|
|
3166
3214
|
},
|
|
3167
3215
|
title: `Also installed in:
|
|
3168
|
-
${
|
|
3216
|
+
${otherLocations.map((loc) => `${abbreviateSourceName(loc.source)}: ${loc.path}`).join("\n")}`,
|
|
3169
3217
|
children: [
|
|
3170
3218
|
/* @__PURE__ */ jsx(Package, { size: 10 }),
|
|
3171
3219
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -3323,7 +3371,7 @@ ${skill.installedLocations.filter((loc) => loc.path !== skill.path).map((loc) =>
|
|
|
3323
3371
|
transition: "all 0.2s ease",
|
|
3324
3372
|
border: `1px solid ${pathCopied ? theme2.colors.success : "transparent"}`
|
|
3325
3373
|
},
|
|
3326
|
-
title: pathCopied ? "Copied!" :
|
|
3374
|
+
title: pathCopied ? "Copied!" : `Click to copy: ${getPathToCopy()}`,
|
|
3327
3375
|
onMouseEnter: (e) => {
|
|
3328
3376
|
if (!pathCopied) {
|
|
3329
3377
|
e.currentTarget.style.background = theme2.colors.backgroundTertiary || theme2.colors.border;
|
|
@@ -3334,7 +3382,7 @@ ${skill.installedLocations.filter((loc) => loc.path !== skill.path).map((loc) =>
|
|
|
3334
3382
|
e.currentTarget.style.background = theme2.colors.backgroundSecondary;
|
|
3335
3383
|
}
|
|
3336
3384
|
},
|
|
3337
|
-
children: pathCopied ? "Copied!" :
|
|
3385
|
+
children: pathCopied ? "Copied!" : getPathToCopy()
|
|
3338
3386
|
}
|
|
3339
3387
|
)
|
|
3340
3388
|
]
|
|
@@ -3344,13 +3392,14 @@ ${skill.installedLocations.filter((loc) => loc.path !== skill.path).map((loc) =>
|
|
|
3344
3392
|
const SkillsListPanel = ({
|
|
3345
3393
|
context,
|
|
3346
3394
|
events,
|
|
3347
|
-
browseMode = false
|
|
3395
|
+
browseMode = false,
|
|
3396
|
+
supportsRefresh = false
|
|
3348
3397
|
}) => {
|
|
3349
3398
|
const { theme: theme2 } = useTheme();
|
|
3350
3399
|
const panelRef = useRef(null);
|
|
3351
3400
|
const [selectedSkillId, setSelectedSkillId] = useState(null);
|
|
3352
3401
|
const [searchQuery, setSearchQuery] = useState("");
|
|
3353
|
-
const [skillFilter, setSkillFilter] = useState("
|
|
3402
|
+
const [skillFilter, setSkillFilter] = useState("project");
|
|
3354
3403
|
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
3355
3404
|
const { skills, isLoading, error, refreshSkills } = useSkillsData({ context });
|
|
3356
3405
|
gt("skills-list", events, () => {
|
|
@@ -3378,13 +3427,23 @@ const SkillsListPanel = ({
|
|
|
3378
3427
|
const filteredSkills = useMemo(() => {
|
|
3379
3428
|
let filtered = skills;
|
|
3380
3429
|
if (skillFilter === "project") {
|
|
3381
|
-
filtered = filtered.filter(
|
|
3382
|
-
(skill
|
|
3383
|
-
|
|
3430
|
+
filtered = filtered.filter((skill) => {
|
|
3431
|
+
if (skill.installedLocations && skill.installedLocations.length > 0) {
|
|
3432
|
+
return skill.installedLocations.some(
|
|
3433
|
+
(loc) => loc.source === "project-universal" || loc.source === "project-claude" || loc.source === "project-other"
|
|
3434
|
+
);
|
|
3435
|
+
}
|
|
3436
|
+
return skill.source === "project-universal" || skill.source === "project-claude" || skill.source === "project-other";
|
|
3437
|
+
});
|
|
3384
3438
|
} else if (skillFilter === "global") {
|
|
3385
|
-
filtered = filtered.filter(
|
|
3386
|
-
(skill
|
|
3387
|
-
|
|
3439
|
+
filtered = filtered.filter((skill) => {
|
|
3440
|
+
if (skill.installedLocations && skill.installedLocations.length > 0) {
|
|
3441
|
+
return skill.installedLocations.some(
|
|
3442
|
+
(loc) => loc.source === "global-universal" || loc.source === "global-claude"
|
|
3443
|
+
);
|
|
3444
|
+
}
|
|
3445
|
+
return skill.source === "global-universal" || skill.source === "global-claude";
|
|
3446
|
+
});
|
|
3388
3447
|
}
|
|
3389
3448
|
if (searchQuery.trim()) {
|
|
3390
3449
|
const query = searchQuery.toLowerCase().trim();
|
|
@@ -3412,7 +3471,7 @@ const SkillsListPanel = ({
|
|
|
3412
3471
|
});
|
|
3413
3472
|
}
|
|
3414
3473
|
};
|
|
3415
|
-
const handleRefresh =
|
|
3474
|
+
const handleRefresh = () => {
|
|
3416
3475
|
setIsRefreshing(true);
|
|
3417
3476
|
if (events) {
|
|
3418
3477
|
events.emit({
|
|
@@ -3423,11 +3482,9 @@ const SkillsListPanel = ({
|
|
|
3423
3482
|
payload: {}
|
|
3424
3483
|
});
|
|
3425
3484
|
}
|
|
3426
|
-
|
|
3427
|
-
await refreshSkills();
|
|
3428
|
-
} finally {
|
|
3485
|
+
setTimeout(() => {
|
|
3429
3486
|
setIsRefreshing(false);
|
|
3430
|
-
}
|
|
3487
|
+
}, 800);
|
|
3431
3488
|
};
|
|
3432
3489
|
return /* @__PURE__ */ jsxs(
|
|
3433
3490
|
"div",
|
|
@@ -3574,7 +3631,7 @@ const SkillsListPanel = ({
|
|
|
3574
3631
|
]
|
|
3575
3632
|
}
|
|
3576
3633
|
),
|
|
3577
|
-
/* @__PURE__ */ jsx(
|
|
3634
|
+
supportsRefresh && /* @__PURE__ */ jsx(
|
|
3578
3635
|
"button",
|
|
3579
3636
|
{
|
|
3580
3637
|
onClick: handleRefresh,
|
|
@@ -3584,7 +3641,7 @@ const SkillsListPanel = ({
|
|
|
3584
3641
|
border: `1px solid ${theme2.colors.border}`,
|
|
3585
3642
|
borderRadius: theme2.radii[1],
|
|
3586
3643
|
padding: "8px",
|
|
3587
|
-
cursor: isRefreshing ? "
|
|
3644
|
+
cursor: isRefreshing || isLoading ? "default" : "pointer",
|
|
3588
3645
|
display: "flex",
|
|
3589
3646
|
alignItems: "center",
|
|
3590
3647
|
justifyContent: "center",
|
|
@@ -3616,33 +3673,12 @@ const SkillsListPanel = ({
|
|
|
3616
3673
|
gap: "8px"
|
|
3617
3674
|
},
|
|
3618
3675
|
children: [
|
|
3619
|
-
/* @__PURE__ */ jsx(
|
|
3620
|
-
"button",
|
|
3621
|
-
{
|
|
3622
|
-
onClick: () => setSkillFilter("all"),
|
|
3623
|
-
style: {
|
|
3624
|
-
padding: "8px 16px",
|
|
3625
|
-
fontSize: theme2.fontSizes[1],
|
|
3626
|
-
fontFamily: theme2.fonts.body,
|
|
3627
|
-
border: `1px solid ${skillFilter === "all" ? theme2.colors.primary : theme2.colors.border}`,
|
|
3628
|
-
borderRadius: theme2.radii[1],
|
|
3629
|
-
background: skillFilter === "all" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
|
|
3630
|
-
color: skillFilter === "all" ? theme2.colors.primary : theme2.colors.text,
|
|
3631
|
-
cursor: "pointer",
|
|
3632
|
-
display: "flex",
|
|
3633
|
-
alignItems: "center",
|
|
3634
|
-
gap: "6px",
|
|
3635
|
-
fontWeight: skillFilter === "all" ? 600 : 400,
|
|
3636
|
-
transition: "all 0.2s ease"
|
|
3637
|
-
},
|
|
3638
|
-
children: "All Skills"
|
|
3639
|
-
}
|
|
3640
|
-
),
|
|
3641
3676
|
/* @__PURE__ */ jsx(
|
|
3642
3677
|
"button",
|
|
3643
3678
|
{
|
|
3644
3679
|
onClick: () => setSkillFilter("project"),
|
|
3645
3680
|
style: {
|
|
3681
|
+
flex: 1,
|
|
3646
3682
|
padding: "8px 16px",
|
|
3647
3683
|
fontSize: theme2.fontSizes[1],
|
|
3648
3684
|
fontFamily: theme2.fonts.body,
|
|
@@ -3653,6 +3689,7 @@ const SkillsListPanel = ({
|
|
|
3653
3689
|
cursor: "pointer",
|
|
3654
3690
|
display: "flex",
|
|
3655
3691
|
alignItems: "center",
|
|
3692
|
+
justifyContent: "center",
|
|
3656
3693
|
gap: "6px",
|
|
3657
3694
|
fontWeight: skillFilter === "project" ? 600 : 400,
|
|
3658
3695
|
transition: "all 0.2s ease"
|
|
@@ -3665,6 +3702,7 @@ const SkillsListPanel = ({
|
|
|
3665
3702
|
{
|
|
3666
3703
|
onClick: () => setSkillFilter("global"),
|
|
3667
3704
|
style: {
|
|
3705
|
+
flex: 1,
|
|
3668
3706
|
padding: "8px 16px",
|
|
3669
3707
|
fontSize: theme2.fontSizes[1],
|
|
3670
3708
|
fontFamily: theme2.fonts.body,
|
|
@@ -3675,6 +3713,7 @@ const SkillsListPanel = ({
|
|
|
3675
3713
|
cursor: "pointer",
|
|
3676
3714
|
display: "flex",
|
|
3677
3715
|
alignItems: "center",
|
|
3716
|
+
justifyContent: "center",
|
|
3678
3717
|
gap: "6px",
|
|
3679
3718
|
fontWeight: skillFilter === "global" ? 600 : 400,
|
|
3680
3719
|
transition: "all 0.2s ease"
|
|
@@ -3762,7 +3801,8 @@ const SkillsListPanel = ({
|
|
|
3762
3801
|
{
|
|
3763
3802
|
skill,
|
|
3764
3803
|
onClick: handleSkillClick,
|
|
3765
|
-
isSelected: selectedSkillId === skill.id
|
|
3804
|
+
isSelected: selectedSkillId === skill.id,
|
|
3805
|
+
filterContext: skillFilter
|
|
3766
3806
|
},
|
|
3767
3807
|
skill.id
|
|
3768
3808
|
))
|
|
@@ -3855,7 +3895,8 @@ const useSkillsBrowseData = ({
|
|
|
3855
3895
|
};
|
|
3856
3896
|
const SkillsBrowsePanel = ({
|
|
3857
3897
|
context,
|
|
3858
|
-
events
|
|
3898
|
+
events,
|
|
3899
|
+
supportsRefresh = false
|
|
3859
3900
|
}) => {
|
|
3860
3901
|
const { theme: theme2 } = useTheme();
|
|
3861
3902
|
const panelRef = useRef(null);
|
|
@@ -3909,7 +3950,7 @@ const SkillsBrowsePanel = ({
|
|
|
3909
3950
|
});
|
|
3910
3951
|
}
|
|
3911
3952
|
};
|
|
3912
|
-
const handleRefresh =
|
|
3953
|
+
const handleRefresh = () => {
|
|
3913
3954
|
setIsRefreshing(true);
|
|
3914
3955
|
if (events) {
|
|
3915
3956
|
events.emit({
|
|
@@ -3920,11 +3961,9 @@ const SkillsBrowsePanel = ({
|
|
|
3920
3961
|
payload: {}
|
|
3921
3962
|
});
|
|
3922
3963
|
}
|
|
3923
|
-
|
|
3924
|
-
await refreshSkills();
|
|
3925
|
-
} finally {
|
|
3964
|
+
setTimeout(() => {
|
|
3926
3965
|
setIsRefreshing(false);
|
|
3927
|
-
}
|
|
3966
|
+
}, 800);
|
|
3928
3967
|
};
|
|
3929
3968
|
return /* @__PURE__ */ jsxs(
|
|
3930
3969
|
"div",
|
|
@@ -4071,7 +4110,7 @@ const SkillsBrowsePanel = ({
|
|
|
4071
4110
|
]
|
|
4072
4111
|
}
|
|
4073
4112
|
),
|
|
4074
|
-
/* @__PURE__ */ jsx(
|
|
4113
|
+
supportsRefresh && /* @__PURE__ */ jsx(
|
|
4075
4114
|
"button",
|
|
4076
4115
|
{
|
|
4077
4116
|
onClick: handleRefresh,
|
|
@@ -4081,7 +4120,7 @@ const SkillsBrowsePanel = ({
|
|
|
4081
4120
|
border: `1px solid ${theme2.colors.border}`,
|
|
4082
4121
|
borderRadius: theme2.radii[1],
|
|
4083
4122
|
padding: "8px",
|
|
4084
|
-
cursor: isRefreshing ? "
|
|
4123
|
+
cursor: isRefreshing || isLoading ? "default" : "pointer",
|
|
4085
4124
|
display: "flex",
|
|
4086
4125
|
alignItems: "center",
|
|
4087
4126
|
justifyContent: "center",
|