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

Function copyCurrentViewTasks

src/bases/BasesViewBase.ts:690–717  ·  view source on GitHub ↗
(format: TaskCopyFormat)

Source from the content-addressed store, hash-verified

688 }
689
690 private async copyCurrentViewTasks(format: TaskCopyFormat): Promise<void> {
691 try {
692 const app = this.app || this.plugin.app;
693 const result = await copyBasesCurrentViewTasks({
694 dataItems: this.dataAdapter.extractDataItems(),
695 format,
696 identifyTaskNotes: (dataItems) =>
697 identifyTaskNotesFromBasesData(dataItems, this.plugin),
698 filterTasks: (tasks) => this.applySearchFilter(tasks),
699 resolveLinkText: (task) => resolveBasesTaskLinkText(app, task.path),
700 writeText: (text) => navigator.clipboard.writeText(text),
701 });
702
703 if (result.status === "empty") {
704 new Notice("No tasks to copy");
705 return;
706 }
707
708 new Notice(`Copied ${result.count} tasks`);
709 } catch (error) {
710 this.logger.error("Failed to copy current view tasks", {
711 category: "provider",
712 operation: "copy-current-view-tasks",
713 error,
714 });
715 new Notice("Failed to copy tasks");
716 }
717 }
718
719 private getBasesExportTable(): BasesExportTable {
720 return buildBasesExportTable(this.data?.data ?? [], this.dataAdapter);

Callers

nothing calls this directly

Calls 5

resolveBasesTaskLinkTextFunction · 0.90
extractDataItemsMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected