fix(skills): remove "Restart required" message from non-interactive commands (#16307)

This commit is contained in:
N. Taylor Mullen
2026-01-10 03:59:38 -08:00
committed by GitHub
parent 461c277bf2
commit 3090008b1c
4 changed files with 5 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ describe('skills disable command', () => {
);
expect(emitConsoleLog).toHaveBeenCalledWith(
'log',
'Skill "skill1" disabled by adding it to the disabled list in user (/user/settings.json) settings. Restart required to take effect.',
'Skill "skill1" disabled by adding it to the disabled list in user (/user/settings.json) settings.',
);
});

View File

@@ -23,13 +23,10 @@ export async function handleDisable(args: DisableArgs) {
const settings = loadSettings(workspaceDir);
const result = disableSkill(settings, name, scope);
let feedback = renderSkillActionFeedback(
const feedback = renderSkillActionFeedback(
result,
(label, path) => `${chalk.bold(label)} (${chalk.dim(path)})`,
);
if (result.status === 'success') {
feedback += ' Restart required to take effect.';
}
debugLogger.log(feedback);
}

View File

@@ -81,7 +81,7 @@ describe('skills enable command', () => {
);
expect(emitConsoleLog).toHaveBeenCalledWith(
'log',
'Skill "skill1" enabled by removing it from the disabled list in user (/user/settings.json) and project (/project/settings.json) settings. Restart required to take effect.',
'Skill "skill1" enabled by removing it from the disabled list in user (/user/settings.json) and project (/project/settings.json) settings.',
);
});
@@ -122,7 +122,7 @@ describe('skills enable command', () => {
);
expect(emitConsoleLog).toHaveBeenCalledWith(
'log',
'Skill "skill1" enabled by removing it from the disabled list in project (/workspace/settings.json) and user (/user/settings.json) settings. Restart required to take effect.',
'Skill "skill1" enabled by removing it from the disabled list in project (/workspace/settings.json) and user (/user/settings.json) settings.',
);
});

View File

@@ -22,13 +22,10 @@ export async function handleEnable(args: EnableArgs) {
const settings = loadSettings(workspaceDir);
const result = enableSkill(settings, name);
let feedback = renderSkillActionFeedback(
const feedback = renderSkillActionFeedback(
result,
(label, path) => `${chalk.bold(label)} (${chalk.dim(path)})`,
);
if (result.status === 'success') {
feedback += ' Restart required to take effect.';
}
debugLogger.log(feedback);
}