9 Commits
Author SHA1 Message Date
AlexKucera 9ee37cd087 Sanitizes writing prompts for consistent formatting
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
2025-10-31 13:20:31 +01:00
AlexKucera fca191b850 Simplifies note prompt selection and timestamp formatting
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
2025-10-25 10:48:02 +02:00
AlexKucera 8e6441ff7d Improves timestamp localization for note prompts
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
2025-10-24 16:42:04 +02:00
AlexKucera cc1b452872 Extracts note command execute validation logic
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
2025-10-24 13:36:33 +02:00
AlexKucera da6056bf0d Improves prompt insertion logic and timestamp formatting
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
2025-10-24 13:27:14 +02:00
AlexKucera e96ef65200 Added DocStrings 2025-10-24 13:09:10 +02:00
AlexKucera b8b701d78b Simplifies cursor placement after prompt insertion
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.
2025-09-26 08:20:00 +02:00
Jarvis 143097a973 fix: improve TypeScript type safety
- 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>
2025-09-21 08:02:16 +02:00
AlexKucera 44936775cd Implements freewriting prompts plugin
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
2025-09-19 18:51:48 +02:00