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

Function openRecent

src/renderer/composables/useCommandPalette.ts:1430–1450  ·  view source on GitHub ↗
(entry: CommandPaletteRecentEntry)

Source from the content-addressed store, hash-verified

1428}
1429
1430async function openRecent(entry: CommandPaletteRecentEntry) {
1431 if (entry.target === 'space') {
1432 await openSpace(entry.targetId as SpaceId)
1433 return
1434 }
1435
1436 if (entry.target === 'snippet') {
1437 const { data } = await api.snippets.getSnippetsById(entry.targetId)
1438 await openSnippet(data as SnippetItemResponse)
1439 return
1440 }
1441
1442 if (entry.target === 'note') {
1443 const { data } = await api.notes.getNotesById(entry.targetId)
1444 await openNote(data as NoteItemResponse)
1445 return
1446 }
1447
1448 const { data } = await api.httpRequests.getHttpRequestsById(entry.targetId)
1449 await openHttpRequest(data)
1450}
1451
1452async function openResult(result: CommandPaletteResult) {
1453 const lastQuery = query.value.trim()

Callers 1

openResultFunction · 0.85

Calls 4

openSpaceFunction · 0.85
openSnippetFunction · 0.85
openNoteFunction · 0.85
openHttpRequestFunction · 0.85

Tested by

no test coverage detected