Files
openmotion/scripts/open-template-library.ts
MasonJJ 0972235e1b feat: port installation template library onboarding to main (#325)
* feat: open the template library after installation without creating a project

* fix: return installation template library to the editor on close

* fix: allow template library dismissal when status is unavailable

* fix: preserve main namespace compatibility in ported documentation

* fix: dismiss installation template library without reloading

---------

Co-authored-by: mason6662333 <301978822+mason6662333@users.noreply.github.com>
Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com>
2026-11-13 13:19:41 +08:00

9 lines
497 B
TypeScript

import { WorkspaceStore } from '../workspace.ts';
import { ensureService } from '../preview.ts';
import { templateLibraryPreview } from '../shared/workspace-url.ts';
// Setup can prepare the page even when the current host has not refreshed MCP discovery.
// Starting the headless service never initializes a native project or opens an OS browser.
const service = await ensureService(new WorkspaceStore());
console.log(JSON.stringify(templateLibraryPreview(new URL(service.previewUrl).origin)));