MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getModalEditorFile

Function getModalEditorFile

src/modals/TaskModal.ts:156–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 }
155
156 protected getModalEditorFile(): Nullable<TFile> {
157 const currentTaskPath = this.getCurrentTaskPath();
158 if (!currentTaskPath) {
159 return this.app.workspace.getActiveFile();
160 }
161
162 const file = this.app.vault.getAbstractFileByPath(currentTaskPath);
163 return file instanceof TFile ? file : this.app.workspace.getActiveFile();
164 }
165
166 protected async openTaskNote(): Promise<void> {
167 // Creation modals do not have an existing task note to open.

Callers

nothing calls this directly

Calls 3

getCurrentTaskPathMethod · 0.80
getActiveFileMethod · 0.80
getAbstractFileByPathMethod · 0.80

Tested by

no test coverage detected