(format: TaskCopyFormat)
| 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); |
nothing calls this directly
no test coverage detected