diff --git a/README.md b/README.md index 50aff15..ed8ee6e 100644 --- a/README.md +++ b/README.md @@ -144,10 +144,10 @@ ## Getting Started ## Using Symbolic Links to Test Your Plugin -If you're like us, you have a directory housing all your code projects. To use your plugin as you develop it, create a symbolic link from your dev checkout into your vault's `.obsidian/plugins/` directory. The destination folder name must match the plugin id from `manifest.json` (`image-gin-plugin`): +If you're like us, you have a directory housing all your code projects. To use your plugin as you develop it, create a symbolic link from your dev checkout into your vault's `.obsidian/plugins/` directory. The destination folder name must match the plugin id from `manifest.json` (`image-gin`): ```bash -ln -s /Users/mpstaton/code/lossless-monorepo/image-gin /Users/mpstaton/content-md/lossless/.obsidian/plugins/image-gin-plugin +ln -s /Users/mpstaton/code/lossless-monorepo/image-gin /Users/mpstaton/content-md/lossless/.obsidian/plugins/image-gin ``` Adjust both paths for your own filesystem. After linking, run `pnpm dev` in the dev checkout — esbuild will watch for changes; reload the plugin in Obsidian (toggle off/on in Community Plugins) to pick up new builds. diff --git a/context-v/prompts/Add-New-Model-Provider.md b/context-v/prompts/Add-New-Model-Provider.md new file mode 100644 index 0000000..af80db5 --- /dev/null +++ b/context-v/prompts/Add-New-Model-Provider.md @@ -0,0 +1,4 @@ + + +https://ai.google.dev/gemini-api/docs/imagen + diff --git a/context-v/releases/0.1.1.md b/context-v/releases/0.1.1.md index 9fc574f..680499a 100644 --- a/context-v/releases/0.1.1.md +++ b/context-v/releases/0.1.1.md @@ -201,8 +201,8 @@ ### For users → Enable. **Manually from this release**: download `main.js`, `manifest.json`, -and `styles.css` into `/.obsidian/plugins/image-gin-plugin/`, -then enable the plugin in Settings → Community Plugins. +and `styles.css` into `/.obsidian/plugins/image-gin/`, then +enable the plugin in Settings → Community Plugins. After installation, open **Settings → Community Plugins → Image Gin** to add API keys for the providers you intend to use. Each provider is @@ -230,13 +230,13 @@ # or **macOS / Linux** ```bash ln -s /absolute/path/to/image-gin-plugin \ - /absolute/path/to/your-vault/.obsidian/plugins/image-gin-plugin + /absolute/path/to/your-vault/.obsidian/plugins/image-gin ``` **Windows (PowerShell as admin)** ```powershell New-Item -ItemType SymbolicLink ` - -Path "C:\path\to\your-vault\.obsidian\plugins\image-gin-plugin" ` + -Path "C:\path\to\your-vault\.obsidian\plugins\image-gin" ` -Target "C:\path\to\image-gin-plugin" ``` diff --git a/log.json b/log.json index 600a337..345a834 100644 --- a/log.json +++ b/log.json @@ -550,5 +550,125 @@ "level": "info", "message": "ImageKit upload successful:", "details": "https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/Agent_Standards_square_image_1777836523406_bjIBzfNds.webp" + }, + { + "timestamp": "2026-05-04T02:28:04.749Z", + "level": "info", + "message": "Found image properties:", + "details": [] + }, + { + "timestamp": "2026-05-04T02:28:04.749Z", + "level": "info", + "message": "Found markdown images:", + "details": [ + { + "path": "Visuals/2026-05-02_Perplexed-ask-Perplexity_3.05.02 PM.png", + "match": "![[Visuals/2026-05-02_Perplexed-ask-Perplexity_3.05.02 PM.png]]" + } + ] + }, + { + "timestamp": "2026-05-04T02:28:08.406Z", + "level": "info", + "message": "Uploading to ImageKit:", + "details": { + "fileName": "Perplexed-(Obsidian-Community-Plugin)_content_1777861688405.webp", + "folder": "/uploads/lossless/2025-dec", + "tags": "Perplexed-(Obsidian-Community-Plugin),markdown", + "endpoint": "https://upload.imagekit.io/api/v1/files/upload", + "contentLength": 211171 + } + }, + { + "timestamp": "2026-05-04T02:28:09.012Z", + "level": "info", + "message": "ImageKit upload successful:", + "details": "https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/Perplexed-_Obsidian-Community-Plugin__content_1777861688405_RwUeclHm2.webp" + }, + { + "timestamp": "2026-05-04T02:28:09.012Z", + "level": "info", + "message": "Successfully converted markdown image: https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/Perplexed-_Obsidian-Community-Plugin__content_1777861688405_RwUeclHm2.webp" + }, + { + "timestamp": "2026-05-04T02:30:32.775Z", + "level": "info", + "message": "Found image properties:", + "details": [] + }, + { + "timestamp": "2026-05-04T02:30:32.775Z", + "level": "info", + "message": "Found markdown images:", + "details": [ + { + "path": "Visuals/2026-05-02_Perplexed_Commands-Available_2.48.19 PM.png", + "match": "![[Visuals/2026-05-02_Perplexed_Commands-Available_2.48.19 PM.png]]" + } + ] + }, + { + "timestamp": "2026-05-04T02:30:34.859Z", + "level": "info", + "message": "Uploading to ImageKit:", + "details": { + "fileName": "Perplexed-(Obsidian-Community-Plugin)_content_1777861834858.webp", + "folder": "/uploads/lossless/2025-dec", + "tags": "Perplexed-(Obsidian-Community-Plugin),markdown", + "endpoint": "https://upload.imagekit.io/api/v1/files/upload", + "contentLength": 219120 + } + }, + { + "timestamp": "2026-05-04T02:30:35.532Z", + "level": "info", + "message": "ImageKit upload successful:", + "details": "https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/Perplexed-_Obsidian-Community-Plugin__content_1777861834858_cVAwSGCMV.webp" + }, + { + "timestamp": "2026-05-04T02:30:35.533Z", + "level": "info", + "message": "Successfully converted markdown image: https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/Perplexed-_Obsidian-Community-Plugin__content_1777861834858_cVAwSGCMV.webp" + }, + { + "timestamp": "2026-05-04T03:42:14.239Z", + "level": "info", + "message": "Found image properties:", + "details": [] + }, + { + "timestamp": "2026-05-04T03:42:14.240Z", + "level": "info", + "message": "Found markdown images:", + "details": [ + { + "path": "Visuals/2026-05-03-MemoPop-GUI_Screenshot_4.48.20 PM.png", + "match": "![[Visuals/2026-05-03-MemoPop-GUI_Screenshot_4.48.20 PM.png]]" + } + ] + }, + { + "timestamp": "2026-05-04T03:42:16.156Z", + "level": "info", + "message": "Uploading to ImageKit:", + "details": { + "fileName": "MemoPop AI_content_1777866136156.webp", + "folder": "/uploads/lossless/2025-dec", + "tags": "MemoPop AI,markdown", + "endpoint": "https://upload.imagekit.io/api/v1/files/upload", + "contentLength": 1670366 + } + }, + { + "timestamp": "2026-05-04T03:42:16.975Z", + "level": "info", + "message": "ImageKit upload successful:", + "details": "https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/MemoPop_AI_content_1777866136156_bOoHTyHzX.webp" + }, + { + "timestamp": "2026-05-04T03:42:16.975Z", + "level": "info", + "message": "Successfully converted markdown image: https://ik.imagekit.io/xvpgfijuw/uploads/lossless/2025-dec/MemoPop_AI_content_1777866136156_bOoHTyHzX.webp" } ] \ No newline at end of file diff --git a/main.ts b/main.ts index df52e45..0da0c67 100644 --- a/main.ts +++ b/main.ts @@ -59,7 +59,7 @@ export default class ImageGinPlugin extends Plugin { await this.loadSettings(); // Wire up the file logger so console.* calls in services/modals - // also persist to .obsidian/plugins/image-gin-plugin/log.json. + // also persist to .obsidian/plugins/image-gin/log.json. logger.initialize(this.app.vault); this.addSettingTab(new ImageGinSettingTab(this.app, this)); diff --git a/plugin-config.yaml b/plugin-config.yaml index 8f7104e..92e0606 100644 --- a/plugin-config.yaml +++ b/plugin-config.yaml @@ -3,16 +3,15 @@ plugin: # Plugin identifiers - id: "image-gin-plugin" + id: "image-gin" name: "Image Gin" class_name: "ImageGin" - + # Plugin metadata - version: "0.0.1" - description: "Enables users to use Generative AI to generate contextually relevant images through an [Obsidian](https://obsidian.md) plugin." + version: "0.1.1" + description: "Generate AI images, search stock images, and upload to ImageKit CDN." author: "The Lossless Group" author_url: "https://lossless.group" - funding_url: "https://lossless.group" # Plugin settings min_app_version: "1.8.10" diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 7e35b80..32a1018 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -12,9 +12,10 @@ interface LogEntry { /** * Singleton file logger for Image Gin. * - * Writes to `.obsidian/plugins/image-gin-plugin/log.json` (the plugin's own - * data folder, kept hidden in the vault). Also mirrors every entry to - * console.* so the existing devtools workflow keeps working. + * Writes to `.obsidian/plugins/image-gin/log.json` (the plugin's own + * data folder, matching manifest.json id, kept hidden in the vault). + * Also mirrors every entry to console.* so the existing devtools + * workflow keeps working. * * `initialize(vault)` MUST be called once during plugin onload before any * log calls actually persist; pre-initialize calls fall through to console @@ -25,7 +26,7 @@ export class FileLogger { // Plugin-folder path (matches the directory Obsidian uses for this plugin // per manifest.json id). Kept as a constant so we never accidentally // write a log.json to the user's vault root. - private logFile: string = '.obsidian/plugins/image-gin-plugin/log.json'; + private logFile: string = '.obsidian/plugins/image-gin/log.json'; private vault: Vault | null = null; private logEntries: LogEntry[] = []; private isSaving = false;