Commit graph

644 commits

Author SHA1 Message Date
Zero Liu
2a905947c2 remove unused components 2025-07-19 22:29:03 -07:00
Zero Liu
d5ae0b9f6e Inline edit 2025-07-17 21:50:23 -07:00
Zero Liu
ff238a399d Fix cursor comment 2025-07-17 21:49:01 -07:00
Zero Liu
f7c334b800 Fix race conditions 2025-07-17 21:48:32 -07:00
Logan Yang
b79b8d0a38
Migrate chat messages (#1629)
* Migrate from sharedState to new chat message system

- Replaced SharedState with a new ChatManager and ChatUIState architecture to streamline message processing and UI integration.
- Updated message imports to utilize the new types from "@/types/message".
- Introduced unique message IDs for better tracking and management.
- Enhanced the Chat component to support pending messages and improved message deletion logic.
- Removed deprecated shared state references and cleaned up related code for clarity and maintainability.

Enhance message management architecture and context processing

- Introduced a new MessageRepository for single source of truth in message storage, eliminating dual-array synchronization.
- Updated ChatManager to coordinate message operations and context processing, ensuring fresh context during edits.
- Refactored ChatUIState for clean UI state management, delegating business logic to ChatManager.
- Added comprehensive testing for message handling and context processing to prevent bugs and ensure reliability.
- Removed legacy SharedState references and improved overall architecture for clarity and maintainability.

Update claude.md

Remove conditional project tag from chat content rendering in Chat component

Ensure project chat isolation

- Introduced a method to retrieve the current project ID in ProjectManager.
- Enhanced ChatManager to manage multiple project-specific message repositories, allowing for dynamic switching based on the current project.
- Implemented logic to load existing messages from the ProjectManager's cache when creating new message repositories.
- Updated message handling methods in ChatManager to utilize the current project's message repository, ensuring context consistency across project switches.

* Fix message isolation between projects and non-project

- Introduced ChatManager and ChatUIState to streamline message processing and UI updates.
- Removed legacy message caching from ProjectManager, delegating message persistence to ChatManager.
- Updated CopilotView and Chat components to utilize the new architecture, enhancing message loading and project switching.
- Cleaned up deprecated code related to pending messages and shared state for improved maintainability.

* Implement a new chat persistence module

- Introduced ChatPersistenceManager to handle saving and loading chat history in markdown format, ensuring project-aware file naming.
- Updated ChatManager to utilize the new persistence functionality, streamlining message loading and saving processes.
- Refactored ChatUIState to support asynchronous loading and saving of messages, improving UI responsiveness.
- Added comprehensive tests for ChatPersistenceManager to ensure reliability in chat content formatting and parsing.
- Updated architecture documentation to reflect the new message management structure and flow.

* Update message management architecture doc

- Removed detailed architecture diagrams from CLAUDE.md and linked to MESSAGE_ARCHITECTURE.md for clarity.
- Updated MESSAGE_ARCHITECTURE.md to include project isolation features, enhancing the message management system.
- Improved documentation on message flow and project-specific repositories, ensuring seamless context switching.
- Streamlined the explanation of core classes and their interactions within the new architecture.

* Fix test

* Use llm message for commands to ensure context access

* Update docs
2025-07-17 01:41:53 -07:00
Zero Liu
b0f7971a4c
Custom command settings improvement (#1611)
* Auto add frontmatter when adding or renaming custom prompt files

* Make custom command enable slash and right click command by default

* Make add command button open the command edit dialog

* More improvements

* Fix test

* Fix cursor reported errors

* Add 'create new custom command' command back

* Fix rename race condition

* Fix more cursor errors

* Fix race conditions
2025-07-14 23:19:11 -07:00
Logan Yang
607b3c0907
2.9.4 (#1622) 2025-07-10 16:50:40 -07:00
Logan Yang
c1dbc965ed
Exclude copilot folders from indexing by default (#1621) 2025-07-10 16:25:31 -07:00
Logan Yang
c07ab31685
Implement file type validation for context in ChatInput and BaseNoteModal components (#1620)
- Added `isAllowedFileForContext` utility function to check if a file is of allowed types (markdown, PDF, or canvas).
- Updated `ChatInput` to use this function for setting the current active note.
- Refactored `BaseNoteModal` to utilize the new utility for filtering files and managing the active note state.
2025-07-10 15:40:45 -07:00
Logan Yang
592b7602d4
Fix copilot-plus-small (#1619) 2025-07-10 00:22:31 -07:00
Wenzheng Jiang
c345ddda60
Fix composer canvas codeblock (#1617) 2025-07-09 13:48:31 -07:00
Logan Yang
e06ace16b1
2.9.3 (#1605) 2025-07-03 12:05:25 -07:00
Logan Yang
2625fa949f
Add Projects rate limit UI change (#1603) 2025-07-03 00:25:34 -07:00
Logan Yang
831ae77354
Update file upload guidelines and rate limit information (#1602) 2025-07-02 21:55:31 -07:00
Logan Yang
1f1703906f
Fix slash trigger (#1600) 2025-07-02 15:54:54 -07:00
Logan Yang
aae4548f3b
Fix default model reset (#1599) 2025-07-02 15:42:06 -07:00
Logan Yang
276dd992d8
2.9.2 (#1595) 2025-07-01 15:49:45 -07:00
Logan Yang
ccf2c3f34a
Implement auto youtube tool (#1594) 2025-07-01 15:32:00 -07:00
Mathieu Colmon
ecf8eeff53
feat(chat): Implement autosave for chat after messages and responses (#1582)
* feat(chat): Implement autosave for chat after messages and responses

Adds autosave functionality to the chat component, saving the chat after every user message and AI response if the autosave setting is enabled. Updates the autosave chat setting description for clarity.

* fix(chat): Use sharedState for visible messages in Chat

Updated the Chat component to filter visible messages using sharedState.getMessages() instead of chatHistory, ensuring the latest messages are used. Also removed a redundant notice when updating an existing note.

* fix(chat): Make autosave non-blocking

The handleSaveAsNote function is now called without await in autosaveChat blocks.

---------

Co-authored-by: Logan Yang <logancyang@gmail.com>
2025-07-01 13:18:27 -07:00
Mathieu Colmon
50b3389344
Add Escape key support to cancel message editing (#1589)
Pressing Escape while editing a message now cancels the edit and restores the original message. Also removed onBlur save behavior to prevent accidental saves when focus is lost.
2025-07-01 12:39:13 -07:00
Logan Yang
73bf983511
Fix auto index trigger (#1593) 2025-07-01 12:30:51 -07:00
Logan Yang
ca6bfc1e8f
fix: Disable autocomplete by default and update activation logic based on Plus user status in AutocompleteService (#1592) 2025-06-30 16:03:30 -07:00
Logan Yang
0e170b4ef9
2.9.1 (#1585) 2025-06-27 19:41:46 -07:00
Logan Yang
6044c253cc
Enable model params for copilot-plus-flash (#1584) 2025-06-27 16:40:06 -07:00
Logan Yang
b957e93c22
chore: Update integration test conditions in GitHub Actions workflow (#1583)
- Added conditional execution for integration tests to run only on trusted events (push) or when secrets are available.
2025-06-27 16:17:47 -07:00
Emt-lin
d6b594dcfb
feat: Support editing all parameters individually for each model (#1562) 2025-06-27 15:57:12 -07:00
Wenzheng Jiang
aaa53c248a
Composer: fix compose block for empty note (#1581) 2025-06-27 08:33:42 -07:00
Wenzheng Jiang
88c98d3dee
update max token default description in setting page (#1580) 2025-06-26 20:56:23 -07:00
Logan Yang
585778b2f3
feat: Add support for selected text context in chat component (#1576) 2025-06-26 13:54:27 -07:00
Logan Yang
74bdfbdff2
feat: Implement slash command detection and replacement in ChatInput (#1575)
- Added unit tests for slash command detection and replacement logic.
- Enhanced ChatInput component to show a modal for slash commands and replace the slash with the corresponding command content.
- Updated showCustomPromptModal to handle cursor position and current input value for better user experience.
2025-06-25 16:08:27 -07:00
Logan Yang
1dd801d98f
feat: Update file cache to use markdown instead of json (#1572) 2025-06-24 23:01:58 -07:00
Logan Yang
7a007daf58
feat: Update ChatModels and add new OpenRouter models (#1571)
- Updated GEMINI_PRO and GEMINI_FLASH constants to their stable versions.
- Added new OpenRouter models: OPENROUTER_GEMINI_2_5_FLASH, OPENROUTER_GEMINI_2_5_PRO, and OPENROUTER_GEMINI_2_5_FLASH_LITE.
- Enhanced ChatModelManager with default headers for API requests.
2025-06-24 15:35:58 -07:00
Logan Yang
54c30d83de
chore: Update dependencies and enhance project context modal (#1570)
- Updated `brace-expansion` to versions 2.0.2 and 1.1.12 in package-lock.json.
- Refactored `AddProjectModal` to improve context labeling and descriptions.
- Enhanced `ContextManageModal` with tooltips and improved file context handling.
- Cleaned up imports and organized component structure in `context-manage-modal.tsx`.
- Fixed duplicate description rendering in `form-field.tsx`.
2025-06-24 12:58:47 -07:00
Emt-lin
4539338dfe
feat: Support project context preview. (#1551)
* feat: Support project context preview.
* feat: add test file.
* fix: Fix state update issues and remove extension section.
2025-06-24 12:35:48 -07:00
Logan Yang
b33f5cf321
Enhance CodeMirror integration for wiki link handling and word completion (#1568)
- Prevent suggestions for incomplete Obsidian wiki links.
- Allow native note completion to manage links in progress.
- Introduce checks for complete words with no significant completions to avoid unnecessary suggestions.
2025-06-23 17:47:45 -07:00
Logan Yang
1b098e5454
Enhance abort signal in chains (#1566)
* feat: Add abort stream functionality to chat component and event handling

- Introduced ABORT_STREAM event in constants.
- Implemented event listener in Chat component to handle abort stream events.
- Updated CopilotPlugin to dispatch abort event before clearing chat history.

* Enhance chat with message restructuring for abort signal

* Remove .claude/settings.local.json from tracking

* Enhance abort handling in chain runners

- Added a manual test checklist section to CLAUDE.md for better QA processes.
- Improved abort handling in chain runners to ensure proper message management and logging.
- Updated the Chat component to retain the partial AI message during abort scenarios.

* Add todos for deprecated chain-related functionality and improve logging

- Marked several chain-related files and functions as deprecated due to the transition to direct chat model calls.
- Added TODO comments to indicate the need for future removal after verifying no dependencies remain.
- Enhanced logging by replacing console.error and console.warn with logError and logWarn for better error handling in chain runners.
2025-06-23 17:03:53 -07:00
Logan Yang
225bbd24e7
Remove think tag for insert into note (#1560) 2025-06-20 09:29:04 -07:00
Zero Liu
a7dbd7f14b
Merge custom command with custom prompts (#1549) 2025-06-18 22:03:25 -07:00
Wenzheng Jiang
d07143a24f
Composer: show changes at word level (#1541) 2025-06-17 23:26:01 -07:00
Logan Yang
f3fb79fae4
Update claude md (#1556) 2025-06-17 12:55:59 -07:00
Emt-lin
d472d36541
Fix: Custom model verification, api key errors (#1552)
* fix: add default api-key string for OPENAI_FORMAT embedding model.
* fix: adjust maxTokens to adapt o1-pro model.
* fix: adjust verify timout to adapt deepseek official api.
2025-06-17 11:28:53 -07:00
Wenzheng Jiang
4a4be69658
Rename @web to @websearch (#1547) 2025-06-14 17:52:51 -07:00
Zero Liu
da936e1a08
Fix unnecessary plus call again (#1542) 2025-06-12 15:22:52 -07:00
Zero Liu
bce6cd5d1c
Fix update banner typo (#1532) 2025-06-07 17:14:24 -07:00
Logan Yang
c29ee3bc67
2.9.0 (#1531) 2025-06-07 14:18:24 -07:00
Logan Yang
11eb05e9fa
feat: Implement autosave for current chat before loading chat history (#1530) 2025-06-07 14:04:13 -07:00
Logan Yang
28c65710e9
feat: Add support for CLAUDE_4_SONNET model and update maxTokens limit to 65000 in relevant components (#1529) 2025-06-07 11:40:02 -07:00
Wenzheng Jiang
3fbe6ca82a
Composer: Enhance note context handling (#1524) 2025-06-07 11:39:51 -07:00
Logan Yang
765251fb94
Update gemini pro version (#1525) 2025-06-05 20:39:42 -07:00
Emt-lin
1205d89ed3
feat: Support the function of searching the project list. (#1522) 2025-06-05 10:37:34 -07:00