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
@@ -14,8 +14,21 @@ export function createSidebarPageAiRuntime(context) {
function openPageAiDrawer() {
// 产品唯一入口:Pi Lab。旧 Hermes/OpenCode/Board drawer 不再打开。
if (window.createSidebarPageAiPiLabRuntime) {
if (typeof window.createSidebarPageAiPiLabRuntime !== 'function') {
console.warn('[page-ai] Pi Lab runtime not loaded');
if (window.mnote && typeof window.mnote.toast === 'function') {
window.mnote.toast('Page AI 运行时未加载', { kind: 'warning' });
}
return;
}
try {
window.createSidebarPageAiPiLabRuntime({});
} catch (err) {
console.error('[page-ai] Pi Lab runtime init failed', err);
if (window.mnote && typeof window.mnote.toast === 'function') {
window.mnote.toast('Page AI 启动失败', { kind: 'error' });
}
return;
}
window.postMessage({ source: 'mnote-sidebar', type: 'mnote:pi-lab-show' }, window.location.origin);
if (pageUiState) pageUiState.pageAiOpen = true;