Expand validateSettings() to check all critical settings before
processing, not just the API key:
API Key validation:
- Check for empty or whitespace-only values
- Validate format (must start with 'sk-' for OpenAI keys)
Output folder validation:
- Check for empty or whitespace-only values
- Reject paths with invalid filesystem characters (<>:"|?*\x00-\x1f)
Model validation:
- Ensure model is in the list of valid options (gpt-4o-mini, gpt-4o)
- Catches manually edited or corrupted settings
This prevents cryptic errors later in execution by catching configuration
issues early with clear, actionable error messages for users.
Fixes H5 (Incomplete settings validation) from CODE_REVIEW.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Move loading notice creation inside confirmation callback so it's only
shown after user confirms the action. Previously the notice reference
was created before confirmation, which could cause issues.
Improve status bar to reflect actual plugin state:
- Set to "Processing..." when work starts
- Set to "Ready" on success
- Set to "Error" on failure
- Remove status update from finally block to allow proper error state
This ensures users get accurate feedback about what the plugin is doing
and eliminates the bug where status always showed "Ready" even after errors.
Fixes H2 (Notice management bug) and H3 (Status bar always "Ready")
from CODE_REVIEW.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive try-catch error handling around OpenAI API calls with
specific error messages for common failure scenarios:
- Invalid API key (401)
- Rate limiting (429)
- Model not found (404)
- Invalid request/content too long (400)
- Network errors (ENOTFOUND, ECONNREFUSED)
- Generic API errors with message passthrough
Remove redundant API key validation from OpenAIService - validation is
already handled in main.ts before service instantiation, eliminating
inconsistent error handling pattern (returning empty string vs throwing).
Update APIError type to include status and code fields, and mark as
deprecated since errors are now thrown as standard Error objects with
user-friendly messages.
Fixes H1 (Missing error handling) and H4 (Inconsistent API key check)
from CODE_REVIEW.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The getUniqueTitle() method was checking for duplicate titles but never
adding titles to the usedTitles Set, making duplicate prevention completely
ineffective. This caused file creation failures when OpenAI generated
multiple notes with identical titles.
Fix: Add title to usedTitles Set after generating unique name.
Fixes critical issue C1 from CODE_REVIEW.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update @types/node from 16.18.126 to 24.7.2
- Update builtin-modules from 3.3.0 to 5.0.0
- Update esbuild from 0.25.1 to 0.25.10
- Update obsidian from 1.8.7 to 1.10.0
- Update tslib from 2.4.0 to 2.8.1
- Update typescript from 4.9.5 to 5.9.3
- Update openai from 4.87.3 to 6.3.0 (major version upgrade)
- Fix critical security vulnerability in form-data dependency
All dependencies tested and build passes successfully.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>