agentskillsdk 0.4.0 → 0.4.2
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/add.js +2 -6
- package/src/lib/prompt.js +3 -10
package/package.json
CHANGED
package/src/commands/add.js
CHANGED
|
@@ -85,11 +85,7 @@ export async function addCommand(skillName, options) {
|
|
|
85
85
|
} else if (detected.length > 1) {
|
|
86
86
|
// Prompt: all detected vs choose specific
|
|
87
87
|
const choice = await selectPrompt('hvordan vil du installere?', [
|
|
88
|
-
{
|
|
89
|
-
label: 'alle fundne agenter',
|
|
90
|
-
descriptionLines: detected.map(a => a.name),
|
|
91
|
-
value: 'all',
|
|
92
|
-
},
|
|
88
|
+
{ label: `alle fundne agenter (${detected.length})`, value: 'all' },
|
|
93
89
|
{ label: 'vælg specifikke agenter', value: 'choose' },
|
|
94
90
|
]);
|
|
95
91
|
|
|
@@ -126,7 +122,7 @@ export async function addCommand(skillName, options) {
|
|
|
126
122
|
} else {
|
|
127
123
|
// Build hint using first agent (representative)
|
|
128
124
|
const a = agents[0];
|
|
129
|
-
const result = await selectPrompt(
|
|
125
|
+
const result = await selectPrompt(`hvor skal "${installName}" installeres?`, [
|
|
130
126
|
{ label: 'projekt', hint: `(lokalt ${a.folder}/skills/)`, value: 'project' },
|
|
131
127
|
{ label: 'globalt', hint: `(~/${a.globalFolder}/skills/)`, value: 'global' },
|
|
132
128
|
]);
|
package/src/lib/prompt.js
CHANGED
|
@@ -34,19 +34,12 @@ export function selectPrompt(question, choices, { defaultIndex = 0 } = {}) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function render() {
|
|
37
|
-
const lines =
|
|
38
|
-
for (let i = 0; i < choices.length; i++) {
|
|
39
|
-
const c = choices[i];
|
|
37
|
+
const lines = choices.map((c, i) => {
|
|
40
38
|
const marker = i === selected ? chalk.cyan('\u276f') : ' ';
|
|
41
39
|
const label = i === selected ? chalk.cyan(c.label) : c.label;
|
|
42
40
|
const hint = c.hint ? chalk.dim(` ${c.hint}`) : '';
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
for (const dl of c.descriptionLines) {
|
|
46
|
-
lines.push(chalk.dim(` ${dl}`));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
41
|
+
return ` ${marker} ${label}${hint}`;
|
|
42
|
+
});
|
|
50
43
|
lines.push('');
|
|
51
44
|
lines.push(chalk.dim(' ↑↓ naviger · enter vælg · esc tilbage'));
|
|
52
45
|
return lines;
|