MCPcopy Create free account
hub / github.com/massCodeIO/massCode / initCodeSpace

Function initCodeSpace

src/renderer/composables/useCodeSpaceInit.ts:10–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const { getTags } = useTags()
9
10export async function initCodeSpace(): Promise<void> {
11 const results = await Promise.allSettled([getFolders(), getTags()])
12
13 results.forEach((result) => {
14 if (result.status === 'rejected') {
15 console.error('Code space init error:', result.reason)
16 }
17 })
18
19 isCodeSpaceInitialized.value = results.every(
20 result => result.status === 'fulfilled',
21 )
22
23 if (isCodeSpaceInitialized.value) {
24 await normalizeCodeSelectionState()
25 }
26}

Callers 1

openSnippetDeepLinkFunction · 0.90

Calls 3

getFoldersFunction · 0.70
getTagsFunction · 0.70

Tested by

no test coverage detected