diff options
| author | Adam Malczewski <[email protected]> | 2026-03-29 17:51:22 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-29 17:51:22 +0900 |
| commit | 73c25761f6b879d78ebd8ecddac35881848831db (patch) | |
| tree | 10c3e7e585e44dbd38aeef07295c39d93c9d1fec /src/image-attachments.ts | |
| parent | e8d107e454b3804e089a33ce5fe7c931040d4647 (diff) | |
| download | ai-pulse-obsidian-plugin-main.tar.gz ai-pulse-obsidian-plugin-main.zip | |
Diffstat (limited to 'src/image-attachments.ts')
| -rw-r--r-- | src/image-attachments.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/image-attachments.ts b/src/image-attachments.ts new file mode 100644 index 0000000..add2afd --- /dev/null +++ b/src/image-attachments.ts @@ -0,0 +1,24 @@ +export interface ImageAttachment { + base64: string; + mimeType: string; + originalName: string; + arrayBuffer: ArrayBuffer; +} + +let currentAttachments: ImageAttachment[] = []; + +export function setCurrentAttachments(attachments: ImageAttachment[]): void { + currentAttachments = attachments; +} + +export function getCurrentAttachments(): ImageAttachment[] { + return currentAttachments; +} + +export function clearCurrentAttachments(): void { + currentAttachments = []; +} + +export function hasCurrentAttachments(): boolean { + return currentAttachments.length > 0; +} |
