Commit graph

51 commits

Author SHA1 Message Date
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
771db0a156 refactor: improve AI system prompt with vault-first search approach 2025-10-11 12:44:00 +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
7cdd4600e4 Add ReadFile function definition and reorganize function definitions into Functions directory. Remove debug console.log from Gemini class. 2025-10-07 20:43:42 +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
4818741a77 Refactor Gemini and StreamingService to enhance streamRequest method, improve error handling in parseStreamChunk, and update service registration for StreamingService. 2025-10-05 18:17:47 +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
692b3b793e Add search functionality to ConversationHistoryModalSvelte, allowing users to filter conversations by title, and update styles for improved UI responsiveness. 2025-10-05 16:22:50 +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
df1d9391b2 Enhance conversation management by adding file path handling in Conversation class, updating ConversationHistoryModal for improved item deletion and state management, and implementing current conversation path retrieval in ConversationFileSystemService. 2025-10-05 13:37:28 +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
1bccc0139d Replace script tag with link tag to load KaTeX CSS for improved styling 2025-10-02 19:52:46 +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
d8cf037045 Update package-lock.json to reflect dependency version changes for @codemirror/state, @codemirror/view, @google/genai, and @shikijs packages 2025-10-02 12:32:47 +01:00
Andrew Beal
ed5f90b8e3 Fix API provider dropdown options to use correct values for Gemini and OpenAI 2025-10-02 12:31:28 +01:00
Andrew Beal
370c5d54bb Refactor plugin to replace DmsAssistant with AIAgent, updating imports, services, and manifest files accordingly 2025-10-02 11:10:57 +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
3a6ac876c2 Fix FileSystemService instantiation in RegisterDependencies function 2025-09-30 21:22:11 +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
Andrew Beal
2de8c683ac Add StreamingIndicator component and replace static streaming indicator in ChatArea 2025-09-28 23:31:35 +01:00
Andrew Beal
854aa2a98d Bind chatContainer to ChatArea component and implement scrollToBottom functionality 2025-09-28 17:40:05 +01:00
Andrew Beal
dbe9068b0b Add MessageService and AIThoughtMessage component 2025-09-28 14:57:58 +01:00
Andrew Beal
ce41512c42 Refactor StreamingMarkdownService to use instance processor and simplify initialization 2025-09-27 16:59:28 +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