(entry: CommandPaletteRecentEntry)
| 1428 | } |
| 1429 | |
| 1430 | async 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 | |
| 1452 | async function openResult(result: CommandPaletteResult) { |
| 1453 | const lastQuery = query.value.trim() |
no test coverage detected