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/14414

Vanessa8c0e9369f3ce
diff --git a/app/src/constants.ts b/app/src/constants.ts
index 8e9670491e..dc2e37fdd9 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -232,7 +232,7 @@ export abstract class Constants {
public static readonly TIMEOUT_COUNT = 1000;
// id
- public static readonly HELP_PATH = {
+ public static readonly HELP_PATH: { [key: string]: string } = {
zh_CN: "20210808180117-czj9bvb",
zh_CHT: "20211226090932-5lcq56f",
ja_JP: "20240530133126-axarxgx",
diff --git a/app/src/util/noRelyPCFunction.ts b/app/src/util/noRelyPCFunction.ts
index b07576f396..fd08c25875 100644
--- a/app/src/util/noRelyPCFunction.ts
+++ b/app/src/util/noRelyPCFunction.ts
@@ -61,7 +61,14 @@ export const setLocalShorthandCount = () => {
}
fileElement = (dockFile.data.file as Files).element;
/// #endif
+ const helpIDs: string[] = [];
+ Object.keys(Constants.HELP_PATH).forEach((key) => {
+ helpIDs.push(Constants.HELP_PATH[key]);
+ });
fileElement.childNodes.forEach((item: Element) => {
+ if (item.querySelector('[data-type="addLocal"]') || helpIDs.includes(item.getAttribute("data-url"))) {
+ return;
+ }
item.querySelector('[data-type="more-root"]').insertAdjacentHTML("beforebegin", `<span data-type="addLocal" class="b3-list-item__action">
<svg><use xlink:href="#iconRiffCard"></use></svg>
</span>`);