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

Method getContextOptions

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

Source from the content-addressed store, hash-verified

1387 }
1388
1389 private getContextOptions(task: TaskInfo, plugin: TaskNotesPlugin): string[] {
1390 const knownContexts = plugin.cacheManager.getAllContexts?.() ?? [];
1391 const options = normalizeContextList([...knownContexts, ...(task.contexts ?? [])]);
1392 return options.sort((a, b) => a.localeCompare(b));
1393 }
1394
1395 private async openContextInput(task: TaskInfo, plugin: TaskNotesPlugin): Promise<void> {
1396 const context = await showTextInputModal(plugin.app, {

Callers 1

addContextMenuItemsMethod · 0.95

Calls 2

normalizeContextListFunction · 0.85
getAllContextsMethod · 0.80

Tested by

no test coverage detected