buszk / obsidian-ai-editor

MIT License
22 stars 6 forks source link

Fix: Default LLM Model Selection Fails to Persist After Closing Settings #5

Closed shengdade closed 9 months ago

shengdade commented 9 months ago

The Fix

When I change the default LLM model in the settings, it does not appear to save. Each time I close the settings and return, it reverts to the original default.

Changes

🔨 refactor(settings.ts): reorder imports for better readability 🐛 fix(settings.ts): use plugin.settings.defaultModel instead of DEFAULT_MODEL to ensure correct model is used 🔨 refactor(settings.ts): remove explicit boolean type from cta parameter in addButton method for cleaner code