Cleans up the interface by eliminating an unnecessary
heading for freewriting prompts, enhancing the user
experience by reducing clutter in the settings panel.
Updates capitalization in command names and settings labels to enhance
UI consistency. Replaces element creation with a standardized heading
approach for setting sections, ensuring a cohesive design throughout
the plugin settings interface. Fixes element reference inconsistency.
Improves user experience by providing clear and uniform interface
elements.
Adjusts notification duration calculation to improve timing precision for different delay intervals
Ensures consistent minimum notification display time while preventing potential overlap or flickering
Recomputes pagination first and last IDs after sorting models to ensure consistent
ID references match the sorted array order.
Prevents potential misalignment between sorted model list and pagination metadata
Adjusts notification display duration calculation for more predictable behavior
Improves timing logic for prompts with different delay intervals:
- Ensures notifications end 500ms before next tick for delays >1s
- Maintains minimum 300ms display time to prevent flickering
- Keeps existing logic for short delay intervals
Prevents potential formatting issues by ensuring prompts are single-line and trimmed
Collapses multiple whitespaces and trims prompt text to maintain clean, uniform list rendering in markdown output
Improves user input validation for settings by:
- Adding min/max range limits to numeric settings
- Enforcing input type as number for better UX
- Ensures settings inputs have appropriate constraints
Validates timed count, delay, and note prompt settings with specific numeric ranges
Enhances API ping check to handle multiple text content blocks
Modifies response text extraction to:
- Process all text content blocks
- Support multiple text segments
- Normalize and validate ping response more comprehensively
Increases reliability of API connection verification
Enhances notification display logic to prevent flicker and ensure minimum visibility
- Adds floor of 0 for delay milliseconds to prevent negative values
- Ensures minimum notification duration of 300ms to improve user experience
- Maintains existing logic for longer delay times
Adds sorting for model dropdown to ensure consistent user experience across sessions
Enhances prompt extraction by supporting more list prefix formats, improving robustness of text parsing
Refactors cursor handling to use setCursor instead of setSelection when collapsing selections
Improves timestamp generation by using environment's default locale automatically instead of manually specifying language
Enhances code clarity and simplifies locale handling for timestamp formatting
Clears model cache when API key changes to ensure accurate model list access
Prevents potential issues with stale model entitlements when switching API keys programmatically
Improves model dropdown handling with debounced settings save
Adds model list cache clearing functionality
Handles edge cases for model availability and selection
Introduces more robust error handling for model dropdowns
Provides user control over model list refreshing
Extracts common model fetching logic into shared method to prevent duplicate API calls
Improves error handling and caching for model retrieval by:
- Creating a centralized fetchWithDeduplication method
- Adding model type filtering in cache update
- Resetting fallback notice flag during cache clearing
Enhances reliability of model list retrieval across multiple service methods
Adds robust pagination handling for Anthropic model retrieval:
- Implements duplicate model filtering
- Adds iteration limit to prevent infinite loops
- Introduces cursor advancement validation
- Fixes potential API pagination edge cases
Ensures more reliable and predictable model list retrieval
Prevents duplicate API calls by tracking in-flight requests
Ensures consistent prompt generation under high concurrency
Mitigates potential race conditions in prompt retrieval
Improves performance and reliability of prompt generation service
Updates model type to use ModelId type for stronger type safety
Improves hardcoded model list with TODO for keeping it current
Removes outdated comments and simplifies model list annotations
Prepares for more dynamic model handling with explicit update guidance
Refines notification display timing logic to prevent flickering and ensure smoother user experience
Adjusts notification duration calculation for short delays, using a more nuanced approach that:
- Caps notification time at 900ms or delay-100ms for very short intervals
- Maintains existing behavior for longer delays
Centralizes API base URL and version configuration for improved maintainability
Adds constants for API base URL and version to prevent potential drift
Normalizes API version header usage across request methods
Improves ping validation to handle variations in response text
Supports more robust and consistent API client configuration
Introduces debounce mechanism for settings saves to reduce unnecessary disk writes
Refactors settings change handlers to:
- Improve performance by debouncing save operations
- Simplify async method handling
- Prevent excessive API calls and disk writes
- Add more robust handling of model loading and settings updates
Enhances user experience by minimizing unnecessary background operations
Uses the user's preferred language locale for timestamp formatting, enhancing regional customization and user experience
Allows automatic fallback to 'en-US' if navigator language is unavailable
Adds comprehensive error handling for plugin data loading to prevent potential startup failures
Implements graceful fallback to default settings when data loading fails or is corrupted
Ensures plugin can initialize even with invalid or missing persistent data
Separates model cache extraction to prevent type drift and improve data integrity
Adds deduplication of concurrent API calls to prevent redundant requests
Enhances error handling by preferring stale cache over hardcoded fallback models
Introduces new getStaleCacheModels method to provide more robust model retrieval
Prevents multiple simultaneous model fetch attempts with in-flight request tracking
Updates ESLint configuration to:
- Use latest globals for Node.js and browser environments
- Enable type-aware TypeScript ESLint rules
- Improve parser and ecmaVersion settings
- Add explicit TypeScript ESLint plugin
Increases code quality and type safety for the project
Enhances execution flow to prevent race conditions during async prompt generation
Refines inProgress flag management to ensure reliable concurrent execution:
- Sets flag before async work begins
- Guarantees flag reset in finally block
- Prevents potential state inconsistencies during rapid command triggers
Clarifies code comments explaining concurrency protection mechanism
Enhances model selection resilience by adding detailed fallback notifications
Adds model ID check before changing default model to prevent unnecessary updates
Improves user experience with more informative model unavailability notices
Removes redundant API key update and settings save operations
Supports dynamic model management on model refresh
Improves settings loading and saving by preventing model cache merging and tracking API key changes
Prevents type drift in settings by destructuring saved data
Adds tracking of last API key to avoid unnecessary prompt generator updates
Ensures only meaningful settings are merged with defaults
Reduces redundant operations and improves plugin performance
Trims generated prompts to requested count
Ensures consistent user experience by slicing array if model over-generates
Prevents potential cache key mismatches due to inconsistent prompt counts
Adds a session-based flag to prevent repeated fallback notices during API failures
Implements model list deduplication to handle potential duplicate entries
Prevents spamming users with repeated error notifications
Resets notice flag on successful model fetches to allow future warnings
Enhances API client with more reliable pagination and response handling:
- Uses URLSearchParams for clearer parameter management
- Increases pagination limit to 1000 to reduce API calls
- Adds more robust content parsing for multi-block responses
- Implements stricter API health check validation
Ensures more predictable and resilient API interactions
Refactors active note validation into a dedicated static method for improved readability and reusability
Enhances code maintainability by centralizing the check for valid editor and view
Refines notification display duration for timed prompts to handle both short and long delay intervals
Adjusts duration calculation to:
- Cap notifications at 500ms for very short delays
- Subtract 500ms from longer delays to prevent prompt overlap
- Ensures smoother user experience during prompt sequences
Refreshes hardcoded fallback model list with recent Claude AI model releases
Adds newest model versions:
- Sonnet 4.5
- Haiku 4.5
- Opus 4.1
Reorganizes model list for clarity, keeping legacy models for backward compatibility
Migrates ESLint configuration to new flat config format
Upgrades TypeScript and ESLint dependencies to latest versions
Removes legacy .eslintignore and .eslintrc files
Consolidates linting configuration into a single eslint.config.mjs file
Improves project code quality and linting consistency
Refines text insertion handling for writing prompts:
- Collapses text selection before insertion
- Adds more intelligent newline management
- Uses Intl.DateTimeFormat for consistent timestamp generation
Enhances edge case handling for cursor and text positioning
Implements debounce timer to prevent excessive API calls when updating API key
Prevents rapid repeated model refreshes by:
- Adding a 500ms delay timer
- Clearing previous timers to avoid multiple concurrent requests
- Cleaning up timers when settings tab is hidden
Improves performance and reduces unnecessary API load during key entry
Enhances models fetching to handle paginated API responses
Implements robust pagination mechanism to retrieve all available models
- Continues fetching pages while 'has_more' is true
- Accumulates models across multiple API calls
- Preserves first and last page identifiers
- Ensures complete model list retrieval
Improves error handling and response validation
Enhances type checking and validation for API response structure
Adds more robust type validation to ensure:
- Correct response object structure
- Presence of required model fields
- Type safety for model data retrieval
Prevents potential runtime errors by implementing stricter type checks
Improves models API response handling by adding structural validation
Ensures that the API response contains an array of model data before processing
Prevents potential runtime errors from unexpected response formats
Refactors model loading to prevent UI blocking
Adds fallback mechanism for model selection
Ensures smooth dropdown population and model persistence
Handles cases where previously selected model may no longer be available
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
Reduces max tokens for timed prompts to improve latency and cost-efficiency
Introduces dynamic max_tokens configuration based on prompt type, using a smaller token limit for time-sensitive requests
Adds null check when selecting fallback model to prevent potential errors
Ensures graceful handling when the current model becomes unavailable by verifying a fallback model exists before setting it
Improves model retrieval by adding API key validation check for both model fetching methods
Adds fallback to predefined models when no API key is present
Sorts model lists alphabetically by display name for consistent presentation
Enhances robustness of model service handling
Introduces ModelId type alias to clarify model ID intent
Refines prompt generator type to support specific prompt types
Improves type safety for model and prompt configuration
Enforces Claude model selection as a mandatory setting
Prevents configuration submission without specifying a valid Claude model to ensure proper API interaction and prevent potential errors
Combines data loading for settings and model cache
Reduces redundant data loading steps and improves initialization efficiency
Supports dynamic model handling on the dynamic-models branch
Updates error notification to provide clearer feedback when API model retrieval fails
Enhances user experience by making the fallback model list error message more descriptive and informative
Handles scenario where previously selected AI model is no longer available
Automatically selects the first available model and notifies the user when their current model is removed, improving user experience and preventing potential configuration errors
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
Updates the release action to the latest major version.
Also corrects the repository URL in the BRAT installation instructions
to reflect the rename of the repository.
Updates the repository URLs in the CHANGELOG.md file to reflect the new repository name and location.
This ensures that the links to previous versions and comparisons are accurate and functional.
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.
Prevents errors when attempting to process an empty cache.
Deletes the cache entry if it is empty to avoid repeatedly
attempting to process an invalid cache entry.
Corrects several broken links in the README file:
- Updates the download badge link
- Corrects the manual installation link to GitHub releases
- Updates the BRAT repository link
These changes ensure users can access the correct resources.
Corrects the URL for the CodeRabbit Reviews badge in the README.
The previous URL was malformed, preventing the badge from displaying correctly. This change ensures the badge accurately reflects the status of CodeRabbit reviews.
Refines prompt generation by incorporating modifiers based on the prompt type.
This ensures that staggered prompts are short and direct, while also enforcing a consistent output format across all prompt types by appending specific instructions to the system prompt.
The user message is also updated to ensure the model returns only the numbered prompts, nothing else.
Updates prompt generation to use the model type directly, removing the need for casting.
This change streamlines the prompt generation process and enhances type safety.
Ensures prompt notifications display correctly
by adjusting the notification duration based
on the configured delay. Prevents potential overlap
between successive prompts.
Sets up a GitHub Actions workflow to automatically build, package, and release the Obsidian plugin when a new tag is pushed.
This workflow:
- Checks out the code, sets up Node.js, and installs dependencies.
- Builds the plugin using `npm run build`.
- Creates a zip package containing the necessary files (main.js, manifest.json, and styles.css).
- Extracts the version from `manifest.json` and changelog from `CHANGELOG.md`.
- Creates a GitHub release with the extracted version and changelog, including installation instructions and file information.
Creates a new CHANGELOG.md file to document notable
changes to the project, adhering to Keep a Changelog format
and Semantic Versioning.
This file details the features, technical aspects, and security
considerations introduced in version 1.0.0, as well as a link
to the unreleased changes.
Updates the default staggered example prompt to provide a more open-ended starting point. This aims to encourage more creative and diverse initial responses from users.
Ignores Sublime Text project and workspace files to prevent them from being tracked in the repository. This ensures a cleaner repository state and avoids accidental inclusion of user-specific settings.
Adds a GitHub Actions workflow to automate plugin releases upon tagging.
Includes a LICENSE file with the GNU General Public License v3.
Removes old LICENSE and manifest files.
Removes console logs from the main plugin file to reduce noise.
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
Adds the package-lock.json file to the repository to ensure consistent dependency versions across different environments.
This file helps to maintain the integrity and reproducibility of the project's dependencies.
Adds a CLAUDE.md file to provide guidance for Claude Code (claude.ai/code) when working with this repository.
Also, adds `logs/stack-exchange-mcp-server.log` to the .gitignore file to prevent it from being tracked.