Commit graph

40 commits

Author SHA1 Message Date
Zac
8453d64cf1
Merge pull request #10 from x3c3/fix/comprehensive-validation
Add comprehensive settings validation
2025-12-06 17:48:01 -05:00
Zac
9bbf663c50
Merge pull request #9 from x3c3/fix/notice-management
Fix notice management and improve status bar updates
2025-12-06 17:47:13 -05:00
Zac
e3a9162081
Merge pull request #8 from x3c3/fix/error-handling
Improve error handling for OpenAI API calls
2025-12-06 17:46:53 -05:00
Zac
2b5d2a72bf
Merge pull request #7 from x3c3/fix/duplicate-title-bug
Fix critical bug: usedTitles Set never populated
2025-12-06 17:46:22 -05:00
Zac
76c9493702
Merge pull request #6 from x3c3/update-dependencies
Update dependencies
2025-12-06 17:45:59 -05:00
Mark Ayers
12cee2c49b
Delete .claude.md 2025-10-13 00:11:51 -04:00
Mark Ayers
bf417172b8 Add comprehensive settings validation
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>
2025-10-12 19:52:04 -04:00
Mark Ayers
2e16a3c11e Fix notice management and improve status bar updates
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>
2025-10-12 19:47:23 -04:00
Mark Ayers
1bdc85e085 Improve error handling for OpenAI API calls
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>
2025-10-12 19:44:23 -04:00
Mark Ayers
a476ad6cd1 Fix critical bug: usedTitles Set never populated
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>
2025-10-12 19:41:53 -04:00
Mark Ayers
8ced324cd9 Update all dependencies to latest versions
- 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>
2025-10-12 19:36:43 -04:00
Zac
635b1c6421 New release - Linkback to source notes, by @philoserf - PR 5 2025-03-18 13:59:19 -04:00
Zac
bb96ce9792
Merge pull request #5 from x3c3/linkback
Linkback
2025-03-18 13:46:16 -04:00
Mark Ayers
fd7fd6af07
Merge branch 'Binxly:master' into linkback 2025-03-17 14:55:04 -04:00
Zac
60a1264ba3 version v1.1.0 - refactor, improved dependency management, removal of unused code, improved naming consistency 2025-03-17 14:54:20 -04:00
Zac
8841867dd2
Merge pull request #4 from x3c3/exploration
Code Refactoring and Organization Improvements
2025-03-17 14:41:38 -04:00
Mark Ayers
3aca21e2cb Add a link back to the original 2025-03-13 02:09:02 -04:00
Mark Ayers
13bab9c252 Reorganize the code for better maintenance 2025-03-13 01:30:00 -04:00
Mark Ayers
81ef5be35c Add cleanup 2025-03-13 01:19:39 -04:00
Mark Ayers
00ab550777 Improve the name of our time handling code 2025-03-13 01:17:22 -04:00
Mark Ayers
98c7b8935a If it has a name do not give it another. We are Atomizer. 2025-03-13 01:14:10 -04:00
Mark Ayers
a883626295 Remove more unused 2025-03-13 01:07:41 -04:00
Mark Ayers
903abef7b3 Modernize tsconfig with related code changes 2025-03-13 01:06:02 -04:00
Mark Ayers
a377391b34 Remove the unused 2025-03-13 00:59:55 -04:00
Mark Ayers
229e45f156 Bump deps 2025-03-13 00:44:23 -04:00
Mark Ayers
f0c22d65b0 Reformat files with tools 2025-03-13 00:44:01 -04:00
Zac
f7bae47850
Update README.md 2025-02-12 11:15:43 -05:00
Zac
f1bbca2197
Update README.md 2025-01-07 18:32:08 -05:00
Zac
1dd96e3769 Update version number 2025-01-04 23:06:17 -05:00
Zac
9103e16a6f Add release workflow 2025-01-04 23:04:29 -05:00
Zac
9446e682cd Removal of sanitizeTitle wrapper method, calling normalizePath from obsidian api directly 2025-01-04 22:40:28 -05:00
Zac
f10eed259d Use normalizePath function from Obsidian API instead of sanitizer function; Various UI edits, using sentence case 2025-01-04 20:28:28 -05:00
Zac
dcc2593cfb
Update README.md 2024-12-04 21:01:01 -05:00
Zac
603bc8ff71
Update README.md 2024-12-04 20:56:19 -05:00
Zac
a68271a8d9 revert 2024-12-04 20:33:37 -05:00
Zac
88b30431a3 update api key input box to be password type 2024-12-04 20:23:10 -05:00
Zac
a66fd8354e manifest.json 2024-12-04 20:16:37 -05:00
Zac
d662d3ae3f final v1.0.0 2024-12-04 20:12:26 -05:00
Zac
94cbd32e43 Initial commit 2024-12-04 19:20:09 -05:00
Zac
634c0da550
Initial commit 2024-12-04 19:07:41 -05:00