MCPcopy
hub / github.com/callumalpass/tasknotes / openTaskEditModalForFile

Method openTaskEditModalForFile

src/main.ts:1744–1766  ·  view source on GitHub ↗
(file: TFile, notTaskNotice?: string)

Source from the content-addressed store, hash-verified

1742 }
1743
1744 private async openTaskEditModalForFile(file: TFile, notTaskNotice?: string): Promise<void> {
1745 try {
1746 const taskInfo = await this.cacheManager.getTaskInfo(file.path);
1747 if (!taskInfo) {
1748 new Notice(
1749 notTaskNotice ??
1750 this.i18n.translate("modals.taskEdit.notices.fileMissing", {
1751 path: file.path,
1752 })
1753 );
1754 return;
1755 }
1756
1757 await this.openTaskEditModal(taskInfo);
1758 } catch (error) {
1759 tasknotesLogger.error("Error opening task edit modal from file menu:", {
1760 category: "persistence",
1761 operation: "opening-task-edit-modal-file-menu",
1762 error: error,
1763 });
1764 new Notice(this.i18n.translate("modals.taskEdit.notices.openNoteFailure"));
1765 }
1766 }
1767
1768 private async openQuickActionsForTaskFile(
1769 file: TFile,

Calls 4

openTaskEditModalMethod · 0.95
errorMethod · 0.80
getTaskInfoMethod · 0.65
translateMethod · 0.65

Tested by

no test coverage detected