Commit graph

57 commits

Author SHA1 Message Date
Andrew Beal
1a57bb4872 style: increase streaming indicator glow shadow spread 2025-10-14 22:58:58 +01:00
Andrew Beal
ae5754040a feat: implement progressive search strategy with relationship inference
Adds multi-tier search approach that exhaustively tries broader terms,
partial matches, and synonyms before concluding information doesn't exist.
Enables relationship inference from found content to answer queries about
connected entities. Fixes padding calculation to account for consecutive
assistant messages by summing their heights.
2025-10-14 20:22:01 +01:00
Andrew Beal
f2a7a41705 refactor: replace ListVaultFiles with content-based SearchVaultFiles
Replace list_vault_files function with search_vault_files that performs regex-based content search instead of listing all files. Add escapeRegex helper for search term sanitization. Remove unused edit mode CSS.
2025-10-14 18:54:16 +01:00
Andrew Beal
92d3bc5a31 refactor: enhance system prompt with structured decision framework
Reorganize system prompt with clearer operating principles, vault-first
decision heuristics, semantic directory architecture, and comprehensive
examples. Improve multi-tool workflow guidance and error handling patterns.

Extract edit mode toggle to dedicated function for better code organization.
2025-10-13 20:06:47 +01:00
Andrew Beal
f8aa162a63 fix: improve edit mode deactivation and request cancellation handling
- Deactivate edit mode when resetting or loading conversations
- Fix cancelled request detection using Selector instead of Copy enum
- Standardize quote style in StreamingMarkdownService to double quotes
2025-10-13 19:53:00 +01:00
Andrew Beal
b82d38e799 feat: add edit mode styling to streaming indicator
Pass editModeActive prop through ChatArea to StreamingIndicator to change
streaming animation color from accent to blue when in edit mode
2025-10-13 19:25:29 +01:00
Andrew Beal
1aa0d0000d feat: add edit mode toggle to enable destructive AI actions
- Add allowDestructiveActions parameter throughout AI request chain
- Implement edit mode UI toggle with visual indicators
- Update getQueryActions to conditionally include destructive tools
- Add blue highlight styling when edit mode is active
2025-10-13 19:12:06 +01:00
Andrew Beal
4c21b39a28 refactor: centralize CSS class names in Selector enum
- Replace hardcoded class name strings with Selector enum values
- Add new selector constants for styling and UI states
- Filter cancelled request messages from saved conversations
- Improve scroll behavior when streaming ends
- Move plugin styles import to main plugin file
2025-10-13 13:14:54 +01:00
Andrew Beal
c188f5727e Add allowAccessToPluginRoot parameter to prevent AI editing user instructions
This change adds a new `allowAccessToPluginRoot` parameter throughout the filesystem and vault service layers to control access to plugin root directories. The AI assistant is now prevented from modifying the user instruction file while still allowing internal plugin operations to access conversation data and configuration files.
2025-10-12 23:11:36 +01:00
Andrew Beal
e543bf5351 refactor: improve dependency injection type safety and add AI exclusions setting
- Add generic types to all Resolve() calls for type safety
- Introduce VaultService abstraction layer for file operations
- Add AI File Exclusions setting with textarea and glob pattern support
- Refactor FileSystemService to use VaultService instead of direct Vault access
- Improve code organization with comments and renamed variables
- Update styles for exclusions input field
2025-10-12 21:26:01 +01:00
Andrew Beal
ae5a836c21 refactor: extract chat logic into ChatService
Move streaming, submission, and AI interaction logic from ChatWindow
component into new ChatService for better separation of concerns.
2025-10-12 18:55:39 +01:00
Andrew Beal
9c45a05abc feat: add abort controller to cancel streaming AI requests
- Add AbortSignal parameter to streamRequest interface and implementations
- Implement handleStop function to abort ongoing requests
- Change submit button to stop button when streaming
- Handle AbortError gracefully with user-friendly message
- Add styling for cancellation notification
2025-10-12 13:33:25 +01:00
Andrew Beal
8cc9441276 Remove debugging 2025-10-12 13:08:32 +01:00
Andrew Beal
b99c2062dd refactor: use stable message IDs instead of index-based tracking
Replace index-based message identification with stable UUID-based IDs for proper streaming state management and message updates across chat components
2025-10-12 13:07:54 +01:00
Andrew Beal
68dda10852 fix: defer padding recalculation to avoid race condition with DOM updates 2025-10-12 00:55:22 +01:00
Andrew Beal
84ea96c394 fix: improve chat UI padding calculation and request completion handling
- Add critical instruction to system prompt ensuring AI completes full requests
- Fix race condition in chat padding calculation when streaming ends
- Add onFinishedSubmitting callback to recalculate padding after stream completion
- Replace paragraph tags with div tags for message rendering
- Clean up commented code and improve code formatting
2025-10-12 00:33:04 +01:00
Andrew Beal
532225a48f fix: emphasize wiki-link syntax and disable padding recalculation
- Add emphasis to wiki-link requirement in system prompt
- Comment out reactive padding recalculation that caused layout issues
2025-10-11 15:37:49 +01:00
Andrew Beal
29803b5615 fix: resolve scroll and padding race condition in chat area
- Track last assistant message element for padding recalculation
- Add smooth scroll to bottom after message resize
- Recalculate padding when streaming ends to fix race condition
2025-10-11 14:20:19 +01:00
Andrew Beal
9bb0df7df3 Add multi-turn conversation support with shouldContinue flag
Implement continuation logic for AI responses that require multiple turns
without explicit function calls. Add STOP_REASON_STOP constant to detect
when conversation should naturally end versus when it needs continuation.

Update streaming flow to handle both function calls and continuation flags,
enabling more fluid multi-step conversations.
2025-10-11 13:57:11 +01:00
Andrew Beal
19be7ccf8d Refactor chat scroll behavior to use dynamic padding instead of intervals
Replace auto-scroll interval logic with ResizeObserver-based dynamic padding system that maintains scroll position during streaming by adjusting container bottom padding based on message and thought bubble heights
2025-10-11 12:28:42 +01:00
Andrew Beal
9cbedb6b53 refactor: extract and reuse focusInput logic across components
Move focus logic to exported method and trigger it after conversation
resets to maintain input focus consistently throughout the UI flow.
2025-10-09 21:34:40 +01:00
Andrew Beal
9a34634008 Improve scrolling for thought element. 2025-10-08 23:55:27 +01:00
Andrew Beal
d910239a7f Add wiki-link support, API key validation, and refactor AI provider initialization
Implement clickable wiki-links in assistant responses with WorkSpaceService for note navigation. Add API key validation with visual feedback in ChatWindow, automatically opening settings when empty. Extract settings helper to reduce code duplication. Refactor Gemini class to resolve API key from plugin settings rather than constructor parameter. Update system prompt with wiki-link usage guidelines. Remove unused ODB cache implementation and loadExternalCSS helper. Improve UI with enhanced empty state styling and input textarea scrolling behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 22:06:25 +01:00
Andrew Beal
f5a3a513ec Change thought component to use svelte binding.
Add styling to thought.
2025-10-07 22:27:51 +01:00
Andrew Beal
43c31cf18d Fix duplicate function call messages in ChatWindow by removing placeholder message when function call is captured.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 20:42:42 +01:00
Andrew Beal
88901ec927 Refactor ChatArea to simplify message rendering logic and introduce isSubmitting state for improved UI feedback. Consolidate user and assistant message rendering into unified structure and move StreamingIndicator and ChatAreaThought to appear during submission phase.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 00:57:08 +01:00
Andrew Beal
6f0e6d0342 Enhance Gemini web search directive for clarity, improve ChatArea streaming message handling, and ensure conversation saving logic in ChatWindow. Update AIFunction enum and AIFunctionService for RequestWebSearch functionality. Modify ConversationFileSystemService to include function call response handling. 2025-10-07 00:24:45 +01:00
Andrew Beal
62104f0abd Refactor AI function handling by introducing AIFunctionCall and AIFunctionResponse classes, updating function definitions, and enhancing conversation content management. Remove unused code and improve service registration for AIFunctionService. 2025-10-06 23:01:20 +01:00
Andrew Beal
35b531d9bf Refactor ChatArea and StreamingMarkdownService to improve type annotations, enhance readability, and ensure early returns in stream handling logic. 2025-10-05 18:43:48 +01:00
Andrew Beal
82ee600979 Refactor Gemini and IAIClass to remove IActioner dependency, update streamRequest method signature, and enhance service registration. Remove unused Actioner and related action definitions. Introduce AIFunctionService and implement ListVaultFiles function definition. 2025-10-05 18:04:47 +01:00
Andrew Beal
0d93516d93 Enhance conversation loading functionality by adding conversation selection handling in ConversationHistoryModal and ConversationHistoryModalSvelte, updating conversationStore for improved state management, and implementing current conversation path retrieval in ConversationFileSystemService. 2025-10-05 14:15:04 +01:00
Andrew Beal
74eb20c2a1 Implement conversation history modal with Svelte component, enhance conversation file system service for loading conversations, and update styles for modal presentation. Refactor file handling methods and remove unused modal service. 2025-10-05 13:06:05 +01:00
Andrew Beal
d0b4d5b852 Refactor Gemini class to use Conversation object in streamRequest method, update IAIClass interface, and enhance ChatWindow component for conversation handling. Add logging for conversation saving in ConversationFileSystemService and comment out OdbCache references in ServiceRegistration and main files. 2025-10-04 13:27:40 +01:00
Andrew Beal
ace478c311 Refactor conversation handling by introducing Conversation and ConversationContent classes, updating ChatArea and ChatWindow components, and enhancing file system service for conversation management. 2025-10-04 13:10:22 +01:00
Andrew Beal
adbe6045cf Implement conversation reset functionality and file deletion in ConversationFileSystemService 2025-10-03 22:14:30 +01:00
Andrew Beal
ea54a1e6e3 Add new conversation, delete conversation, and history buttons to TopBar with corresponding functionality 2025-10-03 21:12:02 +01:00
Andrew Beal
3a67400427 Refactor AIAgentPlugin to register intervals through the plugin and streamline command handling in the ribbon icon 2025-10-03 20:27:49 +01:00
Andrew Beal
abe2caebf6 Enhance ChatWindow and TopBar functionality with icon support and improved button accessibility 2025-10-02 22:56:22 +01:00
Andrew Beal
e87c02049e Add settings button to TopBar and bundle KaTeX CSS for improved functionality 2025-10-02 21:53:10 +01:00
Andrew Beal
94ad5e1e00 Implement scrolling behavior in ChatArea and remove unused chat padding logic in ChatWindow 2025-10-02 20:52:43 +01:00
Andrew Beal
129b1fb4e0 Add fade-in animation for user and assistant message bubbles 2025-10-02 12:49:40 +01:00
Andrew Beal
ac70bc2f6f Add greeting messages based on time of day and implement TopBar component 2025-10-02 09:34:54 +01:00
Andrew Beal
b57a2de01e Adjust chat padding transition duration and delay for improved user experience 2025-10-01 22:22:49 +01:00
Andrew Beal
115013e710 Enhance chat message styling: add user-specific text class, adjust chat padding transition, and improve layout responsiveness 2025-10-01 22:12:39 +01:00
Andrew Beal
523a95f3d5 Refactor services and helpers: reorganize imports, implement ConversationFileSystemService, and enhance FileSystemService functionality 2025-09-30 21:20:24 +01:00
Andrew Beal
64e9a1ef95 Remove background color from chat padding style 2025-09-29 11:09:47 +01:00
Andrew Beal
f6d3d7f504 Add chat padding feature and adjust StreamingIndicator layout
- Introduced a conditional chat padding element in ChatArea for improved UI.
- Updated ChatWindow to manage the visibility of chat padding during streaming.
- Adjusted padding in StreamingIndicator for better alignment.
2025-09-29 11:09:22 +01:00
Andrew Beal
96fabddc9c Hide scrollbar in chat area and allow text selection in chat window 2025-09-29 00:09:10 +01:00
Andrew Beal
788b83db64 Update background color in StreamingIndicator animations for improved visibility 2025-09-28 23:45:16 +01:00
Andrew Beal
81e3d9c34f Update box-shadow transparency in StreamingIndicator component for improved visual effect 2025-09-28 23:32:03 +01:00