MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / openAsset

Function openAsset

packages/app-core/src/components/NoteList.tsx:315–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313 const abs = [root.replace(/[\\/]+$/, ''), ...asset.path.split('/').filter(Boolean)].join(sep)
314 const currentDir = asset.path.split('/').slice(0, -1).join('/')
315 const openAsset = async (): Promise<void> => {
316 if (isDatabaseCsvPath(asset.path)) {
317 await openDatabase(asset.path)
318 return
319 }
320 await openNoteInTab(assetTabPath(asset.path))
321 }
322
323 const items: ContextMenuItem[] = [
324 {

Callers

nothing calls this directly

Calls 3

isDatabaseCsvPathFunction · 0.90
assetTabPathFunction · 0.90
openDatabaseFunction · 0.85

Tested by

no test coverage detected