Agent Skills: Implement /skills reload (#15865)

This commit is contained in:
N. Taylor Mullen
2026-01-05 15:12:51 -08:00
committed by GitHub
parent 8f0324d868
commit 2cb33b2f76
11 changed files with 468 additions and 9 deletions

View File

@@ -726,6 +726,12 @@ export async function loadCliConfig(
hooks: settings.hooks || {},
projectHooks: projectHooks || {},
onModelChange: (model: string) => saveModelChange(loadedSettings, model),
onReload: async () => {
const refreshedSettings = loadSettings(cwd);
return {
disabledSkills: refreshedSettings.merged.skills?.disabled,
};
},
});
}

View File

@@ -114,6 +114,7 @@ vi.mock('./extension.js');
const mockCoreEvents = vi.hoisted(() => ({
emitFeedback: vi.fn(),
emitSettingsChanged: vi.fn(),
}));
vi.mock('@google/gemini-cli-core', async (importOriginal) => {

View File

@@ -534,6 +534,7 @@ export class LoadedSettings {
setNestedProperty(settingsFile.originalSettings, key, value);
this._merged = this.computeMergedSettings();
saveSettings(settingsFile);
coreEvents.emitSettingsChanged();
}
}