MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / initServices

Function initServices

src/services/registry.ts:43–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 * 应用启动时调用一次(App.vue 或 main.ts)。
42 */
43export async function initServices(): Promise<void> {
44 if (_initialized) return
45
46 const platform = detectPlatform()
47
48 switch (platform) {
49 case 'electron':
50 await initElectronAdapters()
51 break
52 case 'web-serve':
53 await initWebServeAdapters()
54 break
55 case 'web-browser':
56 await initWebBrowserAdapters()
57 break
58 }
59
60 _initialized = true
61}
62
63/**
64 * Electron adapters: Internal HTTP Server is a hard dependency.

Callers

nothing calls this directly

Calls 4

detectPlatformFunction · 0.85
initElectronAdaptersFunction · 0.85
initWebServeAdaptersFunction · 0.85
initWebBrowserAdaptersFunction · 0.85

Tested by

no test coverage detected