Reorders initialization of in-progress flag to prevent potential race conditions during timed prompt generation
Ensures that the in-progress status is set before stopping existing sequences and generates prompts
Prevents multiple simultaneous timed prompt generations by displaying a notice when an operation is already in progress
Improves user experience by providing clear feedback during concurrent prompt generation attempts
Removes conditional logic for setting the cursor position
after inserting a prompt. Now, the cursor is consistently
placed at the end of the inserted text, regardless of the
previous cursor location. This change ensures consistent behavior
and simplifies the code.
Adds a flag to prevent the timed prompt execution from running concurrently, avoiding potential race conditions and unexpected behavior.
Also, addresses edge case in the status check where the displayed current prompt number could be inaccurate.
- Replace any types with proper Obsidian API types
- Add App type import for better type safety
- Add ButtonComponent type for settings button parameter
- Add null safety for button text content
- Remove redundant "Settings" from settings tab heading
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Ensures prompt notifications display correctly
by adjusting the notification duration based
on the configured delay. Prevents potential overlap
between successive prompts.
- Move inline styles from TypeScript to CSS for better theme compatibility
- Remove "Freewriting" from command names to follow Obsidian conventions
- Fix TypeScript type casting by properly typing model as AnthropicModel
- Update to latest Claude models including Opus 4.1 and Sonnet 4
Changes:
• commands/staggeredPrompts.ts: Replace inline styles with CSS class
• main.ts: Rename commands to "Show Staggered Prompts" and "Add Note Prompts"
• settings.ts: Remove 'as any' cast and update default model
• styles.css: Add .freewriting-prompt-notice class with proper styling
• types.ts: Change model field type from string to AnthropicModel
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Initial implementation of the Freewriting Prompts plugin.
This commit introduces the core functionality for generating
AI-powered writing prompts using Anthropic's Claude API.
It includes:
- API client for interacting with the Anthropic API
- Services for generating and caching prompts
- Commands for displaying staggered prompts and appending prompts to notes
- Settings tab for configuring the plugin