fix(cli): allow skipping skill dependency installs
This commit is contained in:
@@ -95,16 +95,26 @@ export async function setupSkills(
|
|||||||
const toInstall = guardCancel(
|
const toInstall = guardCancel(
|
||||||
await multiselect({
|
await multiselect({
|
||||||
message: "Install missing skill dependencies",
|
message: "Install missing skill dependencies",
|
||||||
options: installable.map((skill) => ({
|
options: [
|
||||||
|
{
|
||||||
|
value: "__skip__",
|
||||||
|
label: "Skip for now",
|
||||||
|
hint: "Continue without installing dependencies",
|
||||||
|
},
|
||||||
|
...installable.map((skill) => ({
|
||||||
value: skill.name,
|
value: skill.name,
|
||||||
label: `${skill.emoji ?? "🧩"} ${skill.name}`,
|
label: `${skill.emoji ?? "🧩"} ${skill.name}`,
|
||||||
hint: skill.install[0]?.label ?? "install",
|
hint: skill.install[0]?.label ?? "install",
|
||||||
})),
|
})),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
runtime,
|
runtime,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const name of toInstall as string[]) {
|
const selected = (toInstall as string[]).filter(
|
||||||
|
(name) => name !== "__skip__",
|
||||||
|
);
|
||||||
|
for (const name of selected) {
|
||||||
const target = installable.find((s) => s.name === name);
|
const target = installable.find((s) => s.name === name);
|
||||||
if (!target || target.install.length === 0) continue;
|
if (!target || target.install.length === 0) continue;
|
||||||
const installId = target.install[0]?.id;
|
const installId = target.install[0]?.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user