mirror of
https://github.com/bitsofchris/openaugi-obsidian-plugin.git
synced 2026-07-22 05:46:42 +00:00
copy to clipboard context
This commit is contained in:
parent
5777473171
commit
4123d93c4e
1 changed files with 9 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { App, Modal, Setting } from 'obsidian';
|
||||
import { App, Modal, Notice, Setting } from 'obsidian';
|
||||
import { GatheredContext } from '../types/context';
|
||||
|
||||
export class ContextPreviewModal extends Modal {
|
||||
|
|
@ -129,6 +129,14 @@ export class ContextPreviewModal extends Modal {
|
|||
.setButtonText('Back')
|
||||
.onClick(() => this.close())
|
||||
)
|
||||
.addButton(button => button
|
||||
.setButtonText('Copy to Clipboard')
|
||||
.setTooltip('Copy the gathered context to clipboard')
|
||||
.onClick(async () => {
|
||||
await navigator.clipboard.writeText(this.context.aggregatedContent);
|
||||
new Notice('Context copied to clipboard!');
|
||||
})
|
||||
)
|
||||
.addButton(button => button
|
||||
.setButtonText('Save Raw Context')
|
||||
.setTooltip('Save the gathered context as a note without AI processing')
|
||||
|
|
|
|||
Loading…
Reference in a new issue