picocode-core 0.9.167 → 0.9.168
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/controller.js +1 -1
- package/src/skills.js +5 -2
package/package.json
CHANGED
package/src/controller.js
CHANGED
|
@@ -496,7 +496,7 @@ export function createController({ boot }) {
|
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
async function refreshProjectIndexes() {
|
|
499
|
-
boot.skills = await createSkillIndex(boot.root).catch(() => boot.skills) ?? boot.skills
|
|
499
|
+
boot.skills = await createSkillIndex(boot.root, { host: boot.hostSkills ?? [] }).catch(() => boot.skills) ?? boot.skills
|
|
500
500
|
boot.commands = await createCommandIndex(boot.root).catch(() => boot.commands) ?? boot.commands
|
|
501
501
|
const scan = await scanUserTools({ cwd: boot.cwd, root: boot.root }).catch(() => ({ tools: [], errors: [] }))
|
|
502
502
|
for (const failure of scan.errors) {
|
package/src/skills.js
CHANGED
|
@@ -136,7 +136,10 @@ Named fields and \`$ARGUMENTS\` may coexist for backwards compatibility.
|
|
|
136
136
|
Commands are rescanned every turn, so a new command appears in the slash menu from the
|
|
137
137
|
next message.`
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
// host skills come from whatever embeds core (a desktop app shipping its
|
|
140
|
+
// own built-ins); they sit between core's built-ins and the user's dirs,
|
|
141
|
+
// so a project skill of the same name still wins
|
|
142
|
+
export async function createSkillIndex(root, { host = [] } = {}) {
|
|
140
143
|
const builtin = [
|
|
141
144
|
{
|
|
142
145
|
name: 'new-tool',
|
|
@@ -160,7 +163,7 @@ export async function createSkillIndex(root) {
|
|
|
160
163
|
const global = await scanDir(globalSkillsDir(), 'global')
|
|
161
164
|
const project = await scanDir(projectSkillsDir(root), 'project')
|
|
162
165
|
const byName = new Map()
|
|
163
|
-
for (const skill of [...builtin, ...global, ...project]) byName.set(skill.name, skill)
|
|
166
|
+
for (const skill of [...builtin, ...host, ...global, ...project]) byName.set(skill.name, skill)
|
|
164
167
|
const skills = [...byName.values()]
|
|
165
168
|
|
|
166
169
|
return {
|