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

@@ -188,6 +188,7 @@ export const AppContainer = (props: AppContainerProps) => {
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] =
useState<boolean>(false);
const [historyRemountKey, setHistoryRemountKey] = useState(0);
const [settingsNonce, setSettingsNonce] = useState(0);
const [updateInfo, setUpdateInfo] = useState<UpdateObject | null>(null);
const [isTrustedFolder, setIsTrustedFolder] = useState<boolean | undefined>(
isWorkspaceTrusted(settings.merged).isTrusted,
@@ -368,6 +369,17 @@ export const AppContainer = (props: AppContainerProps) => {
};
}, [config]);
useEffect(() => {
const handleSettingsChanged = () => {
setSettingsNonce((prev) => prev + 1);
};
coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
return () => {
coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
};
}, []);
const { consoleMessages, clearConsoleMessages: clearConsoleMessagesState } =
useConsoleMessages();
@@ -1546,6 +1558,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
bannerData,
bannerVisible,
terminalBackgroundColor: config.getTerminalBackground(),
settingsNonce,
}),
[
isThemeDialogOpen,
@@ -1638,6 +1651,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
bannerData,
bannerVisible,
config,
settingsNonce,
],
);