@zshuangmu/agenthub 0.4.4 → 0.4.7
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/package.json +1 -1
- package/src/commands/pack.js +1 -1
- package/src/lib/html.js +22 -1
package/package.json
CHANGED
package/src/commands/pack.js
CHANGED
|
@@ -100,7 +100,7 @@ export async function packCommand(options) {
|
|
|
100
100
|
openclawTemplate: template,
|
|
101
101
|
skills: workspaceFiles.skills,
|
|
102
102
|
prompts: workspaceFiles.prompts,
|
|
103
|
-
tags: options.tags ? options.tags.split(",").map((t) => t.trim()) : [],
|
|
103
|
+
tags: options.tags && typeof options.tags === "string" && options.tags.trim() ? options.tags.split(",").map((t) => t.trim()) : [],
|
|
104
104
|
category: options.category,
|
|
105
105
|
version,
|
|
106
106
|
featured: options.featured === true,
|
package/src/lib/html.js
CHANGED
|
@@ -719,6 +719,25 @@ function page(title, body, options = {}) {
|
|
|
719
719
|
transform: translateY(-4px);
|
|
720
720
|
box-shadow: 0 16px 40px rgba(250, 112, 154, 0.15);
|
|
721
721
|
}
|
|
722
|
+
.agent-card-featured {
|
|
723
|
+
border-color: var(--color-1);
|
|
724
|
+
background: linear-gradient(135deg, rgba(250, 112, 154, 0.03), rgba(255, 154, 139, 0.03));
|
|
725
|
+
}
|
|
726
|
+
.agent-card-featured:hover {
|
|
727
|
+
box-shadow: 0 16px 40px rgba(250, 112, 154, 0.25);
|
|
728
|
+
}
|
|
729
|
+
.featured-badge {
|
|
730
|
+
position: absolute;
|
|
731
|
+
top: -8px;
|
|
732
|
+
right: 12px;
|
|
733
|
+
background: linear-gradient(135deg, var(--color-1), var(--color-3));
|
|
734
|
+
color: white;
|
|
735
|
+
padding: 4px 12px;
|
|
736
|
+
border-radius: 12px;
|
|
737
|
+
font-size: 12px;
|
|
738
|
+
font-weight: 600;
|
|
739
|
+
box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
|
|
740
|
+
}
|
|
722
741
|
.agent-header {
|
|
723
742
|
display: flex;
|
|
724
743
|
align-items: flex-start;
|
|
@@ -1469,6 +1488,7 @@ export function renderAgentListPage({ query, agents, totalDownloads, apiBase })
|
|
|
1469
1488
|
const cards = agents.map(agent => {
|
|
1470
1489
|
const tags = agent.metadata?.tags || [];
|
|
1471
1490
|
const category = agent.metadata?.category || 'default';
|
|
1491
|
+
const featured = agent.metadata?.featured;
|
|
1472
1492
|
|
|
1473
1493
|
const tagClass = {
|
|
1474
1494
|
'ops': 'tag-ops',
|
|
@@ -1478,7 +1498,8 @@ export function renderAgentListPage({ query, agents, totalDownloads, apiBase })
|
|
|
1478
1498
|
}[category] || 'tag-default';
|
|
1479
1499
|
|
|
1480
1500
|
return `
|
|
1481
|
-
<article class="agent-card" onclick="window.location='/agents/${agent.slug}'">
|
|
1501
|
+
<article class="agent-card${featured ? ' agent-card-featured' : ''}" onclick="window.location='/agents/${agent.slug}'">
|
|
1502
|
+
${featured ? '<span class="featured-badge">⭐</span>' : ''}
|
|
1482
1503
|
<div class="agent-header">
|
|
1483
1504
|
<a href="/agents/${agent.slug}" class="agent-name" onclick="event.stopPropagation()">${agent.name || agent.slug}</a>
|
|
1484
1505
|
<span class="agent-version">v${agent.version}</span>
|