@cocorograph/hub-agent 0.6.9 → 0.6.10
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/skills.mjs +6 -0
package/package.json
CHANGED
package/src/skills.mjs
CHANGED
|
@@ -52,6 +52,10 @@ function extractFrontmatter(text) {
|
|
|
52
52
|
if (nameMatch) out.name = nameMatch[1].trim()
|
|
53
53
|
const descMatch = fm.match(/^description:\s*["']?(.*)["']?\s*$/m)
|
|
54
54
|
if (descMatch) out.description = descMatch[1].replace(/^["']|["']$/g, "").trim()
|
|
55
|
+
// label_ja: cockpit chat の SkillBar / サジェストに出す日本語ボタンラベル。
|
|
56
|
+
// 無ければ表示側で `/name` にフォールバック (送信は常に `/name`)。
|
|
57
|
+
const labelMatch = fm.match(/^label_ja:\s*["']?(.*?)["']?\s*$/m)
|
|
58
|
+
if (labelMatch) out.label_ja = labelMatch[1].replace(/^["']|["']$/g, "").trim()
|
|
55
59
|
return out
|
|
56
60
|
}
|
|
57
61
|
|
|
@@ -80,6 +84,7 @@ async function loadSkillsDir(skillsDir, source) {
|
|
|
80
84
|
out.push({
|
|
81
85
|
name: fm.name || e.name,
|
|
82
86
|
description: fm.description || "",
|
|
87
|
+
...(fm.label_ja ? { label: fm.label_ja } : {}),
|
|
83
88
|
source,
|
|
84
89
|
})
|
|
85
90
|
}
|
|
@@ -103,6 +108,7 @@ async function loadCommandsDir(commandsDir, source) {
|
|
|
103
108
|
out.push({
|
|
104
109
|
name: fm.name || f.replace(/\.md$/, ""),
|
|
105
110
|
description: fm.description || "",
|
|
111
|
+
...(fm.label_ja ? { label: fm.label_ja } : {}),
|
|
106
112
|
source,
|
|
107
113
|
})
|
|
108
114
|
}
|