Commit Graph

4164 Commits

Author SHA1 Message Date
icarus
7d48bc5c5a ci(i18n): replace prettier with biome for i18n formatting
Update the auto-i18n workflow to use Biome instead of Prettier for formatting translated files. This change simplifies the dependencies by removing multiple Prettier plugins and using a single tool for formatting.
2025-09-15 07:23:03 +08:00
icarus
76c19ea59f build: replace prettier with biome for formatting
Use biome as the default formatter instead of prettier for better performance and modern tooling support
2025-09-15 07:19:27 +08:00
icarus
9228eb3102 chore: replace prettier with biome for code formatting
Remove all prettier-related configuration, dependencies, and references
Update formatting scripts and documentation to use biome instead
Adjust electron-builder config to exclude biome.jsonc
2025-09-15 07:18:38 +08:00
icarus
b8f5f837cb chore: remove prettier dependency and format package.json files
- Remove prettier from dependencies as it's no longer needed
- Reformat package.json files for better readability
2025-09-15 07:12:18 +08:00
icarus
8d12ea9611 style(biome): update biome.jsonc config with clearer comment
Add explanation for keeping bracketSameLine as true to minimize changes in current PR while noting false would be better for future
2025-09-15 07:09:57 +08:00
icarus
5b90967693 style: format code and clean up whitespace
- Remove unnecessary whitespace in CSS and TS files
- Format package.json files to consistent style
- Reorder tsconfig.json properties alphabetically
- Improve code formatting in React components
2025-09-15 07:08:36 +08:00
icarus
c7aaf3f6c0 Revert "style: format JSX closing brackets for better readability"
This reverts commit d442c934ee.
2025-09-15 07:07:57 +08:00
icarus
9a084c941a style: set bracketSameLine to true in biome config
The change aligns with common JSX formatting preferences where brackets on the same line improve readability for many developers
2025-09-15 07:07:49 +08:00
icarus
d442c934ee style: format JSX closing brackets for better readability 2025-09-15 07:05:09 +08:00
icarus
8a74356ff5 chore: update biome config and format commands
- Exclude tailwind.css from linter includes
- Add biome lint to format commands
2025-09-15 07:04:55 +08:00
icarus
e0e09b2de2 chore: update biome.jsonc to use single quotes for CSS formatting 2025-09-15 06:59:10 +08:00
icarus
f5d78a32dd style: change JSX quote style from single to double 2025-09-15 06:57:31 +08:00
icarus
d8cccfb4ce style: change quote style from double to single in biome config 2025-09-15 06:56:44 +08:00
icarus
865a9507aa style: change quote styles in biome.jsonc to use single quotes for JSX and double quotes for JS 2025-09-15 06:54:56 +08:00
icarus
496d747b8d fix: remove json import assertion for biome compatibility
The import assertion syntax is not supported by biome, so it was replaced with a standard import statement.
2025-09-15 06:52:06 +08:00
icarus
7a00c66dd3 Revert "style: standardize quote usage and fix JSX formatting"
This reverts commit 0947f8505d.
2025-09-15 06:51:25 +08:00
icarus
0947f8505d style: standardize quote usage and fix JSX formatting
- Replace single quotes with double quotes in CSS imports and selectors
- Fix JSX element closing bracket alignment and formatting
- Standardize JSON formatting in package.json files
2025-09-15 06:48:17 +08:00
icarus
dbcd12fe2c chore: exclude tailwind.css from biome formatting 2025-09-15 06:47:05 +08:00
icarus
178ab1b6ee refactor: simplify error type annotations from Error | any to any
The change standardizes error handling by using 'any' type instead of union types with Error | any, making the code more consistent and reducing unnecessary type complexity.
2025-09-15 06:38:54 +08:00
icarus
4a8d77c1a3 style(biome): update ignore patterns and jsx quote style
Update file ignore patterns from `/*` to `/**` for consistency
Change jsxQuoteStyle from single to double quotes for alignment with project standards
2025-09-15 06:38:33 +08:00
icarus
fcf0bf1fc0 chore: migrate biome config from json to jsonc format
The new jsonc format allows for comments in the configuration file, making it more maintainable and easier to document configuration choices.
2025-09-15 06:35:12 +08:00
icarus
251fdc157d chore: update biome.json configuration
- Enable linter and set custom rules
- Change jsxQuoteStyle to single quotes
- Add json parser configuration
- Set formatWithErrors to true
2025-09-15 06:29:32 +08:00
icarus
cca4d4f19e refactor(eslint): remove unused prettier config and imports 2025-09-15 06:07:23 +08:00
icarus
df707ffe39 build: migrate from prettier to biome for formatting
Update package.json scripts and biome.json configuration to use biome instead of prettier for code formatting. Adjust biome formatter includes/excludes patterns for better file matching.
2025-09-15 06:05:27 +08:00
icarus
025685881f build: add biome.json configuration file for code formatting 2025-09-15 05:44:00 +08:00
icarus
bf8d6c568e chore: migrate from prettier to biome for code formatting
Update VSCode settings to use Biome as the default formatter for multiple languages
Add Biome to code actions on save and reorder search exclude patterns
2025-09-15 05:43:55 +08:00
icarus
7b943a67d1 chore: add biome extension to vscode recommendations 2025-09-15 05:33:30 +08:00
icarus
32d6b7d476 build: add @biomejs/biome as a dependency 2025-09-15 05:32:19 +08:00
fullex
95ed17aa69 Merge branch 'main' of github.com:CherryHQ/cherry-studio 2025-09-14 23:57:57 +08:00
fullex
4f64afd8f4 chore: update .prettierignore to include additional directories and file types for improved formatting consistency 2025-09-14 23:57:50 +08:00
Jason Young
4f8b5c1250
QuickPanel/Inputbar: refine Enter handling with collapsed panel (#9781)
- QuickPanel (view.tsx): do not intercept Enter/NumpadEnter when the panel is visible but collapsed (no non-pinned matches), so the event falls through to the input bar and sending works.
- Inputbar (Inputbar.tsx): prioritize the configured send shortcut on Enter; remove pre-blocking based on quickPanel visibility; keep Shift+Enter as native newline; insert newline for other Enter variants.
- Update inline comments to clearly document the behavior.
2025-09-14 22:36:20 +08:00
fullex
6eccb92817 chore: add CODEOWNERS file to improve pr reviews handling for data refactor 2025-09-14 21:05:39 +08:00
fullex
734ddd7489
Update pr-ci.yml to include v2 branch 2025-09-14 18:41:19 +08:00
Phantom
ea4db1c864
refactor(context): move HeroUIProvider to context directory (#10155)
Centralize context providers in a dedicated directory for better organization and maintainability
2025-09-14 16:01:30 +08:00
Phantom
f9171f3df8
fix(ThemeProvider): set document language based on user settings (#10154)
* fix(ThemeProvider): set document language based on user settings

Add language from settings to ThemeProvider context and update document language attribute accordingly

* fix(ThemeProvider): add language to dependency array to prevent stale closures
2025-09-14 15:41:43 +08:00
Phantom
9b1e9552d6
fix: correct disk quota display by converting bytes to GB (#10160)
* fix: correct disk quota display by converting bytes to GB

The free disk space was being logged in bytes instead of GB, making the log message misleading. Convert the value to GB for accurate reporting.

* fix: format disk quota log to 2 decimal places
2025-09-14 12:14:15 +08:00
Phantom
c9bb3ff6f6
chore(store): bump persisted reducer version to 154 (#10148)
* chore(store): bump persisted reducer version to 154

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

* Update fr-fr.json

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Pleasure1234 <3196812536@qq.com>
2025-09-13 21:38:24 +08:00
Licardo
993d497aad
feature: add option to change font (#10133)
* feature: add option to change font

1. set app global font
2. set code block font

Signed-off-by: Albert Abdilim <albert.abdilim@foxmail.com>

* formatted code with Prettier

* fix ci errors

1.add migration in `migrate.ts`
2.add to-be-translated strings by running `yarn sync:i18n`

* chore: update yarn.lock to include font-list package version 2.0.0

* fix migration issue

---------

Signed-off-by: Albert Abdilim <albert.abdilim@foxmail.com>
Co-authored-by: suyao <sy20010504@gmail.com>
2025-09-13 20:36:13 +08:00
SuYao
80afb3a86e
feat: add Perplexity SDK integration (#10137)
* feat: add Perplexity SDK integration

* feat: enhance AiSdkToChunkAdapter with web search capabilities

- Added support for web search in AiSdkToChunkAdapter, allowing for dynamic link conversion based on provider type.
- Updated constructor to accept provider type and web search enablement flag.
- Improved link handling logic to buffer and process incomplete links.
- Enhanced message block handling in the store to accommodate new message structure.
- Updated middleware configuration to include web search option.

* fix

* fix

* chore: remove unuseful code

* fix: ci

* chore: log
2025-09-13 00:06:18 +08:00
Phantom
f5d8974d04
fix(provider): wrong new api provider id (#10136)
refactor(provider): wrap system provider checks in isSystemProvider

Centralize system provider checks to improve maintainability and reduce code duplication
2025-09-12 20:57:32 +08:00
Phantom
276269e583
style(MinApp): responsive layout for MinAppPage (#10125)
style(MinApp): adjust container styles for better layout

- Add min-height to MinApp container
- Remove absolute positioning from search bar
- Improve flex and overflow handling in containers
- Adjust margins and widths for better spacing
2025-09-12 16:00:39 +08:00
SuYao
8f36c4e793
fix: referer (#10124)
* fix: referer

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

---------

Co-authored-by: GitHub Action <action@github.com>
2025-09-12 13:31:18 +08:00
Pleasure1234
5f999d3c84
fix: improve notes sidebar functionality and i18n text updates (#10112)
* fix: improve notes sidebar functionality and i18n text updates

- Update breadcrumb navigation with clickable folder navigation and proper overflow handling
- Add file selection dialog for markdown imports alongside drag-and-drop
- Improve button order in sidebar header (new note first, then new folder)
- Update i18n text: "markdown" → ".md" for clarity and "star" → "favorite note" for consistency
- Fix file upload logic for better parent node handling

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

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

* fix: code review

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-12 12:56:30 +08:00
one
d68aafea15
fix: infinite loops in KnowledgeBaseButton and MentionModelsButton (#10118) 2025-09-12 09:30:47 +08:00
one
e093ae72da
fix: toast style across windows (#10113) 2025-09-11 22:23:38 +08:00
Phantom
d17362d8c4
refactor(OGCard): replace static image with dynamic generated graph (#10115)
* refactor(OGCard): replace static image with dynamic generated graph

- Replace CherryLogo import with GeneratedGraph component for dynamic preview
- Extract image height to constant for consistency
- Use useCallback for GeneratedGraph to optimize performance

* chore: remove unused banner.png asset

* style(OGCard): change image height from pixels to rem units

Use rem units for better responsiveness and consistency with the design system
2025-09-11 22:20:52 +08:00
Phantom
5e19e7ac6c
fix(toolUsePlugin): handle empty tools case in prompt generation (#10111)
Return null when no tools are available and skip tool section in system prompt
2025-09-11 21:21:55 +08:00
beyondkmp
871565c687
feat: add data limit warning notification (#8866)
* feat: add disk space checking functionality

- Introduced a new IPC channel for retrieving disk information.
- Integrated the 'check-disk-space' package to fetch available and total disk space.
- Updated the preload API to expose the new disk info retrieval method to the renderer.

* feat: implement disk space warning and data limit checks

- Added functionality to check available disk space and display warnings when storage is low.
- Updated IPC methods to pass directory paths for disk info retrieval.
- Introduced periodic checks for app data disk quota and internal storage quota.
- Enhanced user notifications with localized messages for low storage warnings.

* fix: enhance disk space warning logic and improve logging

- Added additional conditions for displaying disk space warnings based on free percentage thresholds.
- Improved logging format for app data disk quota, providing clearer output in GB.
- Refactored the checkDataLimit function to be asynchronous for better performance.

* format code

* update log format

* fix: improve error handling and logging in disk quota checks

- Added try-catch block in checkAppDataDiskQuota to handle potential errors when retrieving disk information.
- Ensured that errors are logged for better debugging and visibility.
- Updated checkDataLimit to await the checkAppDataDiskQuota function for proper asynchronous handling.

* fix comments

* fix: remove redundant appStorageQuota message from localization files

* lint

* fix: enhance disk space warning logic for USB disks

- Added a condition to warn users when free space on USB disks falls below 5% of total capacity.
- Improved the existing logic for displaying disk space warnings based on total disk size thresholds.

* update i18n

* Refactor data limit notification logic and update i18n messages for disk space warnings. Adjusted check intervals and improved toast notifications for low disk space alerts.

* Fix disk quota check logic in useDataLimit hook to correctly compare free space against 1GB threshold.

* refactor: update styles and improve navbar handling

- Removed unnecessary margin-bottom style from bubble markdown.
- Adjusted margin in Prompt component for better layout.
- Enhanced useAppInit hook to include navbar position logic for background styling.
- Added alignment to ErrorBlock alert for improved visual consistency.

* refactor: relocate checkDataLimit function to utils and update import in useAppInit hook

- Moved checkDataLimit function from useDataLimit hook to utils for better organization.
- Updated import path in useAppInit to reflect the new location of checkDataLimit.
- Removed the now obsolete useDataLimit hook file.

* refactor: update getDiskInfo API to specify return type

- Enhanced getDiskInfo function to explicitly define the return type as a Promise containing disk information or null.

* lint err

* fix: handle null response from getDiskInfo in checkAppDataDiskQuota

- Added a check for null response from getDiskInfo to prevent errors.
- Updated the logic to extract the free disk space only if diskInfo is valid.

---------

Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-09-11 21:04:20 +08:00
SuYao
6104b7803b
refactor: MCPService for improved error handling and header management (#10100)
* refactor MCPService for improved error handling and header management

* refactor MCPService: reorder header preparation for improved clarity

* refactor: enhance MCP server type determination and clean up error handling
2025-09-11 20:52:13 +08:00
one
95a332f38a
fix: api key hints (#10109) 2025-09-11 19:05:41 +08:00