Commit graph

42 commits

Author SHA1 Message Date
Andrew Beal
47af43fe1f feat: add token counting display to status bar
Implement real-time input/output token tracking in the status bar by
integrating ITokenService with ChatService. Token counts are calculated
from conversation history and updated on conversation load, reset, and
message completion.
2025-10-17 22:23:45 +01:00
Andrew Beal
2fc9edc194 refactor: move typing-in animation to global styles and add conversation title to top bar
- Extract typing-in animation from ChatArea to global styles.css for reuse
- Add conversation title display in TopBar with fade transition
- Update ChatService to notify title changes via onNameChanged callback
- Fix ConversationNamingService to trigger callback after saving new title
- Clean up unused isAborting flag in ChatService
- Adjust grid layout in TopBar to accommodate title display
2025-10-17 19:34:47 +01:00
Andrew Beal
d0be254c5f feat: add batch file operations and move functionality
- Rename DeleteVaultFile to DeleteVaultFiles with array support
- Add MoveVaultFiles function for file relocation and renaming
- Refactor file operations to return structured success/error results
- Move directory creation logic to VaultService
- Register FileManager dependency for file operations
- Fix CSS variable for interactive accent blue hover state
2025-10-16 22:58:30 +01:00
Andrew Beal
279a89e483 refactor: improve system prompt search strategy and fix UI styles
- Reorder sections to prioritize vault-first decision framework
- Add blanket search tier for comprehensive vault exploration
- Emphasize persistent searching with alternative terms
- Remove duplicate StreamingIndicator component
- Fix edit mode button hover styling specificity
2025-10-15 22:57:06 +01:00
Andrew Beal
a756cee5c0 refactor: replace hardcoded blue with dynamic accent color variable
Replace direct `--color-blue` references with new `--interactive-accent-blue` variable that blends interactive accent with blue, enabling consistent theme-aware styling across edit mode UI elements.
2025-10-15 21:18:59 +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
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
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
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
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
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
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
abe2caebf6 Enhance ChatWindow and TopBar functionality with icon support and improved button accessibility 2025-10-02 22:56:22 +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
ac70bc2f6f Add greeting messages based on time of day and implement TopBar component 2025-10-02 09:34:54 +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
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
854aa2a98d Bind chatContainer to ChatArea component and implement scrollToBottom functionality 2025-09-28 17:40:05 +01:00
Andrew Beal
9e429c4cd1 Refactor chat components and improve markdown processing
- Enhanced ChatArea component to handle streaming messages more efficiently with incremental updates.
- Removed MarkdownService as it was no longer needed; integrated its functionality into StreamingMarkdownService.
- Updated ServiceRegistration to reflect the removal of MarkdownService and adjusted AI class type.
- Improved StreamingMarkdownService for better streaming performance and error handling.
- Added new styles for syntax highlighting and markdown rendering in styles.css.
- Removed old styles_old.css as they were deprecated.
- Updated package.json and package-lock.json to include lowlight for improved syntax highlighting.
2025-09-27 13:23:28 +01:00
Andrew Beal
7efdac24cf Remove deprecated CSS files and enhance markdown processing service
- Deleted highlight-default.min.css, katex.min.css, and markdown.css as they are no longer needed.
- Implemented StreamingMarkdownService for improved markdown processing with support for math and syntax highlighting.
- Added StreamingService for handling streaming requests to the Gemini API with error handling and chunk parsing.
- Introduced styles_old.css for enhanced code block styling and better readability.
2025-09-26 20:48:05 +01:00
Andrew Beal
3f37870aaa Add markdown rendering support with KaTeX and highlight.js
- Updated package.json to include dependencies for rehype and remark plugins for markdown processing.
- Added default highlight.js CSS for code highlighting.
- Included KaTeX CSS for rendering mathematical expressions.
- Created markdown.css for styling markdown content in the Obsidian plugin, incorporating styles for headings, paragraphs, lists, tables, and code blocks.
- Customized highlight.js colors to match Obsidian theme.
2025-09-16 17:14:37 +01:00
Andrew Beal
0fb3e4632f Implement spike work for plugin. 2025-09-08 15:50:06 +01:00