refactor: split vscode into a dedicated app root

Renders VS Code through its own app entrypoint
Keeps shared app effects focused and reusable
Avoids importing the full desktop app root in VS Code
This commit is contained in:
Bohdan Triapitsyn
2026-05-07 01:31:17 +03:00
parent c902dea89e
commit 4cc2f1bff6
6 changed files with 267 additions and 120 deletions
+4 -3
View File
@@ -60,7 +60,7 @@ const bootstrapConnectionStatus = () => {
bootstrapConnectionStatus();
// Expose panel type globally for App.tsx to conditionally render
// Expose panel type globally for the VS Code app root to conditionally render.
window.__OPENCHAMBER_PANEL_TYPE__ = (window.__VSCODE_CONFIG__?.panelType as PanelType) || 'chat';
const handleConnectionMessage = (event: MessageEvent) => {
@@ -1242,8 +1242,9 @@ onCommand('activeEditorFile', (payload) => {
});
});
import('@/main')
.then(async () => {
import('@openchamber/ui/apps/renderVSCodeApp')
.then(async ({ renderVSCodeApp }) => {
renderVSCodeApp(window.__OPENCHAMBER_RUNTIME_APIS__ ?? createVSCodeAPIs());
await waitForUiMount();
uiMounted = true;
maybeHideLoadingOverlay();