同步AGC单窗口原生门禁
禁止普通启动自动打开开发窗口
This commit is contained in:
@@ -2588,22 +2588,14 @@ function assertAiGameCreatorShellUserDevBoundary() {
|
||||
'AI game creator preview must not invoke the external browser',
|
||||
);
|
||||
}
|
||||
const developerWindowCallCount = [
|
||||
...aiGameCreatorShellTauriSource.matchAll(
|
||||
/open_developer_window\(app\.handle\(\)\)\?;/g,
|
||||
),
|
||||
].length;
|
||||
if (
|
||||
!aiGameCreatorShellTauriSource.includes(
|
||||
'#[cfg(all(debug_assertions, not(test)))]\npub(crate) fn open_developer_window(',
|
||||
) ||
|
||||
!/#\[cfg\(all\(debug_assertions, not\(test\)\)\)\]\s+if game_chat_launch\.is_none\(\) \{\s+open_developer_window\(app\.handle\(\)\)\?;\s+\}/u.test(
|
||||
aiGameCreatorShellTauriSource,
|
||||
) ||
|
||||
developerWindowCallCount !== 1
|
||||
aiGameCreatorShellTauriSource.includes('fn open_developer_window(') ||
|
||||
aiGameCreatorShellTauriSource.includes(
|
||||
'open_developer_window(app.handle())?;',
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'AI game creator developer window must stay compile-time debug-only and outside game-chat launch',
|
||||
'AI game creator normal startup must not automatically open a developer window',
|
||||
);
|
||||
}
|
||||
for (const snippet of [
|
||||
|
||||
Reference in New Issue
Block a user