mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
Native auxiliary windows (settings, comparison, diff, deployment) all booted src/main.tsx, which statically imported the Workbench and every workbench feature (CodeMirror, xterm, editor extensions) even when the Settings window rendered none of them. main.tsx is now a small window-kind router with one boot module per window kind, and the settings pages, core plugin points and plugin theme runtime are registered from editor-free modules, so the Settings window loads no Workbench, @codemirror, @xterm or @/editor modules (about 57% less JS and a third less heap per Settings window). A static test keeps the Settings boot isolated. Part of #3942 Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com>
21 lines
848 B
TypeScript
21 lines
848 B
TypeScript
import type { ComponentType } from "react";
|
|
import { installLocaleSync } from "./features/app/locale";
|
|
import { activateDeploymentWindow, DeploymentWindow } from "./features/deployment/window";
|
|
import { trackRuntimeSettings } from "./features/settings/runtime";
|
|
import { activateDiffViewer } from "./features/vcs/diffViewer";
|
|
import { activateList } from "./windowBoot";
|
|
|
|
/**
|
|
* Sync with Deployed window of project window `parent`: local files next to
|
|
* their copies on a deployment server, with the diff viewer but no workbench.
|
|
*/
|
|
export function bootDeploymentWindow(parent: string): ComponentType {
|
|
activateList("deployment window", [
|
|
["locale", installLocaleSync],
|
|
["settings", trackRuntimeSettings],
|
|
["diff", activateDiffViewer],
|
|
["deployment", () => activateDeploymentWindow(parent)],
|
|
]);
|
|
return DeploymentWindow;
|
|
}
|