@industry-theme/agent-panels 0.2.36 → 0.2.38
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":"AgenticResourcesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgenticResourcesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgBpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AgenticResourcesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgenticResourcesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgBpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsrB/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/components/AgentCard.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,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;CACrB;AAiCD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"AgentCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/components/AgentCard.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,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;CACrB;AAiCD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqK9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/components/SubagentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,OAAO,CAAC;CACrB;AA4CD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SubagentCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/components/SubagentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,OAAO,CAAC;CACrB;AA4CD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0KpD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -50794,7 +50794,18 @@ const AgentCard = ({ agent, onClick, isSelected }) => {
|
|
|
50794
50794
|
var _a;
|
|
50795
50795
|
const { theme: theme2 } = useTheme();
|
|
50796
50796
|
const sourceBadge = getSourceBadge$1(agent.source);
|
|
50797
|
+
const [pathCopied, setPathCopied] = React2__default.useState(false);
|
|
50797
50798
|
const preview = ((_a = agent.content.split("\n").find((line) => line.trim() && !line.startsWith("#"))) == null ? void 0 : _a.substring(0, 150)) || "No description available";
|
|
50799
|
+
const handleCopyPath = async (e) => {
|
|
50800
|
+
e.stopPropagation();
|
|
50801
|
+
try {
|
|
50802
|
+
await navigator.clipboard.writeText(agent.path);
|
|
50803
|
+
setPathCopied(true);
|
|
50804
|
+
setTimeout(() => setPathCopied(false), 2e3);
|
|
50805
|
+
} catch (err) {
|
|
50806
|
+
console.error("Failed to copy path:", err);
|
|
50807
|
+
}
|
|
50808
|
+
};
|
|
50798
50809
|
return /* @__PURE__ */ jsxs(
|
|
50799
50810
|
"div",
|
|
50800
50811
|
{
|
|
@@ -50813,13 +50824,11 @@ const AgentCard = ({ agent, onClick, isSelected }) => {
|
|
|
50813
50824
|
onMouseEnter: (e) => {
|
|
50814
50825
|
if (!isSelected) {
|
|
50815
50826
|
e.currentTarget.style.borderColor = theme2.colors.textSecondary;
|
|
50816
|
-
e.currentTarget.style.transform = "translateY(-2px)";
|
|
50817
50827
|
}
|
|
50818
50828
|
},
|
|
50819
50829
|
onMouseLeave: (e) => {
|
|
50820
50830
|
if (!isSelected) {
|
|
50821
50831
|
e.currentTarget.style.borderColor = theme2.colors.border;
|
|
50822
|
-
e.currentTarget.style.transform = "translateY(0)";
|
|
50823
50832
|
}
|
|
50824
50833
|
},
|
|
50825
50834
|
children: [
|
|
@@ -50873,13 +50882,33 @@ const AgentCard = ({ agent, onClick, isSelected }) => {
|
|
|
50873
50882
|
/* @__PURE__ */ jsx(
|
|
50874
50883
|
"div",
|
|
50875
50884
|
{
|
|
50885
|
+
onClick: handleCopyPath,
|
|
50876
50886
|
style: {
|
|
50877
50887
|
fontSize: theme2.fontSizes[0],
|
|
50878
|
-
color: theme2.colors.
|
|
50888
|
+
color: pathCopied ? theme2.colors.success : theme2.colors.textMuted,
|
|
50879
50889
|
fontFamily: theme2.fonts.monospace,
|
|
50880
|
-
|
|
50890
|
+
background: pathCopied ? `${theme2.colors.success}15` : theme2.colors.background,
|
|
50891
|
+
padding: "4px 8px",
|
|
50892
|
+
borderRadius: theme2.radii[1],
|
|
50893
|
+
overflow: "hidden",
|
|
50894
|
+
textOverflow: "ellipsis",
|
|
50895
|
+
whiteSpace: "nowrap",
|
|
50896
|
+
cursor: "pointer",
|
|
50897
|
+
transition: "all 0.2s ease",
|
|
50898
|
+
border: `1px solid ${pathCopied ? theme2.colors.success : "transparent"}`
|
|
50899
|
+
},
|
|
50900
|
+
title: pathCopied ? "Copied!" : `Click to copy: ${agent.path}`,
|
|
50901
|
+
onMouseEnter: (e) => {
|
|
50902
|
+
if (!pathCopied) {
|
|
50903
|
+
e.currentTarget.style.background = theme2.colors.backgroundTertiary || theme2.colors.border;
|
|
50904
|
+
}
|
|
50881
50905
|
},
|
|
50882
|
-
|
|
50906
|
+
onMouseLeave: (e) => {
|
|
50907
|
+
if (!pathCopied) {
|
|
50908
|
+
e.currentTarget.style.background = theme2.colors.background;
|
|
50909
|
+
}
|
|
50910
|
+
},
|
|
50911
|
+
children: pathCopied ? "Copied!" : agent.path
|
|
50883
50912
|
}
|
|
50884
50913
|
),
|
|
50885
50914
|
/* @__PURE__ */ jsx(
|
|
@@ -50985,13 +51014,11 @@ const SubagentCard = ({ subagent, onClick, isSelected }) => {
|
|
|
50985
51014
|
onMouseEnter: (e) => {
|
|
50986
51015
|
if (!isSelected) {
|
|
50987
51016
|
e.currentTarget.style.borderColor = theme2.colors.textSecondary;
|
|
50988
|
-
e.currentTarget.style.transform = "translateY(-2px)";
|
|
50989
51017
|
}
|
|
50990
51018
|
},
|
|
50991
51019
|
onMouseLeave: (e) => {
|
|
50992
51020
|
if (!isSelected) {
|
|
50993
51021
|
e.currentTarget.style.borderColor = theme2.colors.border;
|
|
50994
|
-
e.currentTarget.style.transform = "translateY(0)";
|
|
50995
51022
|
}
|
|
50996
51023
|
},
|
|
50997
51024
|
children: [
|
|
@@ -52258,8 +52285,9 @@ const AgenticResourcesPanel = ({
|
|
|
52258
52285
|
const handleRefresh = async () => {
|
|
52259
52286
|
setIsRefreshing(true);
|
|
52260
52287
|
try {
|
|
52288
|
+
const minDelay = new Promise((resolve) => setTimeout(resolve, 600));
|
|
52261
52289
|
if (mode === "agents") {
|
|
52262
|
-
await Promise.all([refreshAgents(), refreshSubagents()]);
|
|
52290
|
+
await Promise.all([refreshAgents(), refreshSubagents(), minDelay]);
|
|
52263
52291
|
} else {
|
|
52264
52292
|
if (events) {
|
|
52265
52293
|
events.emit({
|
|
@@ -52269,8 +52297,7 @@ const AgenticResourcesPanel = ({
|
|
|
52269
52297
|
payload: {}
|
|
52270
52298
|
});
|
|
52271
52299
|
}
|
|
52272
|
-
|
|
52273
|
-
}, 800);
|
|
52300
|
+
await minDelay;
|
|
52274
52301
|
}
|
|
52275
52302
|
} finally {
|
|
52276
52303
|
setIsRefreshing(false);
|
|
@@ -52368,21 +52395,8 @@ const AgenticResourcesPanel = ({
|
|
|
52368
52395
|
}
|
|
52369
52396
|
)
|
|
52370
52397
|
] }),
|
|
52371
|
-
|
|
52372
|
-
"
|
|
52373
|
-
{
|
|
52374
|
-
style: {
|
|
52375
|
-
fontSize: theme2.fontSizes[1],
|
|
52376
|
-
color: theme2.colors.textSecondary,
|
|
52377
|
-
background: theme2.colors.backgroundSecondary,
|
|
52378
|
-
padding: "4px 10px",
|
|
52379
|
-
borderRadius: theme2.radii[1]
|
|
52380
|
-
},
|
|
52381
|
-
children: mode === "agents" ? `${filteredItems.length} ${filteredItems.length === 1 ? "item" : "items"}` : `${filteredSkills.length} ${filteredSkills.length === 1 ? "skill" : "skills"}`
|
|
52382
|
-
}
|
|
52383
|
-
),
|
|
52384
|
-
(mode === "agents" && allItems.length >= 5 || mode === "skills" && skills.length >= 5) && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", flex: "1 1 200px", maxWidth: "400px" }, children: [
|
|
52385
|
-
/* @__PURE__ */ jsxs(
|
|
52398
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", flex: "1 1 200px", maxWidth: "400px" }, children: [
|
|
52399
|
+
(mode === "agents" && allItems.length >= 5 || mode === "skills" && skills.length >= 5) && /* @__PURE__ */ jsxs(
|
|
52386
52400
|
"div",
|
|
52387
52401
|
{
|
|
52388
52402
|
style: {
|
|
@@ -52461,11 +52475,13 @@ const AgenticResourcesPanel = ({
|
|
|
52461
52475
|
border: `1px solid ${theme2.colors.border}`,
|
|
52462
52476
|
borderRadius: theme2.radii[1],
|
|
52463
52477
|
padding: "8px",
|
|
52464
|
-
cursor:
|
|
52478
|
+
cursor: "pointer",
|
|
52465
52479
|
display: "flex",
|
|
52466
52480
|
alignItems: "center",
|
|
52467
52481
|
justifyContent: "center",
|
|
52468
|
-
transition: "all 0.2s ease"
|
|
52482
|
+
transition: "all 0.2s ease",
|
|
52483
|
+
marginLeft: "auto",
|
|
52484
|
+
opacity: isRefreshing ? 0.7 : 1
|
|
52469
52485
|
},
|
|
52470
52486
|
title: mode === "agents" ? "Refresh agents" : "Refresh skills",
|
|
52471
52487
|
children: /* @__PURE__ */ jsx(
|