fix(cli): refresh installed apps after settings changes

This commit is contained in:
Xubin Ren
2026-05-24 19:43:20 +08:00
parent 7a6cc657db
commit 9efdce276f
4 changed files with 91 additions and 3 deletions
@@ -69,6 +69,7 @@ import {
updateSettings,
updateWebSearchSettings,
} from "@/lib/api";
import { notifyCliAppsChanged } from "@/lib/cli-app-events";
import { cn } from "@/lib/utils";
import { useClient } from "@/providers/ClientProvider";
import type {
@@ -626,6 +627,9 @@ export function SettingsView({
try {
const payload = await runCliAppAction(token, action, name);
setCliApps(payload);
if (action !== "test") {
notifyCliAppsChanged(payload);
}
setCliAppsMessage(payload.last_action?.message ?? null);
setCliAppsFocusName(action === "uninstall" ? null : name);
} catch (err) {