Commit Graph

5596 Commits

Author SHA1 Message Date
MyPrototypeWhat
05c26fbff2 refactor(ui): update utility imports to use internal lib
- Changed utility imports from '@cherrystudio/ui/utils' to '@cherrystudio/ui/lib/utils' across multiple components for better organization.
- Introduced a new internal utility module for class name merging, ensuring consistent usage across the UI components.
- Updated relevant components to reflect the new import paths, enhancing maintainability and clarity.
2025-12-29 18:58:13 +08:00
fullex
6feb322be8 docs(architecture): restructure and enhance data management documentation
- Removed outdated sections on database architecture and data access patterns for clarity.
- Introduced a new table format for data management systems, detailing use cases and APIs.
- Updated references to the database schema and migration processes for better guidance.
- Consolidated key architectural components to streamline the documentation structure.
2025-12-29 17:16:07 +08:00
fullex
819c209821 docs(data): update README and remove outdated API design guidelines
- Revised the README files for shared data and main data layers to improve clarity and structure.
- Consolidated documentation on shared data types and API types, removing the now-deleted `api-design-guidelines.md`.
- Streamlined directory structure descriptions and updated links to relevant documentation.
- Enhanced quick reference sections for better usability and understanding of the data architecture.
2025-12-29 17:15:06 +08:00
fullex
e4fd1af1b8 feat(MessageService): optimize message retrieval with CTEs for improved performance
- Enhanced `getTree` method to utilize Common Table Expressions (CTEs) for fetching active paths and tree structures in a single query, reducing database load.
- Updated `getBranchMessages` to implement a similar optimization, allowing for efficient retrieval of message paths without loading all messages.
- Refactored `getPathToNode` to use a recursive CTE for fetching ancestors, addressing the N+1 query problem in deep message trees.
- Introduced transaction handling in `create` and `update` methods to ensure atomic operations and data integrity during message modifications.
2025-12-29 16:59:00 +08:00
fullex
3d0e7a6c15 feat(api): enhance message deletion functionality with activeNodeId management
- Introduced `ActiveNodeStrategy` type to define strategies for updating `activeNodeId` when a message is deleted.
- Updated `DeleteMessageResponse` to include `newActiveNodeId` for tracking changes to the active node after deletion.
- Modified the `DELETE` endpoint to accept `activeNodeStrategy` as a query parameter, allowing for flexible handling of active node updates.
- Enhanced the `delete` method in `MessageService` to implement the new strategies, ensuring consistent behavior during message deletions.
2025-12-29 13:42:05 +08:00
fullex
44b85fa661 docs(README): enhance foreign key documentation with usage examples
- Added sections on basic usage of foreign keys, self-referencing foreign keys, and circular foreign key references.
- Provided TypeScript code examples to illustrate best practices and avoid common pitfalls.
- Explained the rationale behind using soft references in SQLite for improved data integrity and simplified operations.
2025-12-29 12:00:24 +08:00
fullex
9c47937714 feat(api): enhance message and topic schemas with new features
- Added `setAsActive` property to `CreateMessageDto` for controlling active node status in topics.
- Updated `messageTable` and `topicTable` schemas to include foreign key constraints and improved handling of active node references.
- Refactored message and topic service methods to utilize `.returning()` for better data retrieval after inserts and updates.
- Implemented hard delete functionality for messages and topics, replacing soft delete logic to ensure data integrity.
2025-12-29 00:42:55 +08:00
fullex
425f81a882 fix(MessageService): update default message status to 'pending'
- Changed the default status for messages from 'success' to 'pending' to better reflect the message processing state. This aligns with recent updates to the MessageStatus type.
2025-12-28 21:34:41 +08:00
fullex
942e014d92 fix(api): enhance message status handling
- Updated MessageStatus type to include 'pending' as a new state, reflecting the message processing lifecycle.
- Modified CreateMessageDto and UpdateMessageDto interfaces to utilize the updated MessageStatus type for improved clarity and consistency in message status management.
2025-12-28 21:24:00 +08:00
fullex
5061472850 fix: remove heroui
- Consolidated imports from '@cherrystudio/ui' for better readability.
- Replaced RadioGroup with Radio component from 'antd' for consistency in the SelectionAssistantSettings file.
- Adjusted event handling for trigger and filter modes to align with the new Radio component structure.
2025-12-28 18:59:56 +08:00
fullex
6e25d12def Merge branch 'main' into v2 2025-12-28 18:08:30 +08:00
kangfenmao
c242860abc chore(release): v1.7.8
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-28 17:40:41 +08:00
fullex
cb93eee29d chore: mark multiple services and components as 'will deprecated' for v2 refactor
- Added deprecation notices to various services and components, indicating they are scheduled for removal in v2.0.0.
- Noted that feature PRs affecting these files are currently blocked, and only critical bug fixes will be accepted during the migration phase.
- Provided context and status links for ongoing v2 refactoring efforts.

This change is part of the preparation for the upcoming major version update.
2025-12-28 17:38:37 +08:00
SuYao
5ff173fcc7
fix(ollama): improve reasoningEffort handling in providerOptions (#12089)
* fix(ollama): improve reasoningEffort handling in providerOptions

* fix(ollama): update reasoning effort handling and add support for gpt-oss models

* fix(ollama): update think option to support 'low', 'medium', and 'high' values

* fix(ollama): update comment to clarify accepted reasoning effort values for gpt-oss models
2025-12-28 17:04:45 +08:00
Phantom
b78df05f28
fix(AssistantsTab): prevent deleting last assistant and add error message (#12162)
feat(AssistantsTab): prevent deleting last assistant and add error message

Add validation to prevent deleting the last assistant and show an error message when attempted. Also simplify the active assistant assignment logic when deleting an assistant.
2025-12-28 15:30:01 +08:00
fullex
7faff7ad4b feat(api): implement message branching API with tree structure support
- Add Topic and Message API endpoints for CRUD operations
  - Implement tree visualization queries (GET /topics/:id/tree)
  - Implement branch message queries with pagination (GET /topics/:id/messages)
  - Add multi-model response grouping via siblingsGroupId
  - Support topic forking from existing message nodes
  - Add INVALID_OPERATION error code for business rule violations
  - Update API design guidelines documentation
2025-12-28 12:54:06 +08:00
fullex
939100d495 refactor(api): consolidate error handling and update API error structures
- Replaced `DataApiError` with `SerializedDataApiError` for improved error serialization and IPC transmission.
- Enhanced error response format with additional fields for better context and debugging.
- Updated error handling utilities to streamline error creation and retry logic.
- Removed the deprecated `errorCodes.ts` file and migrated relevant functionality to `apiErrors.ts`.
- Updated documentation to reflect changes in error handling practices and structures.
2025-12-28 12:09:52 +08:00
Zhaolin Liang
c13dc6eab5
fix: shortcut icons sorting disorder (#12151)
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
2025-12-27 20:04:51 +08:00
Shemol
2008d70707
fix(memory): fix global memory settings submit failure (#12147) 2025-12-27 18:00:20 +08:00
Shemol
723fa11647
perf(ModelList): use Map for O(1) model status lookup (#12161)
- Replace Array.find() with Map.get() for modelStatus lookup
- Add useMemo to create modelStatusMap from modelStatuses array
- Stabilize onEditModel callback with useCallback to prevent memo invalidation

Fixes #12035

Signed-off-by: SherlockShemol <shemol@163.com>
2025-12-27 13:57:33 +08:00
Phantom
9586f38157
build: upgrade electron-vite to 5.0.0 with HMR support (#12120) 2025-12-27 12:27:11 +08:00
fullex
e4ec7bba7c docs(api): add PATCH vs Dedicated Endpoints section to API design guidelines
- Introduced a decision tree to help determine when to use PATCH versus dedicated endpoints based on operation characteristics.
- Added guidelines for naming dedicated endpoints and provided examples for various scenarios, enhancing clarity on API design practices.
2025-12-27 11:17:47 +08:00
fullex
401d66f3dd
fix(windows): remember size not working for SelectionAction window (#12132)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 23:43:38 +08:00
fullex
c16789f697 feat(database): update README and column helpers for schema guidelines
- Expanded the README with detailed database schema guidelines, including naming conventions for tables, columns, and export names.
- Introduced new column helper functions for UUID primary keys (v4 and v7) to streamline table definitions.
- Updated existing schemas (group, message, tag, topic) to utilize the new UUID primary key helpers for improved consistency and auto-generation.
2025-12-26 22:45:13 +08:00
fullex
fe7358a33c docs(api): add design guidelines reference to README
- Included a note to review the API Design Guidelines before creating new schemas, emphasizing path naming, HTTP methods, and error handling conventions.
2025-12-26 21:02:20 +08:00
fullex
61e80f2e7f feat(database): enhance message and topic schemas with new fields
- Added `siblingsGroupId` to `message` schema for better message organization.
- Introduced `activeNodeId` in `topic` schema to manage message tree structure.
- Updated `assistantMeta` and `modelMeta` fields to use specific types for improved type safety.
- Included `isNameManuallyEdited` and `sortOrder` in `topic` schema for enhanced topic management.
- Added a new entry in the migration journal for version tracking.
2025-12-26 19:21:42 +08:00
defi-failure
99b431ec92
fix: remove trailing api version in ANTHROPIC_BASE_URL (#12145) 2025-12-26 17:37:58 +08:00
Shemol
ab3bce33b8
docs: fix copy -> cp in development guide (#12142)
Signed-off-by: SherlockShemol <shemol@163.com>
2025-12-26 17:05:45 +08:00
fullex
f84a2588fd Merge branch 'main' into v2 2025-12-26 14:18:06 +08:00
fullex
0b35029404 refactor(dataApi): remove batch and transaction support from Data API
- Deleted batch and transaction related schemas, handlers, and IPC channels to streamline the Data API.
- Updated related type definitions and import paths to reflect the removal of batch and transaction functionalities.
- Simplified the API server and adapter logic by eliminating unused methods and handlers.
2025-12-26 14:17:08 +08:00
fullex
18df6085d7 refactor(dataApi): streamline Data API schema and type definitions
- Removed outdated API model and schema files to simplify the structure.
- Consolidated API types and schemas for better organization and clarity.
- Updated import paths across the codebase to reflect the new structure.
- Enhanced documentation in related README files to guide usage of the new API schema organization.
2025-12-26 12:52:32 +08:00
kangfenmao
0f0e18231d fix: update ollama provider type and increment store version to 190
- Changed ollama provider type from 'openai' to 'ollama' in SYSTEM_PROVIDERS_CONFIG.
- Incremented persisted reducer version from 189 to 190.
- Added migration logic for version 190 to update existing provider types in state.
2025-12-26 11:44:51 +08:00
fullex
8292958c0d feat(database): message.stats and related message type definitions
- Changed migration command from `yarn run migrations:generate` to `yarn run db:migrations:generate` for consistency across the project.
- Updated related documentation in `CLAUDE.md`, `migrations/README.md`, and `src/main/data/README.md` to reflect the new command.
- Added a notice in `migrations/README.md` regarding potential database structure changes before the alpha release.
2025-12-25 21:52:07 +08:00
jardel
4ae9bf8ff4
fix: allow more file extensions (#12099)
Co-authored-by: icarus <eurfelux@gmail.com>
2025-12-25 16:59:13 +08:00
kangfenmao
05dfb459a6 chore: release v1.7.7 2025-12-25 14:41:52 +08:00
Caelan
0669253abb
feat:dmx-painting-add-extend_params (#12098)
* dmx-painting-add-extend_params

* format-code

* 更新类型
2025-12-25 13:46:33 +08:00
fullex
4ba0f2d25c
fix: correct aihubmix anthropic API path (#12115)
Remove incorrect /anthropic suffix from aihubmix provider's anthropicApiHost configuration.
The correct API endpoint should be https://aihubmix.com/v1/messages, not https://aihubmix.com/anthropic/v1/messages.

Fixes issue where Claude API requests to aihubmix provider were failing due to incorrect URL path.
2025-12-25 13:26:32 +08:00
fullex
6633082335 fix: format 2025-12-25 08:43:27 +08:00
fullex
27ab7ea35c feat(database): enhance app lifecycle management with error handling during initialization
- Added error handling for database initialization and migration processes.
- Introduced user feedback via dialog box for initialization failures, guiding users to delete the database file if necessary.
- Marked a temporary solution for data migration v2, indicating future refactoring plans for app lifecycle management.
2025-12-25 08:42:35 +08:00
fullex
1b9d8fe24a feat(database): add user data schemas for topic, message, group, and tag
- Add topicTable schema with group organization and pinning support
  - Add messageTable schema with tree structure (adjacency list pattern)
  - Add groupTable schema for organizing entities by type
  - Add tagTable and entityTagTable schemas for tagging system
  - Add FTS5 full-text search support for message content
  - Update preferenceTable to use composite primary key (scope, key)
  - Regenerate initial migration with all tables

  Changes Summary

  | Type        | Files                                                               |
  |-------------|---------------------------------------------------------------------|
  | New schemas | topic.ts, message.ts, group.ts, tag.ts, entityTag.ts, messageFts.ts |
  | Modified    | preference.ts (index → composite PK)                                |
  | Migration   | Renamed 0000_solid_lord_hawal.sql → 0000_init.sql with all tables   |

  This is part of the data refactoring project - adding core user data table schemas.
2025-12-24 23:19:25 +08:00
fullex
60182b238f Merge branch 'v2' of github.com:CherryHQ/cherry-studio into v2 2025-12-24 17:30:57 +08:00
fullex
c0e36e6017 Merge branch 'main' into v2 2025-12-24 17:30:49 +08:00
MyPrototypeWhat
7e7d10f966 feat(badge): add Badge component and its variants with Storybook examples
- Introduced a new Badge component with multiple visual style variants: default, secondary, destructive, and outline.
- Added comprehensive Storybook stories to demonstrate the Badge component's usage, including examples with icons and as links.
- Updated the component index to export the new Badge component.
2025-12-24 16:58:56 +08:00
Kejiang Ma
f7312697e7
feat: close ovms process when app quit (#12101)
* feat:close ovms process while app quit

* add await for execAsync

* update 'will-quit' event
2025-12-24 15:26:19 +08:00
Phantom
d9171e0596
fix(openrouter): support GPT-5.1/5.2 reasoning effort 'none' for OpenRouter and improve error handling (#12088) 2025-12-24 14:18:41 +08:00
beyondkmp
89a6d817f1
fix(display): improve font selector for long font names (#12100)
* fix(display): improve font selector for long font names

- Increase Select width from 200px to 280px
- Increase SelectRow container width from 300px to 380px
- Add Tooltip to show full font name on hover
- Add text-overflow ellipsis for long font names

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(DisplaySettings): replace span with div and use CSS class for truncation

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
2025-12-24 13:25:37 +08:00
SuYao
09e58d3756
fix: interleaved thinking support (#12084)
* fix: update @ai-sdk/openai-compatible to version 1.0.28 and adjust related patches

* fix: add sendReasoning option to OpenAICompatibleProviderOptions and update message conversion logic

* fix: add interval thinking model support and related tests

* fix: add sendReasoning option to OpenAICompatibleProviderOptions and update related logic

* fix: remove MiniMax reasoning model support and update interval thinking model regex

* chore: add comment

* fix: rename interval thinking model references to interleaved thinking model
2025-12-23 20:08:53 +08:00
kangfenmao
e093a18deb refactor(settings): update MCP logo opacity and remove unused notes settings
- Adjust MCP logo opacity in MCPSettings and McpTool components for improved visual consistency.
- Remove notes settings entry from SettingsPage to streamline the settings interface.
2025-12-23 15:01:58 +08:00
亢奋猫
265934be5a
refactor(notes): move notes settings to popup in NotesPage (#12075)
* refactor(notes): move notes settings to popup in NotesPage

- Move NotesSettings.tsx from settings directory to notes directory
- Add "More Settings" menu item to notes dropdown menu
- Show settings in GeneralPopup when clicking "More Settings"
- Remove notes settings entry from SettingsPage sidebar and routes

* fix(notes): adjust margin in NotesSidebar component for improved layout

- Update margin-bottom from 20px to 12px in the NotesSidebar component to enhance visual spacing.

* refactor(notes): simplify styles object in HeaderNavbar component

- Consolidate styles object for body padding in HeaderNavbar to improve readability and maintainability.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-23 14:57:03 +08:00
亢奋猫
5f0006dced
refactor(websearch): redesign settings with two-column layout (#12068)
- Refactor WebSearchSettings to use two-column layout (left sidebar + right content)
- Add local search provider settings with internal browser window support
- Add "Set as Default" button in provider settings page
- Show default indicator tag in provider list
- Prevent selection of providers without API key configured
- Add logos for local search providers (Google, Bing, Baidu)

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-23 13:22:02 +08:00