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

Function createNoteFromPalette

src/renderer/composables/useCommandPalette.ts:1109–1128  ·  view source on GitHub ↗
(payload?: CommandPaletteCreatePayload)

Source from the content-addressed store, hash-verified

1107}
1108
1109async function createNoteFromPalette(payload?: CommandPaletteCreatePayload) {
1110 const { useNoteFolders } = await import('@/composables/spaces/notes')
1111 const noteFolders = useNoteFolders()
1112 const notesApi = useNotes()
1113
1114 notesApi.isRestoreStateBlocked.value = true
1115 noteSearch.clearSearch(false)
1116 noteFolders.clearFolderSelection()
1117 notesApp.hideNotesViewModes()
1118 notesApp.notesState.libraryFilter = LibraryFilter.Inbox
1119 notesApp.notesState.tagId = undefined
1120 notesApp.focusedFolderId.value = undefined
1121 notesApp.highlightedFolderIds.value.clear()
1122 notesApp.highlightedTagId.value = undefined
1123
1124 await router.push({ name: RouterName.notesSpace })
1125 await notesApi.createNoteAndSelect(
1126 payload?.name ? { name: payload.name } : undefined,
1127 )
1128}
1129
1130async function createHttpRequestFromPalette(
1131 payload?: CommandPaletteCreatePayload,

Callers 1

getCreateFallbackResultFunction · 0.85

Calls 3

useNotesFunction · 0.90
useNoteFoldersFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected