@industry-theme/agent-panels 0.2.24 → 0.2.26
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.bundle.js
CHANGED
|
@@ -51483,6 +51483,686 @@ const AgentDetailPanel = ({
|
|
|
51483
51483
|
}
|
|
51484
51484
|
return null;
|
|
51485
51485
|
};
|
|
51486
|
+
const AgenticResourcesPanel = ({
|
|
51487
|
+
context,
|
|
51488
|
+
events
|
|
51489
|
+
}) => {
|
|
51490
|
+
const { theme: theme2 } = useTheme();
|
|
51491
|
+
const panelRef = useRef(null);
|
|
51492
|
+
const [mode, setMode] = useState("agents");
|
|
51493
|
+
const [selectedItemId, setSelectedItemId] = useState(null);
|
|
51494
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
51495
|
+
const [agentFilter, setAgentFilter] = useState("documentation");
|
|
51496
|
+
const [skillFilter, setSkillFilter] = useState("project");
|
|
51497
|
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
51498
|
+
const {
|
|
51499
|
+
agents,
|
|
51500
|
+
isLoading: agentsLoading,
|
|
51501
|
+
error: agentsError,
|
|
51502
|
+
refreshAgents
|
|
51503
|
+
} = useAgentsData({ context });
|
|
51504
|
+
const {
|
|
51505
|
+
subagents,
|
|
51506
|
+
isLoading: subagentsLoading,
|
|
51507
|
+
error: subagentsError,
|
|
51508
|
+
refreshSubagents
|
|
51509
|
+
} = useSubagentsData({ context });
|
|
51510
|
+
const {
|
|
51511
|
+
skills,
|
|
51512
|
+
isLoading: skillsLoading,
|
|
51513
|
+
error: skillsError,
|
|
51514
|
+
refreshSkills
|
|
51515
|
+
} = useSkillsData({ context });
|
|
51516
|
+
const isLoading = mode === "agents" ? agentsLoading || subagentsLoading : skillsLoading;
|
|
51517
|
+
const error = mode === "agents" ? agentsError || subagentsError : skillsError;
|
|
51518
|
+
gt("agentic-resources", events, () => {
|
|
51519
|
+
var _a;
|
|
51520
|
+
return (_a = panelRef.current) == null ? void 0 : _a.focus();
|
|
51521
|
+
});
|
|
51522
|
+
useEffect(() => {
|
|
51523
|
+
if (mode !== "skills") return;
|
|
51524
|
+
const unsubscribeInstalled = events.on("skill:installed", () => {
|
|
51525
|
+
console.log("[AgenticResourcesPanel] Skill installed, refreshing...");
|
|
51526
|
+
refreshSkills();
|
|
51527
|
+
});
|
|
51528
|
+
const unsubscribeUninstalled = events.on("skill:uninstalled", () => {
|
|
51529
|
+
console.log("[AgenticResourcesPanel] Skill uninstalled, refreshing...");
|
|
51530
|
+
refreshSkills();
|
|
51531
|
+
});
|
|
51532
|
+
return () => {
|
|
51533
|
+
unsubscribeInstalled();
|
|
51534
|
+
unsubscribeUninstalled();
|
|
51535
|
+
};
|
|
51536
|
+
}, [events, mode, refreshSkills]);
|
|
51537
|
+
const allItems = useMemo(() => {
|
|
51538
|
+
const items = [];
|
|
51539
|
+
agents.forEach((agent) => {
|
|
51540
|
+
items.push({ type: "agent", data: agent });
|
|
51541
|
+
});
|
|
51542
|
+
subagents.forEach((subagent) => {
|
|
51543
|
+
items.push({ type: "subagent", data: subagent });
|
|
51544
|
+
});
|
|
51545
|
+
return items;
|
|
51546
|
+
}, [agents, subagents]);
|
|
51547
|
+
const filteredItems = useMemo(() => {
|
|
51548
|
+
let filtered = allItems;
|
|
51549
|
+
if (agentFilter === "documentation") {
|
|
51550
|
+
filtered = filtered.filter((item) => item.type === "agent");
|
|
51551
|
+
} else {
|
|
51552
|
+
filtered = filtered.filter((item) => item.type === "subagent");
|
|
51553
|
+
}
|
|
51554
|
+
if (searchQuery.trim()) {
|
|
51555
|
+
const query = searchQuery.toLowerCase().trim();
|
|
51556
|
+
filtered = filtered.filter((item) => {
|
|
51557
|
+
if (item.type === "agent") {
|
|
51558
|
+
const agent = item.data;
|
|
51559
|
+
if (agent.name.toLowerCase().includes(query)) return true;
|
|
51560
|
+
if (agent.path.toLowerCase().includes(query)) return true;
|
|
51561
|
+
if (agent.content.toLowerCase().includes(query)) return true;
|
|
51562
|
+
return false;
|
|
51563
|
+
} else {
|
|
51564
|
+
const subagent = item.data;
|
|
51565
|
+
if (subagent.name.toLowerCase().includes(query)) return true;
|
|
51566
|
+
if (subagent.path.toLowerCase().includes(query)) return true;
|
|
51567
|
+
if (subagent.frontmatter.description.toLowerCase().includes(query)) return true;
|
|
51568
|
+
if (subagent.prompt.toLowerCase().includes(query)) return true;
|
|
51569
|
+
return false;
|
|
51570
|
+
}
|
|
51571
|
+
});
|
|
51572
|
+
}
|
|
51573
|
+
return filtered;
|
|
51574
|
+
}, [allItems, searchQuery, agentFilter]);
|
|
51575
|
+
const hasRepository = useMemo(() => {
|
|
51576
|
+
const fileTreeSlice = context.getSlice("fileTree");
|
|
51577
|
+
return !!(fileTreeSlice == null ? void 0 : fileTreeSlice.data);
|
|
51578
|
+
}, [context]);
|
|
51579
|
+
const filteredSkills = useMemo(() => {
|
|
51580
|
+
let filtered = skills;
|
|
51581
|
+
if (skillFilter === "project") {
|
|
51582
|
+
filtered = filtered.filter((skill) => {
|
|
51583
|
+
if (skill.installedLocations && skill.installedLocations.length > 0) {
|
|
51584
|
+
return skill.installedLocations.some(
|
|
51585
|
+
(loc) => loc.source === "project-universal" || loc.source === "project-claude" || loc.source === "project-other"
|
|
51586
|
+
);
|
|
51587
|
+
}
|
|
51588
|
+
return skill.source === "project-universal" || skill.source === "project-claude" || skill.source === "project-other";
|
|
51589
|
+
});
|
|
51590
|
+
} else if (skillFilter === "global") {
|
|
51591
|
+
filtered = filtered.filter((skill) => {
|
|
51592
|
+
if (skill.installedLocations && skill.installedLocations.length > 0) {
|
|
51593
|
+
return skill.installedLocations.some(
|
|
51594
|
+
(loc) => loc.source === "global-universal" || loc.source === "global-claude"
|
|
51595
|
+
);
|
|
51596
|
+
}
|
|
51597
|
+
return skill.source === "global-universal" || skill.source === "global-claude";
|
|
51598
|
+
});
|
|
51599
|
+
}
|
|
51600
|
+
if (searchQuery.trim()) {
|
|
51601
|
+
const query = searchQuery.toLowerCase().trim();
|
|
51602
|
+
filtered = filtered.filter((skill) => {
|
|
51603
|
+
var _a, _b;
|
|
51604
|
+
if (skill.name.toLowerCase().includes(query)) return true;
|
|
51605
|
+
if ((_a = skill.description) == null ? void 0 : _a.toLowerCase().includes(query)) return true;
|
|
51606
|
+
if ((_b = skill.capabilities) == null ? void 0 : _b.some((cap2) => cap2.toLowerCase().includes(query))) return true;
|
|
51607
|
+
if (skill.path.toLowerCase().includes(query)) return true;
|
|
51608
|
+
return false;
|
|
51609
|
+
});
|
|
51610
|
+
}
|
|
51611
|
+
return filtered;
|
|
51612
|
+
}, [skills, searchQuery, skillFilter]);
|
|
51613
|
+
const handleItemClick = (item) => {
|
|
51614
|
+
const itemId = item.type === "agent" ? item.data.id : item.data.id;
|
|
51615
|
+
setSelectedItemId(itemId);
|
|
51616
|
+
if (events) {
|
|
51617
|
+
events.emit({
|
|
51618
|
+
type: item.type === "agent" ? "agent:selected" : "subagent:selected",
|
|
51619
|
+
source: "agentic-resources-panel",
|
|
51620
|
+
timestamp: Date.now(),
|
|
51621
|
+
payload: {
|
|
51622
|
+
id: itemId,
|
|
51623
|
+
type: item.type,
|
|
51624
|
+
data: item.data
|
|
51625
|
+
}
|
|
51626
|
+
});
|
|
51627
|
+
}
|
|
51628
|
+
};
|
|
51629
|
+
const handleSkillClick = (skill) => {
|
|
51630
|
+
setSelectedItemId(skill.id);
|
|
51631
|
+
if (events) {
|
|
51632
|
+
events.emit({
|
|
51633
|
+
type: "skill:selected",
|
|
51634
|
+
source: "agentic-resources-panel",
|
|
51635
|
+
timestamp: Date.now(),
|
|
51636
|
+
payload: { skillId: skill.id, skill }
|
|
51637
|
+
});
|
|
51638
|
+
}
|
|
51639
|
+
};
|
|
51640
|
+
const handleRefresh = async () => {
|
|
51641
|
+
setIsRefreshing(true);
|
|
51642
|
+
try {
|
|
51643
|
+
if (mode === "agents") {
|
|
51644
|
+
await Promise.all([refreshAgents(), refreshSubagents()]);
|
|
51645
|
+
} else {
|
|
51646
|
+
if (events) {
|
|
51647
|
+
events.emit({
|
|
51648
|
+
type: "skills:refresh",
|
|
51649
|
+
source: "agentic-resources-panel",
|
|
51650
|
+
timestamp: Date.now(),
|
|
51651
|
+
payload: {}
|
|
51652
|
+
});
|
|
51653
|
+
}
|
|
51654
|
+
setTimeout(() => {
|
|
51655
|
+
}, 800);
|
|
51656
|
+
}
|
|
51657
|
+
} finally {
|
|
51658
|
+
setIsRefreshing(false);
|
|
51659
|
+
}
|
|
51660
|
+
};
|
|
51661
|
+
const handleModeChange = (newMode) => {
|
|
51662
|
+
setMode(newMode);
|
|
51663
|
+
setSearchQuery("");
|
|
51664
|
+
setSelectedItemId(null);
|
|
51665
|
+
};
|
|
51666
|
+
const agentsCount = agents.length;
|
|
51667
|
+
const subagentsCount = subagents.length;
|
|
51668
|
+
return /* @__PURE__ */ jsxs(
|
|
51669
|
+
"div",
|
|
51670
|
+
{
|
|
51671
|
+
ref: panelRef,
|
|
51672
|
+
tabIndex: -1,
|
|
51673
|
+
style: {
|
|
51674
|
+
padding: "clamp(12px, 3vw, 20px)",
|
|
51675
|
+
fontFamily: theme2.fonts.body,
|
|
51676
|
+
height: "100%",
|
|
51677
|
+
boxSizing: "border-box",
|
|
51678
|
+
display: "flex",
|
|
51679
|
+
flexDirection: "column",
|
|
51680
|
+
gap: "16px",
|
|
51681
|
+
overflow: "hidden",
|
|
51682
|
+
backgroundColor: theme2.colors.background,
|
|
51683
|
+
color: theme2.colors.text,
|
|
51684
|
+
outline: "none"
|
|
51685
|
+
},
|
|
51686
|
+
children: [
|
|
51687
|
+
/* @__PURE__ */ jsxs(
|
|
51688
|
+
"div",
|
|
51689
|
+
{
|
|
51690
|
+
style: {
|
|
51691
|
+
flexShrink: 0,
|
|
51692
|
+
display: "flex",
|
|
51693
|
+
alignItems: "center",
|
|
51694
|
+
justifyContent: "space-between",
|
|
51695
|
+
gap: "12px",
|
|
51696
|
+
flexWrap: "wrap"
|
|
51697
|
+
},
|
|
51698
|
+
children: [
|
|
51699
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "4px", background: theme2.colors.backgroundSecondary, padding: "4px", borderRadius: theme2.radii[2], border: `1px solid ${theme2.colors.border}` }, children: [
|
|
51700
|
+
/* @__PURE__ */ jsxs(
|
|
51701
|
+
"button",
|
|
51702
|
+
{
|
|
51703
|
+
onClick: () => handleModeChange("agents"),
|
|
51704
|
+
style: {
|
|
51705
|
+
padding: "6px 14px",
|
|
51706
|
+
fontSize: theme2.fontSizes[1],
|
|
51707
|
+
fontFamily: theme2.fonts.body,
|
|
51708
|
+
border: "none",
|
|
51709
|
+
borderRadius: theme2.radii[1],
|
|
51710
|
+
background: mode === "agents" ? theme2.colors.background : "transparent",
|
|
51711
|
+
color: mode === "agents" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
51712
|
+
cursor: "pointer",
|
|
51713
|
+
display: "flex",
|
|
51714
|
+
alignItems: "center",
|
|
51715
|
+
gap: "6px",
|
|
51716
|
+
fontWeight: mode === "agents" ? 600 : 400,
|
|
51717
|
+
transition: "all 0.2s ease",
|
|
51718
|
+
boxShadow: mode === "agents" ? "0 1px 3px rgba(0,0,0,0.1)" : "none"
|
|
51719
|
+
},
|
|
51720
|
+
children: [
|
|
51721
|
+
/* @__PURE__ */ jsx(Bot, { size: 14 }),
|
|
51722
|
+
"Agents"
|
|
51723
|
+
]
|
|
51724
|
+
}
|
|
51725
|
+
),
|
|
51726
|
+
/* @__PURE__ */ jsxs(
|
|
51727
|
+
"button",
|
|
51728
|
+
{
|
|
51729
|
+
onClick: () => handleModeChange("skills"),
|
|
51730
|
+
style: {
|
|
51731
|
+
padding: "6px 14px",
|
|
51732
|
+
fontSize: theme2.fontSizes[1],
|
|
51733
|
+
fontFamily: theme2.fonts.body,
|
|
51734
|
+
border: "none",
|
|
51735
|
+
borderRadius: theme2.radii[1],
|
|
51736
|
+
background: mode === "skills" ? theme2.colors.background : "transparent",
|
|
51737
|
+
color: mode === "skills" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
51738
|
+
cursor: "pointer",
|
|
51739
|
+
display: "flex",
|
|
51740
|
+
alignItems: "center",
|
|
51741
|
+
gap: "6px",
|
|
51742
|
+
fontWeight: mode === "skills" ? 600 : 400,
|
|
51743
|
+
transition: "all 0.2s ease",
|
|
51744
|
+
boxShadow: mode === "skills" ? "0 1px 3px rgba(0,0,0,0.1)" : "none"
|
|
51745
|
+
},
|
|
51746
|
+
children: [
|
|
51747
|
+
/* @__PURE__ */ jsx(Wrench, { size: 14 }),
|
|
51748
|
+
"Skills"
|
|
51749
|
+
]
|
|
51750
|
+
}
|
|
51751
|
+
)
|
|
51752
|
+
] }),
|
|
51753
|
+
!isLoading && (mode === "agents" && allItems.length > 0 || mode === "skills" && skills.length > 0) && /* @__PURE__ */ jsx(
|
|
51754
|
+
"span",
|
|
51755
|
+
{
|
|
51756
|
+
style: {
|
|
51757
|
+
fontSize: theme2.fontSizes[1],
|
|
51758
|
+
color: theme2.colors.textSecondary,
|
|
51759
|
+
background: theme2.colors.backgroundSecondary,
|
|
51760
|
+
padding: "4px 10px",
|
|
51761
|
+
borderRadius: theme2.radii[1]
|
|
51762
|
+
},
|
|
51763
|
+
children: mode === "agents" ? `${filteredItems.length} ${filteredItems.length === 1 ? "item" : "items"}` : `${filteredSkills.length} ${filteredSkills.length === 1 ? "skill" : "skills"}`
|
|
51764
|
+
}
|
|
51765
|
+
),
|
|
51766
|
+
(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: [
|
|
51767
|
+
/* @__PURE__ */ jsxs(
|
|
51768
|
+
"div",
|
|
51769
|
+
{
|
|
51770
|
+
style: {
|
|
51771
|
+
position: "relative",
|
|
51772
|
+
flex: 1,
|
|
51773
|
+
minWidth: "150px"
|
|
51774
|
+
},
|
|
51775
|
+
children: [
|
|
51776
|
+
/* @__PURE__ */ jsx(
|
|
51777
|
+
Search,
|
|
51778
|
+
{
|
|
51779
|
+
size: 16,
|
|
51780
|
+
color: theme2.colors.textSecondary,
|
|
51781
|
+
style: {
|
|
51782
|
+
position: "absolute",
|
|
51783
|
+
left: "10px",
|
|
51784
|
+
top: "50%",
|
|
51785
|
+
transform: "translateY(-50%)",
|
|
51786
|
+
pointerEvents: "none"
|
|
51787
|
+
}
|
|
51788
|
+
}
|
|
51789
|
+
),
|
|
51790
|
+
/* @__PURE__ */ jsx(
|
|
51791
|
+
"input",
|
|
51792
|
+
{
|
|
51793
|
+
type: "text",
|
|
51794
|
+
placeholder: mode === "agents" ? "Search agents..." : "Search skills...",
|
|
51795
|
+
value: searchQuery,
|
|
51796
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
51797
|
+
style: {
|
|
51798
|
+
width: "100%",
|
|
51799
|
+
padding: "8px 32px 8px 32px",
|
|
51800
|
+
fontSize: theme2.fontSizes[1],
|
|
51801
|
+
fontFamily: theme2.fonts.body,
|
|
51802
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
51803
|
+
borderRadius: theme2.radii[2],
|
|
51804
|
+
background: theme2.colors.backgroundSecondary,
|
|
51805
|
+
color: theme2.colors.text,
|
|
51806
|
+
outline: "none",
|
|
51807
|
+
boxSizing: "border-box"
|
|
51808
|
+
}
|
|
51809
|
+
}
|
|
51810
|
+
),
|
|
51811
|
+
searchQuery && /* @__PURE__ */ jsx(
|
|
51812
|
+
"button",
|
|
51813
|
+
{
|
|
51814
|
+
onClick: () => setSearchQuery(""),
|
|
51815
|
+
style: {
|
|
51816
|
+
position: "absolute",
|
|
51817
|
+
right: "6px",
|
|
51818
|
+
top: "50%",
|
|
51819
|
+
transform: "translateY(-50%)",
|
|
51820
|
+
background: "transparent",
|
|
51821
|
+
border: "none",
|
|
51822
|
+
padding: "4px",
|
|
51823
|
+
cursor: "pointer",
|
|
51824
|
+
display: "flex",
|
|
51825
|
+
alignItems: "center",
|
|
51826
|
+
justifyContent: "center",
|
|
51827
|
+
color: theme2.colors.textSecondary
|
|
51828
|
+
},
|
|
51829
|
+
"aria-label": "Clear search",
|
|
51830
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
51831
|
+
}
|
|
51832
|
+
)
|
|
51833
|
+
]
|
|
51834
|
+
}
|
|
51835
|
+
),
|
|
51836
|
+
/* @__PURE__ */ jsx(
|
|
51837
|
+
"button",
|
|
51838
|
+
{
|
|
51839
|
+
onClick: handleRefresh,
|
|
51840
|
+
disabled: isRefreshing || isLoading,
|
|
51841
|
+
style: {
|
|
51842
|
+
background: theme2.colors.backgroundSecondary,
|
|
51843
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
51844
|
+
borderRadius: theme2.radii[1],
|
|
51845
|
+
padding: "8px",
|
|
51846
|
+
cursor: isRefreshing ? "wait" : "pointer",
|
|
51847
|
+
display: "flex",
|
|
51848
|
+
alignItems: "center",
|
|
51849
|
+
justifyContent: "center",
|
|
51850
|
+
transition: "all 0.2s ease"
|
|
51851
|
+
},
|
|
51852
|
+
title: mode === "agents" ? "Refresh agents" : "Refresh skills",
|
|
51853
|
+
children: /* @__PURE__ */ jsx(
|
|
51854
|
+
RefreshCw,
|
|
51855
|
+
{
|
|
51856
|
+
size: 16,
|
|
51857
|
+
color: theme2.colors.textSecondary,
|
|
51858
|
+
style: {
|
|
51859
|
+
animation: isRefreshing ? "spin 1s linear infinite" : "none"
|
|
51860
|
+
}
|
|
51861
|
+
}
|
|
51862
|
+
)
|
|
51863
|
+
}
|
|
51864
|
+
)
|
|
51865
|
+
] })
|
|
51866
|
+
]
|
|
51867
|
+
}
|
|
51868
|
+
),
|
|
51869
|
+
mode === "agents" ? /* @__PURE__ */ jsxs(
|
|
51870
|
+
"div",
|
|
51871
|
+
{
|
|
51872
|
+
style: {
|
|
51873
|
+
flexShrink: 0,
|
|
51874
|
+
display: "flex",
|
|
51875
|
+
gap: "8px"
|
|
51876
|
+
},
|
|
51877
|
+
children: [
|
|
51878
|
+
/* @__PURE__ */ jsxs(
|
|
51879
|
+
"button",
|
|
51880
|
+
{
|
|
51881
|
+
onClick: () => setAgentFilter("documentation"),
|
|
51882
|
+
style: {
|
|
51883
|
+
flex: 1,
|
|
51884
|
+
padding: "8px 16px",
|
|
51885
|
+
fontSize: theme2.fontSizes[1],
|
|
51886
|
+
fontFamily: theme2.fonts.body,
|
|
51887
|
+
border: `1px solid ${agentFilter === "documentation" ? theme2.colors.primary : theme2.colors.border}`,
|
|
51888
|
+
borderRadius: theme2.radii[1],
|
|
51889
|
+
background: agentFilter === "documentation" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
|
|
51890
|
+
color: agentFilter === "documentation" ? theme2.colors.primary : theme2.colors.text,
|
|
51891
|
+
cursor: "pointer",
|
|
51892
|
+
display: "flex",
|
|
51893
|
+
alignItems: "center",
|
|
51894
|
+
justifyContent: "center",
|
|
51895
|
+
gap: "6px",
|
|
51896
|
+
fontWeight: agentFilter === "documentation" ? 600 : 400,
|
|
51897
|
+
transition: "all 0.2s ease"
|
|
51898
|
+
},
|
|
51899
|
+
children: [
|
|
51900
|
+
/* @__PURE__ */ jsx(BookOpen, { size: 14 }),
|
|
51901
|
+
"Main Agent (",
|
|
51902
|
+
agentsCount,
|
|
51903
|
+
")"
|
|
51904
|
+
]
|
|
51905
|
+
}
|
|
51906
|
+
),
|
|
51907
|
+
/* @__PURE__ */ jsxs(
|
|
51908
|
+
"button",
|
|
51909
|
+
{
|
|
51910
|
+
onClick: () => setAgentFilter("subagents"),
|
|
51911
|
+
style: {
|
|
51912
|
+
flex: 1,
|
|
51913
|
+
padding: "8px 16px",
|
|
51914
|
+
fontSize: theme2.fontSizes[1],
|
|
51915
|
+
fontFamily: theme2.fonts.body,
|
|
51916
|
+
border: `1px solid ${agentFilter === "subagents" ? theme2.colors.primary : theme2.colors.border}`,
|
|
51917
|
+
borderRadius: theme2.radii[1],
|
|
51918
|
+
background: agentFilter === "subagents" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
|
|
51919
|
+
color: agentFilter === "subagents" ? theme2.colors.primary : theme2.colors.text,
|
|
51920
|
+
cursor: "pointer",
|
|
51921
|
+
display: "flex",
|
|
51922
|
+
alignItems: "center",
|
|
51923
|
+
justifyContent: "center",
|
|
51924
|
+
gap: "6px",
|
|
51925
|
+
fontWeight: agentFilter === "subagents" ? 600 : 400,
|
|
51926
|
+
transition: "all 0.2s ease"
|
|
51927
|
+
},
|
|
51928
|
+
children: [
|
|
51929
|
+
/* @__PURE__ */ jsx(Bot, { size: 14 }),
|
|
51930
|
+
"Subagents (",
|
|
51931
|
+
subagentsCount,
|
|
51932
|
+
")"
|
|
51933
|
+
]
|
|
51934
|
+
}
|
|
51935
|
+
)
|
|
51936
|
+
]
|
|
51937
|
+
}
|
|
51938
|
+
) : hasRepository && /* @__PURE__ */ jsxs(
|
|
51939
|
+
"div",
|
|
51940
|
+
{
|
|
51941
|
+
style: {
|
|
51942
|
+
flexShrink: 0,
|
|
51943
|
+
display: "flex",
|
|
51944
|
+
gap: "8px"
|
|
51945
|
+
},
|
|
51946
|
+
children: [
|
|
51947
|
+
/* @__PURE__ */ jsx(
|
|
51948
|
+
"button",
|
|
51949
|
+
{
|
|
51950
|
+
onClick: () => setSkillFilter("project"),
|
|
51951
|
+
style: {
|
|
51952
|
+
flex: 1,
|
|
51953
|
+
padding: "8px 16px",
|
|
51954
|
+
fontSize: theme2.fontSizes[1],
|
|
51955
|
+
fontFamily: theme2.fonts.body,
|
|
51956
|
+
border: `1px solid ${skillFilter === "project" ? theme2.colors.primary : theme2.colors.border}`,
|
|
51957
|
+
borderRadius: theme2.radii[1],
|
|
51958
|
+
background: skillFilter === "project" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
|
|
51959
|
+
color: skillFilter === "project" ? theme2.colors.primary : theme2.colors.text,
|
|
51960
|
+
cursor: "pointer",
|
|
51961
|
+
display: "flex",
|
|
51962
|
+
alignItems: "center",
|
|
51963
|
+
justifyContent: "center",
|
|
51964
|
+
gap: "6px",
|
|
51965
|
+
fontWeight: skillFilter === "project" ? 600 : 400,
|
|
51966
|
+
transition: "all 0.2s ease"
|
|
51967
|
+
},
|
|
51968
|
+
children: "Project"
|
|
51969
|
+
}
|
|
51970
|
+
),
|
|
51971
|
+
/* @__PURE__ */ jsx(
|
|
51972
|
+
"button",
|
|
51973
|
+
{
|
|
51974
|
+
onClick: () => setSkillFilter("global"),
|
|
51975
|
+
style: {
|
|
51976
|
+
flex: 1,
|
|
51977
|
+
padding: "8px 16px",
|
|
51978
|
+
fontSize: theme2.fontSizes[1],
|
|
51979
|
+
fontFamily: theme2.fonts.body,
|
|
51980
|
+
border: `1px solid ${skillFilter === "global" ? theme2.colors.primary : theme2.colors.border}`,
|
|
51981
|
+
borderRadius: theme2.radii[1],
|
|
51982
|
+
background: skillFilter === "global" ? `${theme2.colors.primary}15` : theme2.colors.backgroundSecondary,
|
|
51983
|
+
color: skillFilter === "global" ? theme2.colors.primary : theme2.colors.text,
|
|
51984
|
+
cursor: "pointer",
|
|
51985
|
+
display: "flex",
|
|
51986
|
+
alignItems: "center",
|
|
51987
|
+
justifyContent: "center",
|
|
51988
|
+
gap: "6px",
|
|
51989
|
+
fontWeight: skillFilter === "global" ? 600 : 400,
|
|
51990
|
+
transition: "all 0.2s ease"
|
|
51991
|
+
},
|
|
51992
|
+
children: "Global"
|
|
51993
|
+
}
|
|
51994
|
+
)
|
|
51995
|
+
]
|
|
51996
|
+
}
|
|
51997
|
+
),
|
|
51998
|
+
error && /* @__PURE__ */ jsxs(
|
|
51999
|
+
"div",
|
|
52000
|
+
{
|
|
52001
|
+
style: {
|
|
52002
|
+
flexShrink: 0,
|
|
52003
|
+
padding: "12px",
|
|
52004
|
+
background: `${theme2.colors.error}20`,
|
|
52005
|
+
border: `1px solid ${theme2.colors.error}`,
|
|
52006
|
+
borderRadius: theme2.radii[2],
|
|
52007
|
+
display: "flex",
|
|
52008
|
+
alignItems: "center",
|
|
52009
|
+
gap: "8px",
|
|
52010
|
+
color: theme2.colors.error,
|
|
52011
|
+
fontSize: theme2.fontSizes[1]
|
|
52012
|
+
},
|
|
52013
|
+
children: [
|
|
52014
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
|
|
52015
|
+
/* @__PURE__ */ jsx("span", { children: error })
|
|
52016
|
+
]
|
|
52017
|
+
}
|
|
52018
|
+
),
|
|
52019
|
+
/* @__PURE__ */ jsx(
|
|
52020
|
+
"div",
|
|
52021
|
+
{
|
|
52022
|
+
style: {
|
|
52023
|
+
flex: 1,
|
|
52024
|
+
overflowY: "auto",
|
|
52025
|
+
minHeight: 0
|
|
52026
|
+
},
|
|
52027
|
+
children: mode === "agents" ? (
|
|
52028
|
+
// Agents view
|
|
52029
|
+
isLoading ? /* @__PURE__ */ jsx(
|
|
52030
|
+
"div",
|
|
52031
|
+
{
|
|
52032
|
+
style: {
|
|
52033
|
+
height: "100%",
|
|
52034
|
+
display: "flex",
|
|
52035
|
+
alignItems: "center",
|
|
52036
|
+
justifyContent: "center",
|
|
52037
|
+
color: theme2.colors.textSecondary,
|
|
52038
|
+
fontSize: theme2.fontSizes[2]
|
|
52039
|
+
},
|
|
52040
|
+
children: "Loading agents..."
|
|
52041
|
+
}
|
|
52042
|
+
) : filteredItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
52043
|
+
"div",
|
|
52044
|
+
{
|
|
52045
|
+
style: {
|
|
52046
|
+
height: "100%",
|
|
52047
|
+
display: "flex",
|
|
52048
|
+
flexDirection: "column",
|
|
52049
|
+
alignItems: "center",
|
|
52050
|
+
justifyContent: "center",
|
|
52051
|
+
gap: "16px",
|
|
52052
|
+
color: theme2.colors.textSecondary,
|
|
52053
|
+
padding: "24px"
|
|
52054
|
+
},
|
|
52055
|
+
children: [
|
|
52056
|
+
/* @__PURE__ */ jsx(FileCode, { size: 48, color: theme2.colors.border }),
|
|
52057
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
52058
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: theme2.fontSizes[2] }, children: searchQuery ? "No agents match your search" : "No agents found" }),
|
|
52059
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "8px 0 0 0", fontSize: theme2.fontSizes[1] }, children: searchQuery ? "Try a different search term" : "Add AGENTS.md or create subagents in .claude/agents/ to get started" })
|
|
52060
|
+
] })
|
|
52061
|
+
]
|
|
52062
|
+
}
|
|
52063
|
+
) : /* @__PURE__ */ jsx(
|
|
52064
|
+
"div",
|
|
52065
|
+
{
|
|
52066
|
+
style: {
|
|
52067
|
+
display: "grid",
|
|
52068
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
|
|
52069
|
+
gap: "16px",
|
|
52070
|
+
padding: "4px"
|
|
52071
|
+
},
|
|
52072
|
+
children: filteredItems.map((item) => {
|
|
52073
|
+
if (item.type === "agent") {
|
|
52074
|
+
return /* @__PURE__ */ jsx(
|
|
52075
|
+
AgentCard,
|
|
52076
|
+
{
|
|
52077
|
+
agent: item.data,
|
|
52078
|
+
onClick: () => handleItemClick(item),
|
|
52079
|
+
isSelected: selectedItemId === item.data.id
|
|
52080
|
+
},
|
|
52081
|
+
item.data.id
|
|
52082
|
+
);
|
|
52083
|
+
} else {
|
|
52084
|
+
return /* @__PURE__ */ jsx(
|
|
52085
|
+
SubagentCard,
|
|
52086
|
+
{
|
|
52087
|
+
subagent: item.data,
|
|
52088
|
+
onClick: () => handleItemClick(item),
|
|
52089
|
+
isSelected: selectedItemId === item.data.id
|
|
52090
|
+
},
|
|
52091
|
+
item.data.id
|
|
52092
|
+
);
|
|
52093
|
+
}
|
|
52094
|
+
})
|
|
52095
|
+
}
|
|
52096
|
+
)
|
|
52097
|
+
) : (
|
|
52098
|
+
// Skills view
|
|
52099
|
+
isLoading ? /* @__PURE__ */ jsx(
|
|
52100
|
+
"div",
|
|
52101
|
+
{
|
|
52102
|
+
style: {
|
|
52103
|
+
height: "100%",
|
|
52104
|
+
display: "flex",
|
|
52105
|
+
alignItems: "center",
|
|
52106
|
+
justifyContent: "center",
|
|
52107
|
+
color: theme2.colors.textSecondary,
|
|
52108
|
+
fontSize: theme2.fontSizes[2]
|
|
52109
|
+
},
|
|
52110
|
+
children: "Loading skills..."
|
|
52111
|
+
}
|
|
52112
|
+
) : filteredSkills.length === 0 ? /* @__PURE__ */ jsxs(
|
|
52113
|
+
"div",
|
|
52114
|
+
{
|
|
52115
|
+
style: {
|
|
52116
|
+
height: "100%",
|
|
52117
|
+
display: "flex",
|
|
52118
|
+
flexDirection: "column",
|
|
52119
|
+
alignItems: "center",
|
|
52120
|
+
justifyContent: "center",
|
|
52121
|
+
gap: "16px",
|
|
52122
|
+
color: theme2.colors.textSecondary,
|
|
52123
|
+
padding: "24px"
|
|
52124
|
+
},
|
|
52125
|
+
children: [
|
|
52126
|
+
/* @__PURE__ */ jsx(FileCode, { size: 48, color: theme2.colors.border }),
|
|
52127
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
52128
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: theme2.fontSizes[2] }, children: searchQuery ? "No skills match your search" : "No skills found" }),
|
|
52129
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "8px 0 0 0", fontSize: theme2.fontSizes[1] }, children: searchQuery ? "Try a different search term" : "Add SKILL.md files to your repository to get started" })
|
|
52130
|
+
] })
|
|
52131
|
+
]
|
|
52132
|
+
}
|
|
52133
|
+
) : /* @__PURE__ */ jsx(
|
|
52134
|
+
"div",
|
|
52135
|
+
{
|
|
52136
|
+
style: {
|
|
52137
|
+
display: "grid",
|
|
52138
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
|
|
52139
|
+
gap: "16px",
|
|
52140
|
+
padding: "4px"
|
|
52141
|
+
},
|
|
52142
|
+
children: filteredSkills.map((skill) => /* @__PURE__ */ jsx(
|
|
52143
|
+
SkillCard,
|
|
52144
|
+
{
|
|
52145
|
+
skill,
|
|
52146
|
+
onClick: handleSkillClick,
|
|
52147
|
+
isSelected: selectedItemId === skill.id,
|
|
52148
|
+
filterContext: skillFilter
|
|
52149
|
+
},
|
|
52150
|
+
skill.id
|
|
52151
|
+
))
|
|
52152
|
+
}
|
|
52153
|
+
)
|
|
52154
|
+
)
|
|
52155
|
+
}
|
|
52156
|
+
),
|
|
52157
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
52158
|
+
@keyframes spin {
|
|
52159
|
+
to { transform: rotate(360deg); }
|
|
52160
|
+
}
|
|
52161
|
+
` })
|
|
52162
|
+
]
|
|
52163
|
+
}
|
|
52164
|
+
);
|
|
52165
|
+
};
|
|
51486
52166
|
const panels = [
|
|
51487
52167
|
{
|
|
51488
52168
|
metadata: {
|
|
@@ -51608,6 +52288,31 @@ const panels = [
|
|
|
51608
52288
|
onUnmount: async (_context) => {
|
|
51609
52289
|
console.log("Agent Detail Panel unmounting");
|
|
51610
52290
|
}
|
|
52291
|
+
},
|
|
52292
|
+
{
|
|
52293
|
+
metadata: {
|
|
52294
|
+
id: "industry-theme.agentic-resources",
|
|
52295
|
+
name: "Agentic Resources",
|
|
52296
|
+
icon: "🔧",
|
|
52297
|
+
version: "0.1.0",
|
|
52298
|
+
author: "Principal ADE",
|
|
52299
|
+
description: "Unified panel for both Agents and Skills with mode toggle",
|
|
52300
|
+
slices: ["fileTree", "globalAgents", "globalSubagents", "globalSkills"]
|
|
52301
|
+
// Data slices this panel depends on
|
|
52302
|
+
},
|
|
52303
|
+
component: AgenticResourcesPanel,
|
|
52304
|
+
// Optional: Called when this specific panel is mounted
|
|
52305
|
+
onMount: async (context) => {
|
|
52306
|
+
var _a;
|
|
52307
|
+
console.log(
|
|
52308
|
+
"Agentic Resources Panel mounted",
|
|
52309
|
+
(_a = context.currentScope.repository) == null ? void 0 : _a.path
|
|
52310
|
+
);
|
|
52311
|
+
},
|
|
52312
|
+
// Optional: Called when this specific panel is unmounted
|
|
52313
|
+
onUnmount: async (_context) => {
|
|
52314
|
+
console.log("Agentic Resources Panel unmounting");
|
|
52315
|
+
}
|
|
51611
52316
|
}
|
|
51612
52317
|
];
|
|
51613
52318
|
const onPackageLoad = async () => {
|
|
@@ -51617,6 +52322,7 @@ const onPackageUnload = async () => {
|
|
|
51617
52322
|
console.log("Panel package unloading - Agent Panels Extension");
|
|
51618
52323
|
};
|
|
51619
52324
|
export {
|
|
52325
|
+
AgenticResourcesPanel,
|
|
51620
52326
|
SkillsBrowsePanel,
|
|
51621
52327
|
onPackageLoad,
|
|
51622
52328
|
onPackageUnload,
|