### What this PR does Before this PR: - `file_entry` table used `trashed_at` for the soft-delete timestamp, diverging from every other soft-deletable table in the schema (`agent`, `assistant`, `message`, `topic`), which all use `deleted_at`. After this PR: - `file_entry.deleted_at` (and BO field `deletedAt`) — naming is consistent across the entire schema. - Renamed identifiers: - Schema field: `trashedAt` → `deletedAt` - SQL column: `trashed_at` → `deleted_at` - Index: `fe_trashed_at_idx` → `fe_deleted_at_idx` - CHECK constraint: `fe_external_no_trash` → `fe_external_no_delete` - Updated all source files, tests, and architecture docs (including `v2-refactor-temp/docs/file-manager/`). - **Intentionally NOT renamed** (out of scope — these are API surface / concept names, not the column name): `moveToTrash`, `restoreFromTrash`, `inTrash` (query flag), `isTrashed`, `batchTrash`, `internalTrash`, and "Trash" as a concept in comments/docs. Fixes # ### Why we need it and why it was done in this way The following tradeoffs were made: - **Scope discipline**: kept the rename strictly at the column-identifier layer (4 identifiers). Did not change API names or concept words — switching the "Trash" concept to "Delete" is a larger semantic change that deserves its own PR. - **Migration 0026 contains a manual SQL patch.** drizzle-orm/drizzle-kit issue [#3653](https://github.com/drizzle-team/drizzle-orm/issues/3653) causes the SQLite rebuild-table path to drop the leading `ALTER TABLE … RENAME COLUMN` statement. The generated `INSERT … SELECT "deleted_at" FROM file_entry` would fail because the source table still has `trashed_at`. The migration manually prepends an explicit `ALTER TABLE file_entry RENAME COLUMN trashed_at TO deleted_at;` before the rebuild. Upstream fix landed in `drizzle-kit@1.0.0-beta`/`rc` but is not backported to the `0.31.x` stable line we depend on. - **Why keeping the manual patch is acceptable**: per `CLAUDE.md` § v2 Refactoring, `migrations/sqlite-drizzle/` is throwaway during v2 — it will be wiped and regenerated as a single clean initial migration from the final schemas before release. Mid-development DB drift is explicitly acceptable, and the manual SQL only needs to survive until that regeneration. The following alternatives were considered: - Selecting `create column` in `drizzle-kit generate` instead of `rename column`: also produces invalid SQL (same root cause — the rebuild path puts the new column name in the `SELECT` list regardless of the rename mapping). Rejected. - Skipping the `0026` migration entirely and relying on `db:push` / DB reset during dev: pollutes `_journal.json` divergence and makes the next schema change confusing. Rejected. - Upgrading to `drizzle-kit@1.0.0-beta`/`rc` to get the fix: v1 is a major rewrite with significant breaking changes (alternation engine rewrite, ORM type system rewrite, migration folder layout change). Out of scope for this PR. Rejected. Links to places where the discussion took place: N/A ### Breaking changes None. Dev-only DB column rename during v2 refactor. No user-visible behavior change. No public API surface change. v1 data never reaches this branch except through migrators in `src/main/data/migration/v2/`. ### Special notes for your reviewer - The single manual edit to drizzle-generated SQL is in `migrations/sqlite-drizzle/0026_sturdy_aqueduct.sql` — look for the `MANUAL PATCH` comment block at the top. Without it the migration will fail to apply. - "Trash" concept words still appear throughout the file-manager codebase by design (function names, comments, docs section headings). If we later want to migrate the whole concept to "Delete", that should be a follow-up PR. ### Checklist This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR. Approvers are expected to review this list. - [x] PR: The PR description is expressive enough and will help future contributors - [x] Code: [Write code that humans can understand](https://en.wikiquote.org/wiki/Martin_Fowler#code-for-humans) and [Keep it simple](https://en.wikipedia.org/wiki/KISS_principle) - [x] Refactor: You have [left the code cleaner than you found it (Boy Scout Rule)](https://learning.oreilly.com/library/view/97-things-every/9780596809515/ch08.html) - [x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required - [ ] Documentation: A [user-guide update](https://docs.cherry-ai.com) was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior. - [x] Self-review: I have reviewed my own code (e.g., via [`/gh-pr-review`](/.claude/skills/gh-pr-review/SKILL.md), `gh pr diff`, or GitHub UI) before requesting review from others ### Release note ```release-note NONE ``` --------- Signed-off-by: icarus <eurfelux@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
English | Official Site | Documents | Development | Feedback
🍒 Cherry Studio
Cherry Studio is a desktop client that supports multiple LLM providers, available on Windows, Mac and Linux.
👏 Join Telegram Group|Discord | QQ Group(575014769)
❤️ Like Cherry Studio? Give it a star 🌟 or Sponsor to support the development!
🌠 Screenshot
🌟 Key Features
- Diverse LLM Provider Support:
- ☁️ Major LLM Cloud Services: OpenAI, Gemini, Anthropic, and more
- 🔗 AI Web Service Integration: Claude, Perplexity, Poe, and others
- 💻 Local Model Support with Ollama, LM Studio
- AI Assistants & Conversations:
- 📚 300+ Pre-configured AI Assistants
- 🤖 Custom Assistant Creation
- 💬 Multi-model Simultaneous Conversations
- Document & Data Processing:
- 📄 Supports Text, Images, Office, PDF, and more
- ☁️ WebDAV File Management and Backup
- 📊 Mermaid Chart Visualization
- 💻 Code Syntax Highlighting
- Practical Tools Integration:
- 🔍 Global Search Functionality
- 📝 Topic Management System
- 🔤 AI-powered Translation
- 🎯 Drag-and-drop Sorting
- 🔌 Mini Program Support
- ⚙️ MCP(Model Context Protocol) Server
- Enhanced User Experience:
- 🖥️ Cross-platform Support for Windows, Mac, and Linux
- 📦 Ready to Use - No Environment Setup Required
- 🎨 Light/Dark Themes and Transparent Window
- 📝 Complete Markdown Rendering
- 🤲 Easy Content Sharing
📝 Roadmap
We're actively working on the following features and improvements:
- 🎯 Core Features
- Selection Assistant with smart content selection enhancement
- Deep Research with advanced research capabilities
- Document Preprocessing with improved document handling
- MCP Marketplace for Model Context Protocol ecosystem
- 🗂 Knowledge Management
- Notes and Collections
- Dynamic Canvas visualization
- OCR capabilities
- TTS (Text-to-Speech) support
- 📱 Platform Support
- HarmonyOS Edition (PC)
- Android App (Phase 1)
- iOS App (Phase 1)
- Multi-Window support
- Window Pinning functionality
- Intel AI PC (Core Ultra) Support
- 🔌 Advanced Features
- Plugin System
- ASR (Automatic Speech Recognition)
- Assistant and Topic Interaction Refactoring
Track our progress and contribute on our project board.
Want to influence our roadmap? Join our GitHub Discussions to share your ideas and feedback!
🌈 Theme
- Theme Gallery: https://cherrycss.com
- Aero Theme: https://github.com/hakadao/CherryStudio-Aero
- PaperMaterial Theme: https://github.com/rainoffallingstar/CherryStudio-PaperMaterial
- Claude dynamic-style: https://github.com/bjl101501/CherryStudio-Claudestyle-dynamic
- Maple Neon Theme: https://github.com/BoningtonChen/CherryStudio_themes
Welcome PR for more themes
🤝 Contributing
We welcome contributions to Cherry Studio! Here are some ways you can contribute:
- Contribute Code: Develop new features or optimize existing code.
- Fix Bugs: Submit fixes for any bugs you find.
- Maintain Issues: Help manage GitHub issues.
- Product Design: Participate in design discussions.
- Write Documentation: Improve user manuals and guides.
- Community Engagement: Join discussions and help users.
- Promote Usage: Spread the word about Cherry Studio.
Refer to the Branching Strategy for contribution guidelines
Getting Started
- Fork the Repository: Fork and clone it to your local machine.
- Create a Branch: For your changes.
- Submit Changes: Commit and push your changes.
- Open a Pull Request: Describe your changes and reasons.
For more detailed guidelines, please refer to our Contributing Guide.
Thank you for your support and contributions!
🔧 Developer Co-creation Program
We are launching the Cherry Studio Developer Co-creation Program to foster a healthy and positive-feedback loop within the open-source ecosystem. We believe that great software is built collaboratively, and every merged pull request breathes new life into the project.
We sincerely invite you to join our ranks of contributors and shape the future of Cherry Studio with us.
Contributor Rewards Program
To give back to our core contributors and create a virtuous cycle, we have established the following long-term incentive plan.
The inaugural tracking period for this program will be Q3 2025 (July, August, September). Rewards for this cycle will be distributed on October 1st.
Within any tracking period (e.g., July 1st to September 30th for the first cycle), any developer who contributes more than 30 meaningful commits to any of Cherry Studio's open-source projects on GitHub will be eligible for the following benefits:
- Cursor Subscription Sponsorship: Receive a $70 USD credit or reimbursement for your Cursor subscription, making AI your most efficient coding partner.
- Unlimited Model Access: Get unlimited API calls for the DeepSeek and Qwen models.
- Cutting-Edge Tech Access: Enjoy occasional perks, including API access to models like Claude, Gemini, and OpenAI, keeping you at the forefront of technology.
Growing Together & Future Plans
A vibrant community is the driving force behind any sustainable open-source project. As Cherry Studio grows, so will our rewards program. We are committed to continuously aligning our benefits with the best-in-class tools and resources in the industry. This ensures our core contributors receive meaningful support, creating a positive cycle where developers, the community, and the project grow together.
Moving forward, the project will also embrace an increasingly open stance to give back to the entire open-source community.
How to Get Started?
We look forward to your first Pull Request!
You can start by exploring our repositories, picking up a good first issue, or proposing your own enhancements. Every commit is a testament to the spirit of open source.
Thank you for your interest and contributions.
Let's build together.
🏢 Enterprise Edition
Building on the Community Edition, we are proud to introduce Cherry Studio Enterprise Edition—a privately-deployable AI productivity and management platform designed for modern teams and enterprises.
The Enterprise Edition addresses core challenges in team collaboration by centralizing the management of AI resources, knowledge, and data. It empowers organizations to enhance efficiency, foster innovation, and ensure compliance, all while maintaining 100% control over their data in a secure environment.
Core Advantages
- Unified Model Management: Centrally integrate and manage various cloud-based LLMs (e.g., OpenAI, Anthropic, Google Gemini) and locally deployed private models. Employees can use them out-of-the-box without individual configuration.
- Enterprise-Grade Knowledge Base: Build, manage, and share team-wide knowledge bases. Ensures knowledge retention and consistency, enabling team members to interact with AI based on unified and accurate information.
- Fine-Grained Access Control: Easily manage employee accounts and assign role-based permissions for different models, knowledge bases, and features through a unified admin backend.
- Fully Private Deployment: Deploy the entire backend service on your on-premises servers or private cloud, ensuring your data remains 100% private and under your control to meet the strictest security and compliance standards.
- Reliable Backend Services: Provides stable API services and enterprise-grade data backup and recovery mechanisms to ensure business continuity.
✨ Online Demo
Version Comparison
| Feature | Community Edition | Enterprise Edition |
|---|---|---|
| Open Source | ✅ Yes | ⭕️ Partially released to customers |
| Cost | AGPL-3.0 License | Buyout / Subscription Fee |
| Admin Backend | — | ● Centralized Model Access ● Employee Management ● Shared Knowledge Base ● Access Control ● Data Backup |
| Server | — | ✅ Dedicated Private Deployment |
Get the Enterprise Edition
We believe the Enterprise Edition will become your team's AI productivity engine. If you are interested in Cherry Studio Enterprise Edition and would like to learn more, request a quote, or schedule a demo, please feel free to contact us.
- For Business Inquiries & Purchasing: 📧 bd@cherry-ai.com
🔗 Related Projects
-
new-api: The next-generation LLM gateway and AI asset management system supports multiple languages.
-
one-api: LLM API management and distribution system supporting mainstream models like OpenAI, Azure, and Anthropic. Features a unified API interface, suitable for key management and secondary distribution.
-
Poe: Poe gives you access to the best AI, all in one place. Explore GPT-5, Claude Opus 4.1, DeepSeek-R1, Veo 3, ElevenLabs, and millions of others.
-
ublacklist: Blocks specific sites from appearing in Google search results
🚀 Contributors
📊 GitHub Stats
⭐️ Star History
📜 License
The Cherry Studio Community Edition is governed by the standard GNU Affero General Public License v3.0 (AGPL-3.0), available at https://www.gnu.org/licenses/agpl-3.0.html.
Use of the Cherry Studio Community Edition for commercial purposes is permitted, subject to full compliance with the terms and conditions of the AGPL-3.0 license.
Should you require a commercial license that provides an exemption from the AGPL-3.0 requirements, please contact us at bd@cherry-ai.com.