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

Function openSubtaskSelector

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

Source from the content-addressed store, hash-verified

1150
1151 // Subtask management methods
1152 protected async openSubtaskSelector(): Promise<void> {
1153 await openTaskModalTaskSelector({
1154 plugin: this.plugin,
1155 getCandidates: (allTasks) =>
1156 getTaskModalSubtaskCandidates(
1157 allTasks,
1158 this.selectedSubtaskFiles,
1159 this.getCurrentTaskPath()
1160 ),
1161 onSelect: (subtask) => {
1162 const file = this.app.vault.getAbstractFileByPath(subtask.path);
1163 if (file) {
1164 this.addSubtask(file);
1165 }
1166 },
1167 translate: (key) => this.t(key),
1168 noEligibleTasksMessageKey: "modals.task.organization.notices.noEligibleSubtasks",
1169 openFailedMessageKey: "modals.task.organization.notices.subtaskSelectFailed",
1170 logOperation: "open-subtask-selector",
1171 });
1172 }
1173
1174 protected addSubtask(file: TAbstractFile): void {
1175 const nextSubtaskFiles = addTaskModalSubtaskFile(this.selectedSubtaskFiles, file);

Callers

nothing calls this directly

Calls 5

getCurrentTaskPathMethod · 0.80
getAbstractFileByPathMethod · 0.80
tMethod · 0.45

Tested by

no test coverage detected