MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / openNote

Function openNote

src/utils/clickHandlers.ts:57–66  ·  view source on GitHub ↗
(newTab = false)

Source from the content-addressed store, hash-verified

55 let clickTimeout: number | null = null;
56
57 const openNote = (newTab = false) => {
58 const file = plugin.app.vault.getAbstractFileByPath(task.path);
59 if (file instanceof TFile) {
60 if (newTab) {
61 void plugin.app.workspace.openLinkText(task.path, "", true);
62 } else {
63 void plugin.app.workspace.getLeaf(false).openFile(file);
64 }
65 }
66 };
67
68 const editTask = async () => {
69 await plugin.openTaskEditModal(task);

Callers 3

handleSingleClickFunction · 0.85
handleDoubleClickFunction · 0.85
handleAuxClickFunction · 0.85

Calls 2

getAbstractFileByPathMethod · 0.80
getLeafMethod · 0.80

Tested by

no test coverage detected