Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14377

Vanessa6d3b7777ac3b
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index 51edf7b90d..a2bdb09c11 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -16,7 +16,7 @@ import {Plugin} from "../plugin";
import {App} from "../index";
import {escapeAttr} from "../util/escape";
import {uninstall} from "../plugin/uninstall";
-import {afterLoadPlugin, loadPlugin, loadPlugins} from "../plugin/loader";
+import {afterLoadPlugin, loadPlugin, loadPlugins, reloadPlugin} from "../plugin/loader";
import {loadAssets} from "../util/assets";
import {addScript} from "../protyle/util/addScript";
@@ -797,6 +797,16 @@ export const bazaar = {
} else {
(document.getElementById("themeStyle") as HTMLLinkElement).href = `/appearance/themes/${currentTheme}/theme.css?v=${response.data.appearance.themeVer}`;
}
+ } else if (bazaarType === "plugins") {
+ app.plugins.find((item: Plugin) => {
+ if (item.name === dataObj.name) {
+ reloadPlugin(app, {
+ upsertPlugins: [dataObj.name],
+ removePlugins: []
+ });
+ return true;
+ }
+ });
}
});
});