🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.
Go to file
Phantom 4a38fd6ebc
feat(ui): new Switch (#11061)
* refactor(ui): migrate switch component from heroui to radix-ui

replace heroui switch implementation with radix-ui for better maintainability
update package.json and yarn.lock to include new dependency

* fix(eslint): enable heroui import restriction for deprecated Switch component

* refactor(ui): update Switch component props from isSelected/onValueChange to checked/onCheckedChange

Standardize Switch component props across the codebase to use checked/onCheckedChange instead of isSelected/onValueChange for better consistency with common React patterns. Also updates loading state prop from isLoading to loading and removes size prop where unnecessary.

The changes include:
- Replacing isSelected with checked
- Replacing onValueChange with onCheckedChange
- Updating isLoading to loading
- Removing redundant size props
- Adjusting styling to accommodate new loading state

* refactor(switch): improve switch component styling and structure

- Add default values for loading and disabled props
- Update styling classes and add group cursor pointer
- Restructure loading indicator and thumb positioning
- Wrap DescriptionSwitch children in flex container

* refactor(ui): improve switch component structure and usage

- Restructure DescriptionSwitch to use explicit props instead of children
- Add label, description, and position props for better customization
- Update all switch usages in SettingsTab to use new props format

* refactor(primitives): simplify switch props by omitting children

Remove redundant children prop from CustomSwitchProps since it's already omitted from the parent type

* fix(switch): add useId for label accessibility in DescriptionSwitch

Ensure proper label association with switch input by generating unique ID using React's useId hook

* refactor(settings): remove commented out SettingRowTitleSmall components

* refactor(SettingsTab): add todo comment for memoization optimization

* feat(switch): add size prop to customize switch dimensions

Add sm, md, and lg size options to the Switch component with corresponding styles. This allows for better visual consistency across different UI contexts.

* style(ui): adjust switch component styling and theme colors

update switch component layout and spacing to improve consistency
modify secondary-foreground color variable to use correct semantic token

* feat(switch): add new switch component styles and animations

- Add new switch.css file with gradient and transition styles
- Update switch.tsx component with new styling classes and animations
- Remove loader icon in favor of animated gradient effect

* fix(i18n): Auto update translations for PR #11061

* style(primitives): remove redundant border style from switch component

* refactor(switch): remove switch.css and update switch component styles

Remove deprecated switch.css file and migrate styles to inline tailwind classes. Update disabled state styling to use opacity instead of linear gradient for better consistency.

* refactor(switch): simplify switch thumb implementation

Replace complex div structure with svg for loading state
Adjust disabled opacity and loading state styling

* style(switch): adjust thumb size and positioning for better consistency

* feat(switch): add storybook documentation for switch component

Add comprehensive Storybook documentation for the Switch component, including:
- Basic usage examples
- Different states (checked, disabled, loading)
- Size variations
- DescriptionSwitch variant
- Real-world usage scenarios
- Accessibility examples
- Form integration examples

Also remove redundant box-content class from switch styles

* fix(switch): adjust thumb positioning for md and lg sizes

* style(primitives): improve switch component styling and spacing

- Add padding to the container
- Simplify label height logic
- Update typography classes for better consistency
- Adjust switch container alignment

* feat(switch): add size prop to DescriptionSwitch component

Add support for sm, md, and lg sizes to DescriptionSwitch component with responsive text sizing. Also includes comprehensive Storybook documentation with examples of all sizes and states.

* style(switch): align label text to right when isLeftSide is true

* refactor(stories): clean up DescriptionSwitch stories by removing unused imports and simplifying JSX

* refactor(ui): rename CustomizedSwitch to Switch for consistency

Simplify component naming by removing redundant 'Customized' prefix and aligning with common naming conventions

* refactor(switch): extract switch root styles into cva variants

Improve maintainability by using class-variance-authority to manage switch root styles and variants

* refactor(switch): extract thumb variants into separate cva function

Improve maintainability by moving switch thumb styling logic into a dedicated variants configuration. This makes the component more readable and easier to modify.

* feat(switch): add classNames prop for custom styling

Allow custom class names to be applied to switch root, thumb, and thumbSvg elements for more flexible styling options.

* feat(switch): add loading animation variants for switch thumb

Extract loading animation logic into separate cva variants for better maintainability and reusability

---------

Co-authored-by: GitHub Action <action@github.com>
2025-12-01 17:04:43 +08:00
.github chore: add CODEOWNERS entry for v2-refactor-temp directory 2025-11-29 19:36:42 +08:00
.husky chore(pre-commit): add pre-commit hook to enforce code style (#3351) 2025-03-15 11:09:11 +08:00
.vscode fix(tailwindCSS): add experimental classRegex for improved class management 2025-11-07 11:26:00 +08:00
.yarn fix: header merging logic via chore ai-sdk (#11443) 2025-11-26 12:31:55 +08:00
build refactor: fix asar integration (#9753) 2025-09-01 19:48:24 +08:00
config ♻️ refactor: implement config-based update system with version compatibility control (#11147) 2025-11-14 17:49:40 +08:00
docs docs: correct the links on the readme (#11477) 2025-11-26 21:17:25 +08:00
migrations chore: format 2025-09-06 18:32:33 +08:00
packages feat(ui): new Switch (#11061) 2025-12-01 17:04:43 +08:00
resources Refactor/inputbar (#10332) 2025-11-12 20:04:58 +08:00
scripts ♻️ refactor: implement config-based update system with version compatibility control (#11147) 2025-11-14 17:49:40 +08:00
src feat(ui): new Switch (#11061) 2025-12-01 17:04:43 +08:00
tests Merge branch 'main' into v2 2025-11-28 17:22:54 +08:00
v2-refactor-temp feat: add v2-refactor-temp directory for V2 refactoring tools 2025-11-29 11:55:45 +08:00
.editorconfig style: set eol to lf, code formatting (#7923) 2025-07-08 09:50:33 +08:00
.env.example feat: 移除特性标志相关代码,简化消息存储逻辑 2025-09-23 17:40:29 +08:00
.git-blame-ignore-revs chore: git blame ignore (#7925) 2025-07-08 14:23:55 +08:00
.gitattributes style: set eol to lf, code formatting (#7923) 2025-07-08 09:50:33 +08:00
.gitignore Merge remote-tracking branch 'origin/main' into feat/agents-new 2025-09-21 17:25:02 +08:00
.npmrc opt: optimise local dev with fixed yarn (#3456) 2025-03-19 13:18:11 +08:00
.oxlintrc.json Merge branch 'main' into v2 2025-11-28 17:22:54 +08:00
.yarnrc.yml Perf/tsgo (#10188) 2025-09-16 10:16:42 +08:00
AGENTS.md feat(sessions): add session message creation endpoint and update session details 2025-09-14 17:09:32 +08:00
app-upgrade-config.json ♻️ refactor: implement config-based update system with version compatibility control (#11147) 2025-11-14 17:49:40 +08:00
biome.jsonc Merge branch 'main' into v2 2025-11-24 16:22:32 +08:00
CLAUDE.md Merge branch 'main' into v2 2025-12-01 09:06:24 +08:00
CODE_OF_CONDUCT.md docs: update documentation for a more inclusive environment and added japanese and chinese documentation 2024-10-25 00:09:01 +08:00
CONTRIBUTING.md docs: update docs directory structure 2025-11-26 13:17:01 +08:00
dev-app-update.yml feat: add after-build script for renaming files and updating latest.yml 2025-04-14 17:14:45 +08:00
electron-builder.yml Merge branch 'main' into v2 2025-12-01 09:06:24 +08:00
electron.vite.config.ts refactor: remove obsolete data refactor migration components and related tests 2025-11-20 23:03:00 +08:00
eslint.config.mjs feat(ui): new Switch (#11061) 2025-12-01 17:04:43 +08:00
LICENSE Merge branch 'main' into v2 2025-10-23 17:41:21 +08:00
package.json feat(ui): new Switch (#11061) 2025-12-01 17:04:43 +08:00
playwright.config.ts feat(test): e2e framework (#11494) 2025-11-27 19:52:31 +08:00
README.md docs: correct the links on the readme (#11477) 2025-11-26 21:17:25 +08:00
SECURITY.md refactor: model list and health check (#7997) 2025-07-21 15:57:08 +08:00
tsconfig.json feat: integrate HeroUI and Tailwind CSS for enhanced styling (#9973) 2025-09-07 16:49:30 +08:00
tsconfig.node.json feat(preferences): add memory, note, and UI preference mappings 2025-11-28 23:27:57 +08:00
tsconfig.web.json Merge branch 'main' into v2 2025-11-28 17:22:54 +08:00
vitest.config.ts fix: preserve openrouter reasoning with web search (#11505) 2025-11-28 13:56:46 +08:00
yarn.lock feat(ui): new Switch (#11061) 2025-12-01 17:04:43 +08:00

banner

English | 中文 | Official Site | Documents | Development | Feedback

Featured|HelloGitHub CherryHQ%2Fcherry-studio | Trendshift Cherry Studio - AI Chatbots, AI Desktop Client | Product Hunt

🍒 Cherry Studio

Cherry Studio is a desktop client that supports multiple LLM providers, available on Windows, Mac and Linux.

👏 Join Telegram GroupDiscord | QQ Group(575014769)

❤️ Like Cherry Studio? Give it a star 🌟 or Sponsor to support the development!

🌠 Screenshot

🌟 Key Features

  1. 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
  1. AI Assistants & Conversations:
  • 📚 300+ Pre-configured AI Assistants
  • 🤖 Custom Assistant Creation
  • 💬 Multi-model Simultaneous Conversations
  1. Document & Data Processing:
  • 📄 Supports Text, Images, Office, PDF, and more
  • ☁️ WebDAV File Management and Backup
  • 📊 Mermaid Chart Visualization
  • 💻 Code Syntax Highlighting
  1. Practical Tools Integration:
  • 🔍 Global Search Functionality
  • 📝 Topic Management System
  • 🔤 AI-powered Translation
  • 🎯 Drag-and-drop Sorting
  • 🔌 Mini Program Support
  • ⚙️ MCP(Model Context Protocol) Server
  1. 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:

  1. 🎯 Core Features
  • Selection Assistant with smart content selection enhancement
  • Deep Research with advanced research capabilities
  • Memory System with global context awareness
  • Document Preprocessing with improved document handling
  • MCP Marketplace for Model Context Protocol ecosystem
  1. 🗂 Knowledge Management
  • Notes and Collections
  • Dynamic Canvas visualization
  • OCR capabilities
  • TTS (Text-to-Speech) support
  1. 📱 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
  1. 🔌 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

Welcome PR for more themes

🤝 Contributing

We welcome contributions to Cherry Studio! Here are some ways you can contribute:

  1. Contribute Code: Develop new features or optimize existing code.
  2. Fix Bugs: Submit fixes for any bugs you find.
  3. Maintain Issues: Help manage GitHub issues.
  4. Product Design: Participate in design discussions.
  5. Write Documentation: Improve user manuals and guides.
  6. Community Engagement: Join discussions and help users.
  7. Promote Usage: Spread the word about Cherry Studio.

Refer to the Branching Strategy for contribution guidelines

Getting Started

  1. Fork the Repository: Fork and clone it to your local machine.
  2. Create a Branch: For your changes.
  3. Submit Changes: Commit and push your changes.
  4. 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

🔗 Cherry Studio Enterprise

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.

🔗 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

Stats

Star History

Star History Chart

📜 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.