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

Method openContextInput

src/components/TaskContextMenu.ts:1395–1405  ·  view source on GitHub ↗
(task: TaskInfo, plugin: TaskNotesPlugin)

Source from the content-addressed store, hash-verified

1393 }
1394
1395 private async openContextInput(task: TaskInfo, plugin: TaskNotesPlugin): Promise<void> {
1396 const context = await showTextInputModal(plugin.app, {
1397 title: this.t("contextMenus.task.organization.addContext"),
1398 placeholder: this.t("contextMenus.task.organization.contextPlaceholder"),
1399 confirmText: this.t("common.confirm"),
1400 cancelText: this.t("common.cancel"),
1401 });
1402
1403 if (!context) return;
1404 await this.updateTaskContexts(task, plugin, addContextToList(task.contexts, context));
1405 }
1406
1407 private async updateTaskContexts(
1408 task: TaskInfo,

Callers 1

addContextMenuItemsMethod · 0.95

Calls 4

tMethod · 0.95
updateTaskContextsMethod · 0.95
showTextInputModalFunction · 0.90
addContextToListFunction · 0.85

Tested by

no test coverage detected