fix: move page ai launcher to pi lab
This commit is contained in:
@@ -12,6 +12,8 @@ const repoRoot = path.resolve(__dirname, '..');
|
||||
// Files to check
|
||||
const files = {
|
||||
runtime: path.join(repoRoot, 'rust/crates/mnote-web/browser/sidebar-page-ai-pi-lab-runtime.js'),
|
||||
legacyPageAiRuntime: path.join(repoRoot, 'rust/crates/mnote-web/browser/sidebar-page-ai-runtime.js'),
|
||||
layout: path.join(repoRoot, 'rust/crates/mnote-web/src/ssr/pages/layout.rs'),
|
||||
route: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi.rs'),
|
||||
mod: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/mod.rs'),
|
||||
webShell: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/web_shell.rs'),
|
||||
@@ -28,6 +30,8 @@ function readFile(p) {
|
||||
}
|
||||
|
||||
const runtime = readFile(files.runtime);
|
||||
const legacyPageAiRuntime = readFile(files.legacyPageAiRuntime);
|
||||
const layout = readFile(files.layout);
|
||||
const route = readFile(files.route);
|
||||
const routesMod = readFile(files.mod);
|
||||
const webShell = readFile(files.webShell);
|
||||
@@ -151,7 +155,11 @@ const checks = [
|
||||
['runtime preserves Omniroute/freefirst as selectable model', runtime.includes("'freefirst'") && runtime.includes('modelControlOptions')],
|
||||
['runtime labels freefirst option as omniroute/freefirst', runtime.includes("name: DEFAULT_MODEL_PROVIDER + '/freefirst'")],
|
||||
['runtime has Pi Lab floating launcher', runtime.includes('data-page-ai-pi-lab-launcher')],
|
||||
['runtime reuses the existing floating AI slot for Pi Lab launcher', runtime.includes('[data-mnote-action="open-page-ai-pi-lab"], [data-testid="wolai-floating-ai"]')],
|
||||
['runtime hides Pi Lab launcher while drawer is active', runtime.includes('piLabLauncherEl.hidden = !!piLabState.active')],
|
||||
['layout maps old floating AI slot to Pi Lab', layout.includes('data-testid="wolai-floating-ai"') && layout.includes('data-mnote-action="open-page-ai-pi-lab"') && layout.includes('{"\\u{03c0}"}')],
|
||||
['layout no longer exposes legacy Page AI/OpenHub action from floating button', !layout.includes('data-mnote-action="open-page-ai"><span')],
|
||||
['legacy Page AI opencode host requires explicit debug opt-in', legacyPageAiRuntime.includes("getItem('mnote.page_ai.opencode_host') === '1'") && !legacyPageAiRuntime.includes("getItem('mnote.page_ai.opencode_host') !== '0' : true")],
|
||||
['runtime documents pi-web-ui evidence', runtime.includes('@earendil-works/pi-web-ui@0.75.3')],
|
||||
['runtime uses MNote-native adapter boundary', runtime.includes('MNote-native adapter')],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user