Harden auth/vault path sanitization and clean WeKnora docs

This commit is contained in:
Agent Board
2026-07-28 17:04:27 +08:00
parent 2deaf59f7b
commit 26ff1a9c9a
190 changed files with 13454 additions and 4987 deletions
@@ -1966,7 +1966,7 @@ function startTreeShellRuntime() {
const message = error instanceof Error ? error.message : "创建页面失败";
setStatus(message, "error");
setLastAction("创建页面失败", "error");
window.alert(message);
await window.mnote.alert(message);
}
};
@@ -2040,7 +2040,7 @@ function startTreeShellRuntime() {
setLastAction("重命名失败", "error");
inlineRenameState = { mode: null, id: null, committing: false };
renderTree();
window.alert(message);
await window.mnote.alert(message);
}
};
@@ -2071,7 +2071,7 @@ function startTreeShellRuntime() {
const item = itemById.get(nodeId);
if (!item) return;
const siblings = getSiblings(item.parentNodeId);
const currentIndex = siblings.findIndex((entry) => entry.nodeId === nodeId);
const currentIndex = siblings.findIndex(entry) => entry.nodeId === nodeId);
if (currentIndex === -1) return;
const nextIndex = currentIndex + delta;
if (nextIndex < 0 || nextIndex >= siblings.length) return;
@@ -2099,7 +2099,7 @@ function startTreeShellRuntime() {
const message = error instanceof Error ? error.message : "移动页面失败";
setStatus(message, "error");
setLastAction("移动页面失败", "error");
window.alert(message);
await window.mnote.alert(message);
}
};
@@ -2108,7 +2108,7 @@ function startTreeShellRuntime() {
const targetItem = itemById.get(targetNodeId);
if (!sourceItem || !targetItem) return;
const siblings = getSiblings(targetItem.parentNodeId);
const targetIndex = siblings.findIndex((entry) => entry.nodeId === targetNodeId);
const targetIndex = siblings.findIndex(entry) => entry.nodeId === targetNodeId);
if (targetIndex < 0) return;
try {
const result = await sendCommand({
@@ -2134,7 +2134,7 @@ function startTreeShellRuntime() {
const message = error instanceof Error ? error.message : "拖拽移动失败";
setStatus(message, "error");
setLastAction("拖拽移动失败", "error");
window.alert(message);
await window.mnote.alert(message);
}
};