From 68a75dc4e3fc5944b9f0ac9a56a41293556cbdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=C2=B7Dong?= <98630204+GeorgeDong32@users.noreply.github.com> Date: Sun, 4 Jan 2026 18:07:49 +0800 Subject: [PATCH 1/9] feat(code-tools): add 302.AI as Claude Code provider (#12254) * feat(code-tools): add 302.AI as Claude Code provider * feat(agent): add 302.AI anthropicApiHost to enable Agent support 302.AI now supports Claude Code (Agent) functionality by configuring the anthropicApiHost endpoint. Users can use 302.AI's Claude models (claude-sonnet-4-20250514, claude-opus-4-20250514) with Agent. * feat(migrate): add migration 192 to set 302ai API host --- src/renderer/src/config/providers.ts | 1 + src/renderer/src/pages/code/index.ts | 6 ++++++ src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/migrate.ts | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index 9e2831ee6e..f49794aaa7 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -212,6 +212,7 @@ export const SYSTEM_PROVIDERS_CONFIG: Record = type: 'openai', apiKey: '', apiHost: 'https://api.302.ai', + anthropicApiHost: 'https://api.302.ai', models: SYSTEM_MODELS['302ai'], isSystem: true, enabled: false diff --git a/src/renderer/src/pages/code/index.ts b/src/renderer/src/pages/code/index.ts index 78347cd2c7..81f5ddddc3 100644 --- a/src/renderer/src/pages/code/index.ts +++ b/src/renderer/src/pages/code/index.ts @@ -43,6 +43,7 @@ export const CLAUDE_SUPPORTED_PROVIDERS = [ 'dmxapi', 'new-api', 'cherryin', + '302ai', ...CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS ] export const OPENAI_CODEX_SUPPORTED_PROVIDERS = ['openai', 'openrouter', 'aihubmix', 'new-api', 'cherryin'] @@ -96,6 +97,11 @@ export const getCodeToolsApiBaseUrl = (model: Model, type: EndpointType) => { anthropic: { api_base_url: 'https://api.minimaxi.com/anthropic' } + }, + '302ai': { + anthropic: { + api_base_url: 'https://api.302.ai' + } } } diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 3d21d12cc7..4727bdc1e7 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -83,7 +83,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 191, + version: 192, blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs', 'toolPermissions'], migrate }, diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 9375dc3b75..272d9fbaa4 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -3144,6 +3144,20 @@ const migrateConfig = { logger.error('migrate 191 error', error as Error) return state } + }, + '192': (state: RootState) => { + try { + state.llm.providers.forEach((provider) => { + if (provider.id === '302ai') { + provider.anthropicApiHost = 'https://api.302.ai' + } + }) + logger.info('migrate 192 success') + return state + } catch (error) { + logger.error('migrate 192 error', error as Error) + return state + } } } From a2639053ef5906d0faa48d110d678d1abf400d33 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 4 Jan 2026 18:36:03 +0800 Subject: [PATCH 2/9] chore(release): v1.7.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- electron-builder.yml | 58 +++++++++++++++++-------------- package.json | 2 +- src/renderer/src/store/migrate.ts | 1 + 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/electron-builder.yml b/electron-builder.yml index 8af4642f05..bf7b7b4e91 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -134,38 +134,44 @@ artifactBuildCompleted: scripts/artifact-build-completed.js releaseInfo: releaseNotes: | - Cherry Studio 1.7.8 - Bug Fixes & Performance Improvements + Cherry Studio 1.7.9 - New Features & Bug Fixes - This release focuses on bug fixes and performance optimizations. - - ⚡ Performance - - [ModelList] Improve model list loading performance + ✨ New Features + - [Agent] Add 302.AI provider support + - [Browser] Browser data now persists and supports multiple tabs + - [Language] Add Romanian language support + - [Search] Add fuzzy search for file list + - [Models] Add latest Zhipu models + - [Image] Improve text-to-image functionality 🐛 Bug Fixes - - [Ollama] Fix new users unable to use Ollama models - - [Ollama] Improve reasoningEffort handling - - [Assistants] Prevent deleting last assistant and add error message - - [Shortcut] Fix shortcut icons sorting disorder - - [Memory] Fix global memory settings submit failure - - [Windows] Fix remember size not working for SelectionAction window - - [Anthropic] Fix API base URL handling - - [Files] Allow more file extensions + - [Mac] Fix mini window unexpected closing issue + - [Preview] Fix HTML preview controls not working in fullscreen + - [Translate] Fix translation duplicate execution issue + - [Zoom] Fix page zoom reset issue during navigation + - [Agent] Fix crash when switching between agent and assistant + - [Agent] Fix navigation in agent mode + - [Copy] Fix markdown copy button issue + - [Windows] Fix compatibility issues on non-Windows systems - Cherry Studio 1.7.8 - 问题修复与性能优化 + Cherry Studio 1.7.9 - 新功能与问题修复 - 本次更新专注于问题修复和性能优化。 - - ⚡ 性能优化 - - [模型列表] 提升模型列表加载性能 + ✨ 新功能 + - [Agent] 新增 302.AI 服务商支持 + - [浏览器] 浏览器数据现在可以保存,支持多标签页 + - [语言] 新增罗马尼亚语支持 + - [搜索] 文件列表新增模糊搜索功能 + - [模型] 新增最新智谱模型 + - [图片] 优化文生图功能 🐛 问题修复 - - [Ollama] 修复新用户无法使用 Ollama 模型的问题 - - [Ollama] 改进推理参数处理 - - [助手] 防止删除最后一个助手并添加错误提示 - - [快捷方式] 修复快捷方式图标排序混乱 - - [记忆] 修复全局记忆设置提交失败 - - [窗口] 修复 SelectionAction 窗口记住尺寸不生效 - - [Anthropic] 修复 API 地址处理 - - [文件] 允许更多文件扩展名 + - [Mac] 修复迷你窗口意外关闭的问题 + - [预览] 修复全屏模式下 HTML 预览控件无法使用的问题 + - [翻译] 修复翻译重复执行的问题 + - [缩放] 修复页面导航时缩放被重置的问题 + - [智能体] 修复在智能体和助手间切换时崩溃的问题 + - [智能体] 修复智能体模式下的导航问题 + - [复制] 修复 Markdown 复制按钮问题 + - [兼容性] 修复非 Windows 系统的兼容性问题 diff --git a/package.json b/package.json index 250abf1b9a..6dddf4fd4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CherryStudio", - "version": "1.7.8", + "version": "1.7.9", "private": true, "description": "A powerful AI assistant for producer.", "main": "./out/main/index.js", diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 272d9fbaa4..8719cdb7c1 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -3152,6 +3152,7 @@ const migrateConfig = { provider.anthropicApiHost = 'https://api.302.ai' } }) + state.settings.readClipboardAtStartup = false logger.info('migrate 192 success') return state } catch (error) { From d27d750bc5fec5270469a5d27370e73fd9298c70 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 4 Jan 2026 19:17:54 +0800 Subject: [PATCH 3/9] feat(i18n): add "open" label for app data directory in multiple languages --- src/renderer/src/i18n/locales/en-us.json | 1 + src/renderer/src/i18n/locales/zh-cn.json | 1 + src/renderer/src/i18n/locales/zh-tw.json | 1 + src/renderer/src/i18n/translate/de-de.json | 1 + src/renderer/src/i18n/translate/el-gr.json | 1 + src/renderer/src/i18n/translate/es-es.json | 1 + src/renderer/src/i18n/translate/fr-fr.json | 1 + src/renderer/src/i18n/translate/ja-jp.json | 1 + src/renderer/src/i18n/translate/pt-pt.json | 1 + src/renderer/src/i18n/translate/ro-ro.json | 1 + src/renderer/src/i18n/translate/ru-ru.json | 1 + .../src/pages/settings/AboutSettings.tsx | 4 +-- .../settings/DataSettings/DataSettings.tsx | 32 ++++++------------- 13 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 9e60f31f00..41d5933311 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -3165,6 +3165,7 @@ "label": "App Data", "migration_title": "Data Migration", "new_path": "New Path", + "open": "Open Directory", "original_path": "Original Path", "path_change_failed": "Failed to change data directory", "path_changed_without_copy": "Path changed successfully", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index b9b07a596c..252758d6e5 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -3165,6 +3165,7 @@ "label": "应用数据", "migration_title": "数据迁移", "new_path": "新路径", + "open": "打开目录", "original_path": "原始路径", "path_change_failed": "数据目录更改失败", "path_changed_without_copy": "路径已更改成功", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 3d613f00f4..e1bc20d092 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -3165,6 +3165,7 @@ "label": "應用程式資料", "migration_title": "資料移轉", "new_path": "新路徑", + "open": "開啟目錄", "original_path": "原始路徑", "path_change_failed": "資料目錄變更失敗", "path_changed_without_copy": "路徑已變更成功", diff --git a/src/renderer/src/i18n/translate/de-de.json b/src/renderer/src/i18n/translate/de-de.json index 402437f1e8..d5445961e5 100644 --- a/src/renderer/src/i18n/translate/de-de.json +++ b/src/renderer/src/i18n/translate/de-de.json @@ -3165,6 +3165,7 @@ "label": "Anwendungsdaten", "migration_title": "Datenmigration", "new_path": "Neuer Pfad", + "open": "Offenes Verzeichnis", "original_path": "Ursprünglicher Pfad", "path_change_failed": "Datenverzeichnisänderung fehlgeschlagen", "path_changed_without_copy": "Pfad erfolgreich geändert", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index 1fb0b08abb..d0cfe0579c 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -3165,6 +3165,7 @@ "label": "Δεδομένα εφαρμογής", "migration_title": "Μεταφορά δεδομένων", "new_path": "Νέα διαδρομή", + "open": "Ανοιχτός Κατάλογος", "original_path": "Αρχική διαδρομή", "path_change_failed": "Η αλλαγή του καταλόγου δεδομένων απέτυχε", "path_changed_without_copy": "Η διαδρομή άλλαξε επιτυχώς", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index 1aa78e82dd..039a289e7a 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -3165,6 +3165,7 @@ "label": "Datos de la aplicación", "migration_title": "Migración de datos", "new_path": "Nueva ruta", + "open": "Directorio abierto", "original_path": "Ruta original", "path_change_failed": "Error al cambiar el directorio de datos", "path_changed_without_copy": "La ruta se ha cambiado correctamente", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 4906109228..352678c4ad 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -3165,6 +3165,7 @@ "label": "Données de l'application", "migration_title": "Migration des données", "new_path": "Nouveau chemin", + "open": "Répertoire ouvert", "original_path": "Chemin d'origine", "path_change_failed": "Échec de la modification du répertoire de données", "path_changed_without_copy": "Le chemin a été modifié avec succès", diff --git a/src/renderer/src/i18n/translate/ja-jp.json b/src/renderer/src/i18n/translate/ja-jp.json index 950fef7130..b58fe588f6 100644 --- a/src/renderer/src/i18n/translate/ja-jp.json +++ b/src/renderer/src/i18n/translate/ja-jp.json @@ -3165,6 +3165,7 @@ "label": "アプリデータ", "migration_title": "データ移行", "new_path": "新しいパス", + "open": "オープンディレクトリ", "original_path": "元のパス", "path_change_failed": "データディレクトリの変更に失敗しました", "path_changed_without_copy": "パスが変更されました。", diff --git a/src/renderer/src/i18n/translate/pt-pt.json b/src/renderer/src/i18n/translate/pt-pt.json index 73c8e28e4d..24a38261ca 100644 --- a/src/renderer/src/i18n/translate/pt-pt.json +++ b/src/renderer/src/i18n/translate/pt-pt.json @@ -3165,6 +3165,7 @@ "label": "Dados do aplicativo", "migration_title": "Migração de Dados", "new_path": "Novo Caminho", + "open": "Diretório Aberto", "original_path": "Caminho Original", "path_change_failed": "Falha ao alterar o diretório de dados", "path_changed_without_copy": "O caminho foi alterado com sucesso", diff --git a/src/renderer/src/i18n/translate/ro-ro.json b/src/renderer/src/i18n/translate/ro-ro.json index 6002365814..d18b952baf 100644 --- a/src/renderer/src/i18n/translate/ro-ro.json +++ b/src/renderer/src/i18n/translate/ro-ro.json @@ -3165,6 +3165,7 @@ "label": "Date aplicație", "migration_title": "Migrare date", "new_path": "Cale nouă", + "open": "Director Deschis", "original_path": "Cale originală", "path_change_failed": "Schimbarea directorului de date a eșuat", "path_changed_without_copy": "Calea a fost schimbată cu succes", diff --git a/src/renderer/src/i18n/translate/ru-ru.json b/src/renderer/src/i18n/translate/ru-ru.json index 200b03e6c1..74ce3df5fb 100644 --- a/src/renderer/src/i18n/translate/ru-ru.json +++ b/src/renderer/src/i18n/translate/ru-ru.json @@ -3165,6 +3165,7 @@ "label": "Данные приложения", "migration_title": "Миграция данных", "new_path": "Новый путь", + "open": "Открыть каталог", "original_path": "Исходный путь", "path_change_failed": "Сбой изменения каталога данных", "path_changed_without_copy": "Путь изменен успешно", diff --git a/src/renderer/src/pages/settings/AboutSettings.tsx b/src/renderer/src/pages/settings/AboutSettings.tsx index b7309a0a0a..1765f1fbda 100644 --- a/src/renderer/src/pages/settings/AboutSettings.tsx +++ b/src/renderer/src/pages/settings/AboutSettings.tsx @@ -169,9 +169,7 @@ const AboutSettings: FC = () => { const onOpenDocs = () => { const isChinese = i18n.language.startsWith('zh') - window.api.openWebsite( - isChinese ? 'https://docs.cherry-ai.com/' : 'https://docs.cherry-ai.com/docs/en-us' - ) + window.api.openWebsite(isChinese ? 'https://docs.cherry-ai.com/' : 'https://docs.cherry-ai.com/docs/en-us') } return ( diff --git a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx index 6c111fcdaf..20441bd12c 100644 --- a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx +++ b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx @@ -1,11 +1,4 @@ -import { - CloudServerOutlined, - CloudSyncOutlined, - FileSearchOutlined, - LoadingOutlined, - WifiOutlined, - YuqueOutlined -} from '@ant-design/icons' +import { CloudServerOutlined, CloudSyncOutlined, LoadingOutlined, WifiOutlined, YuqueOutlined } from '@ant-design/icons' import DividerWithText from '@renderer/components/DividerWithText' import { NutstoreIcon } from '@renderer/components/Icons/NutstoreIcons' import { HStack } from '@renderer/components/Layout' @@ -23,8 +16,8 @@ import { setSkipBackupFile as _setSkipBackupFile } from '@renderer/store/setting import type { AppInfo } from '@renderer/types' import { formatFileSize } from '@renderer/utils' import { occupiedDirs } from '@shared/config/constant' -import { Button, Progress, Switch, Typography } from 'antd' -import { FileText, FolderCog, FolderInput, FolderOpen, SaveIcon } from 'lucide-react' +import { Button, Progress, Switch, Tooltip, Typography } from 'antd' +import { FileText, FolderCog, FolderInput, FolderOpen, FolderOutput, SaveIcon } from 'lucide-react' import type { FC } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -646,9 +639,13 @@ const DataSettings: FC = () => { onClick={() => handleOpenPath(appInfo?.appDataPath)}> {appInfo?.appDataPath} - handleOpenPath(appInfo?.appDataPath)} style={{ flexShrink: 0 }} /> + + + - + @@ -659,7 +656,6 @@ const DataSettings: FC = () => { handleOpenPath(appInfo?.logsPath)}> {appInfo?.logsPath} - handleOpenPath(appInfo?.logsPath)} style={{ flexShrink: 0 }} />