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

Function openHttpRequest

src/renderer/composables/useCommandPalette.ts:1398–1428  ·  view source on GitHub ↗
(request: HttpRequestResult)

Source from the content-addressed store, hash-verified

1396}
1397
1398async function openHttpRequest(request: HttpRequestResult) {
1399 const httpFolders = useHttpFolders()
1400
1401 httpData.isRestoreStateBlocked.value = true
1402 httpSearch.clearSearch(false)
1403 httpApp.focusedFolderId.value = undefined
1404 httpApp.highlightedFolderIds.value.clear()
1405
1406 if (request.folderId) {
1407 await httpFolders.selectHttpFolder(request.folderId, {
1408 ensureVisibility: true,
1409 })
1410 httpApp.httpState.libraryFilter = undefined
1411 }
1412 else {
1413 httpFolders.clearFolderSelection()
1414 httpApp.httpState.libraryFilter = request.isDeleted
1415 ? LibraryFilter.Trash
1416 : LibraryFilter.Inbox
1417 }
1418
1419 await httpData.getHttpRequests(
1420 request.folderId
1421 ? { folderId: request.folderId, isDeleted: request.isDeleted }
1422 : request.isDeleted
1423 ? { isDeleted: 1 }
1424 : { isInbox: 1 },
1425 )
1426 httpData.selectHttpRequest(request.id)
1427 await router.push({ name: RouterName.httpSpace })
1428}
1429
1430async function openRecent(entry: CommandPaletteRecentEntry) {
1431 if (entry.target === 'space') {

Callers 2

openRecentFunction · 0.85
openResultFunction · 0.85

Calls 2

useHttpFoldersFunction · 0.90
clearMethod · 0.45

Tested by

no test coverage detected