Commit graph

458 commits

Author SHA1 Message Date
Andrew Beal
d500214e2e fix: update security neutralisation for unpdf 1.6+ vendored duplicates
Adjust EXPECTED_NEW_FUNCTION_COUNT from 6 to 9 to account for unpdf >=1.6
vendoring PDF.js twice (main + worker/legacy), duplicating the 5 feature-
detection probes and 2 PostScript JIT sites (Hogan pair unchanged).

Extend WASM neutralisation to handle 4 total .wasm literals (qcms_bg.wasm ×2,
jbig2.wasm, openjpeg.wasm) instead of just qcms_bg.wasm, moving from single-
reference constant to EXPECTED_WASM_REFS map with per-filename counts and
unknown-literal detection.

Harden officeparser CJS shim regex to capture all minified identifiers (outer
var, arrow param, getter params, function param) via backreferences rather than
hardcoding param names, fixing breakage across esbuild releases (v7.1.0→v7.2.1
changed closure params r/t/e→n/e/t).
2026-06-20 11:20:14 +01:00
Andrew Beal
31812c80ad Remove setDynamicTooltip calls and update dependencies
Remove slider setDynamicTooltip calls in settings UI and update project dependencies including Anthropic SDK, Google GenAI, Shikiji, and various dev dependencies to latest versions.
2026-06-20 11:19:38 +01:00
Andrew Beal
c36e99540c Bump plugin version to 1.4.3 2026-06-01 00:30:56 +01:00
Andrew Beal
2d40fac44f Compress plugin banner. 2026-06-01 00:30:39 +01:00
Andrew Beal
212c782c55 Bump plugin version to 1.4.2 2026-06-01 00:10:13 +01:00
Andrew Beal
e5a9e4a24b refactor: bundle assets at build time instead of loading from disk
Remove runtime asset loading from AssetsService by importing assets directly and configuring esbuild loaders for SVG (text) and PNG (dataurl). This ensures assets work in release builds where only main.js is shipped without the Assets folder.
2026-06-01 00:04:39 +01:00
Andrew Beal
ca00242cd3 Bump plugin version to 1.4.1 2026-05-31 21:06:14 +01:00
Andrew Beal
e3c66bd4af docs: streamline contributing section and link to CONTRIBUTING.md
Replace verbose contributing policy with concise summary that directs
users to dedicated CONTRIBUTING.md file and GitHub Issues for feedback.
2026-05-31 21:03:22 +01:00
Andrew Beal
569d938bdf Bump plugin version to 1.4.0 2026-05-31 20:35:35 +01:00
Andrew Beal
7e13e00fde refactor: add .wasm filename neutralisation to build process
Extends the build neutralisation plugin to rewrite the dead qcms_bg.wasm
reference from unpdf's vendored PDF.js. The reference is unreachable (code
path never entered, loader gated, file not shipped) but trips Obsidian's
.wasm scanner. Build now fails if .wasm reference count drifts, preventing
undocumented changes from slipping through.
2026-05-31 20:35:12 +01:00
Andrew Beal
ba364c2d81 Bump plugin version to 1.3.9 2026-05-31 19:49:45 +01:00
Andrew
3b9d5e2c3c
Update image in README.md from screenshot to new banner 2026-05-31 19:47:54 +01:00
Andrew Beal
a77c5b3339 refactor: replace sparkles icon with custom plugin icon throughout app
- Add AssetsService to manage plugin icon and banner assets
- Update sidebar, ribbon, and quick actions to use new icon
- Add plugin banner to help modal welcome section
- Update help text to reference "plugin icon" instead of "sparkles icon"
2026-05-31 19:45:05 +01:00
Andrew Beal
72bf43a8ea refactor: clarify binary file attachment handling for AI agents
Add explicit instructions across all agent prompts explaining that binary
files (PDFs, images, documents) return content as attachments in the
message following the tool result, not as text in the result itself.

Update tool response messages to clearly state the attachment delivery
mechanism and prevent agents from re-reading the same file expecting
different output.

Improve build safety by neutralizing dynamic eval constructs and
hardening the officeparser plugin against bundle shape changes.
2026-05-31 17:58:23 +01:00
Andrew Beal
68a918338e Bump plugin version to 1.3.8 2026-05-31 15:04:09 +01:00
Andrew Beal
4763199f16 refactor: replace !important with doubled class selectors for specificity
Remove !important flags from API key validation and transparent button styles by using doubled class selectors (.class.class) to increase CSS specificity. Add explanatory comments documenting the specificity approach for future maintainability.
2026-05-31 14:57:03 +01:00
Andrew Beal
84001a88d4 Bump plugin version to 1.3.7 2026-05-31 12:01:52 +01:00
Andrew Beal
e14c711837 docs: expand Quick Actions section with detailed action descriptions
Add comprehensive documentation for all available Quick Actions including Proofread, Beautify, Apply template, Apply links, Apply tags, Suggest tags, and Generate frontmatter. Clarify selection vs whole-note behavior and improve intro explanation.
2026-05-31 12:00:45 +01:00
Andrew Beal
9ed0646b4a docs: reorganize help modal into granular topics with new Quick Actions section. Add help link to quick actions menu. Upddate copy to use sentence case. 2026-05-31 11:57:03 +01:00
Andrew Beal
c0e1a4e03e docs: escape hash symbol and update link format in user guide
- Escape '#' character in tag reference syntax to prevent rendering issues
- Convert markdown link to wiki-style link format for example template
2026-05-31 10:45:22 +01:00
Andrew Beal
e8e3dcd363 Update AI provider model enums and default configurations
Remove deprecated model versions (Claude 4/4.5/4.6, Gemini 2.5, GPT 5.4 Pro, Mistral latest aliases) and replace with current model identifiers. Add DEFAULT_QUICK_MODEL_BY_PROVIDER configuration, update default models to use Sonnet 4.6 standard and Opus 4.8 for planning, and adjust Mistral agent to use Small model.
2026-05-30 16:32:56 +01:00
Andrew Beal
713d82d5bf fix: pass actual file creation date to frontmatter generation
Previously used current date instead of file.stat.ctime for the created
field, causing incorrect timestamps in generated frontmatter. Also add
file metadata (created, modified, size) to template application context.
2026-05-30 16:03:46 +01:00
Andrew Beal
1a0c1ccb89 chore: update dependencies to latest versions
Update SDK packages (@anthropic-ai/sdk, @google/genai, openai, officeparser), development tools (@typescript-eslint, eslint, svelte), and various minor dependency patches
2026-05-30 16:03:15 +01:00
Andrew Beal
060ce4964f feat: add frontmatter generation and tag suggestion quick actions
- Implement "Suggest tags" action that generates and merges tags using AI
- Implement "Generate frontmatter" action that creates metadata fields
- Add updateFrontmatter method to VaultService and FileSystemService
- Create FrontmatterHelpers for YAML parsing and field merging
- Update prompts to reuse existing vault tags for consistency
- Remove deprecated mergeTagsIntoFrontmatter function
- Add yaml package dependency for frontmatter parsing
2026-05-30 12:33:38 +01:00
Andrew Beal
9cf8f1dbd7 refactor: move replaceCopy helper to Helpers module and add tag merge utilities
Move replaceCopy function from Copy enum to Helpers module to improve
separation of concerns. Add splitFrontmatter and mergeTagsIntoFrontmatter
utilities for YAML frontmatter manipulation. Remove unused Beautify prompt
and QuickActionsService. Add timeout support to Semaphore.wait(). Remove
unused Event.QuickActionsSettingsChanged. Update all imports across AI
classes, prompts, services, and tests.
2026-05-29 22:01:02 +01:00
Andrew Beal
945d0d00ee docs: add comprehensive Obsidian Markdown syntax documentation
Extend system and planning prompts with detailed Obsidian-flavored Markdown reference covering embeds vs links, callouts, tags, frontmatter, Tasks plugin syntax, and other special syntax (block references, highlights, comments, LaTeX, mermaid). Emphasizes preserving Obsidian-specific syntax during editing and using it when creating new content.
2026-05-26 20:42:09 +01:00
Andrew Beal
5fc1cfba60 refactor: optimize settings change notifications and cleanup subscriptions
Remove unused dispose method and settings subscription from BaseAIClass. Update SettingsService to track which settings changed and notify subscribers with specific changed keys. Components now only react to relevant setting changes. Export RegisterAiProvider and call it when AI provider settings change to ensure provider is re-registered with new configuration.
2026-05-26 18:51:08 +01:00
Andrew Beal
23dbf5e5a2 Bump version to 1.3.6 2026-05-25 19:55:01 +01:00
Andrew Beal
5f10b236cd fix: improve scroll-to-bottom detection threshold and timing
- Increase scroll detection threshold from 1px to 100px for better UX
- Update scrolled state after layout changes to ensure accuracy
- Remove extraneous whitespace in CSS
2026-05-25 19:54:38 +01:00
Andrew Beal
35dfd3f9cc feat: add scroll to bottom button with auto-hide behavior
- Add scroll state tracking to detect when user scrolls up
- Display floating button when not at bottom of chat
- Implement smooth scroll to bottom on button click
- Simplify message animation from fadeInLeft to fadeIn
2026-05-25 19:42:30 +01:00
Andrew Beal
be5711f6a4 refactor: simplify chat auto-scroll logic and add message animations
Remove complex auto-scroll tracking system in favor of explicit scroll behavior control. Add fade-in animation for message containers. Streamline ChatArea API by removing resetAutoScroll method and making updateChatAreaLayout behavior parameter optional with better defaults.
2026-05-25 18:37:31 +01:00
Andrew Beal
3fec768488 refactor: improve subscription cleanup with token-based pattern
Replace object-based subscription tracking with token-based system to prevent memory leaks. Add dispose() method to BaseAIClass and ensure all components properly unsubscribe in onDestroy. Update SettingsService.subscribeToSettingsChanged to return subscription token instead of requiring subscriber object parameter.
2026-05-25 18:22:07 +01:00
Andrew Beal
4887a10764 Refactor diff2html styles to use CSS variable remapping
Replace direct color overrides with systematic CSS variable remapping
that delegates to Obsidian's theme system. Map both light and dark
diff2html variables to corresponding Obsidian variables, allowing
automatic theme adaptation. Remove redundant theme-specific rules and
unnecessary !important declarations for cleaner, more maintainable code.
2026-05-25 16:46:37 +01:00
Andrew Beal
aed4caf347 refactor: replace custom markdown pipeline with Obsidian's native MarkdownRenderer.
Fix reactive issue for web and chat mode display.

Rewrites StreamingMarkdownService to use Obsidian's built-in MarkdownRenderer
instead of the unified/remark/rehype/KaTeX stack, eliminating ~700 lines of
custom markdown processing, CSS, and streaming state management. Internal link
handling now relies on Obsidian's native .internal-link class and data-href
attributes. The streaming split-point algorithm (freeze completed blocks, re-render
the live tail) is preserved.
2026-05-25 16:25:22 +01:00
Andrew Beal
857adbbf1c docs: remove outdated note about plugin review status 2026-05-17 14:51:05 +01:00
Andrew Beal
d3294d3870 chore: add --legacy-peer-deps flag to release workflow 2026-05-17 13:54:32 +01:00
Andrew Beal
ad850ce5e7 chore: force GitHub Actions to use Node.js 24
Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 environment variable in release workflow to ensure all JavaScript actions run on Node.js 24 instead of older versions.
2026-05-17 13:39:53 +01:00
Andrew Beal
e0e91bb879 Bump plugin version to 1.3.5 2026-05-17 13:37:09 +01:00
Andrew Beal
868a74cdff Add release workflow 2026-05-17 13:34:51 +01:00
Andrew Beal
5778b3df65 style: remove unused KaTeX and abbreviation CSS rules
Remove text-indent from .katex class and delete unused abbreviation styling for assistant message bubbles to clean up stylesheet.
2026-05-17 13:34:04 +01:00
Andrew Beal
6ed8bc8357 Address Obsidian review warnings. 2026-05-17 13:13:19 +01:00
Andrew Beal
89dceda21c Update dependencies and replace deprecated API calls
Replace activeDocument/activeWindow globals with Obsidian API equivalents (createFragment, createDiv, createSpan, window), update officeparser to use async API, switch diff2html import path and disable highlight option, prefix unused parameters with underscore, and update dependencies including @anthropic-ai/sdk, @google/genai, officeparser, and various dev dependencies
2026-05-17 12:42:09 +01:00
Andrew Beal
3e1b52fe1c Bump plugin version to 1.3.4 2026-05-05 21:21:25 +01:00
Andrew Beal
6c23df562b chore: update dependencies to latest versions 2026-05-05 21:13:32 +01:00
Andrew Beal
8823e3cf23 refactor: convert ChatMode enum to string literals and improve state management
- Change ChatMode enum values from numeric (0,1,2) to string literals ("read_only", "edit", "planning")
- Move chat mode state management from ChatWindow to SettingsService with persistence
- Add chat mode awareness to system prompts and tool validation
- Replace Map with WeakMap for settings subscribers to prevent memory leaks
- Add type-safe event handlers to EventService
- Update esbuild and TypeScript targets from ES2018/ES2020 to ES2022
- Add requiresEditModeEnabled() validation to prevent tool hallucination in read-only mode
- Update all test fixtures to include chatMode in mock settings
2026-05-05 20:54:34 +01:00
Andrew Beal
31f0484114 test: add subscribeToSettingsChanged mock and update settings tests
Mock the new subscribeToSettingsChanged method in all AI provider test files to prevent test failures. Update SettingsService tests to use updateSettings method instead of direct settings modification and saveSettings calls, aligning with the new reactive settings API that notifies subscribers of changes.
2026-05-04 16:31:49 +01:00
Andrew Beal
da2d777087 Refactor SettingsService to use immutable settings with update pattern
- Change settings from mutable to readonly with updateSettings method
- Add settings change subscription system for reactive updates
- Remove direct property mutations throughout codebase
- Make API key reactive to provider changes via subscription
- Consolidate all settings updates through single async method
- Remove unused RegisterAiProvider export and AIToolDefinitions.isGated
2026-05-04 16:31:27 +01:00
Andrew Beal
d2edd167dc Bump plugin version to 1.3.3 2026-04-26 16:41:48 +01:00
Andrew Beal
145c4c817f Update unit test after GPT 5.5 update 2026-04-26 16:40:55 +01:00
Andrew Beal
0107878a10 Update GPT-5.4 model references to GPT-5.5 and add hideDrawerElements to test mocks 2026-04-26 00:05:41 +01:00