fullex
06dab978f7
feat(migration): update migration UI and enhance user experience
...
This commit modifies the migration window dimensions and properties for improved usability, allowing for resizing and maximizing. It also introduces new icons for different migration stages, updates localized messages for clarity, and enhances the overall layout of the migration interface, including adjustments to the alert messages and step indicators for better user guidance during the migration process.
2025-08-10 02:09:52 +08:00
fullex
c3f61533f7
feat(migration): enhance migration flow with new stages and error handling
...
This commit introduces additional stages to the migration process, including 'backup_required', 'backup_progress', and 'backup_confirmed', improving user guidance during data migration. It also adds new IPC channels for proceeding to backup and retrying migration, along with enhanced error handling and logging throughout the migration flow. The user interface has been updated to reflect these changes, providing clearer feedback and options during the migration process.
2025-08-10 01:40:03 +08:00
fullex
8715eb1f41
feat(migration): add new IPC channels and enhance migration flow
...
This commit introduces new IPC channels for starting the migration flow, restarting the application, and closing the migration window. It also updates the migration logic to improve user interaction and error handling during the migration process. Additionally, the migration interface has been enhanced with a step indicator and localized messages for better user experience.
2025-08-10 00:19:09 +08:00
fullex
92eb5aed7f
refactor(migration): rename data migration files and update migration logic
...
This commit renames the data migration files for clarity, changing `dataMigrate.html` to `dataRefactorMigrate.html` and updating the corresponding service imports. It also enhances the migration logic by implementing a new `app_state` table structure and removing deprecated migration files, streamlining the overall migration process.
2025-08-09 22:37:20 +08:00
fullex
ff965402cd
refactor(migration): streamline migration process and enhance IPC handling
...
This commit refines the data migration process by ensuring that migration checks occur before window creation and improves the logging of migration events. It also consolidates IPC handlers specific to migration within the MigrateService, allowing for better management of migration-related tasks. Additionally, the HTML for the data migration interface has been updated to enhance security policies.
2025-08-09 20:56:21 +08:00
fullex
973f26f9dd
feat(migration): implement data migration service and update database architecture
...
This commit introduces a new data migration service with various IPC channels for migration tasks, including checking if migration is needed, starting the migration, and tracking progress. Additionally, the database architecture section has been added to the documentation, detailing the use of SQLite with Drizzle ORM, migration standards, and JSON field handling. Legacy migration files for ElectronStore and Redux have been removed as they are now deprecated.
2025-08-09 20:19:41 +08:00
fullex
4e3f8a8f76
feat(preferences): auto-generate preferences configuration from classification.json
...
This commit introduces an auto-generated preferences configuration file, replacing the previous manual definitions. The new structure is based on the latest classification.json and includes comprehensive settings for various application features. The auto-generation process ensures that the preferences are up-to-date and consistent with the defined classifications.
2025-08-09 16:44:35 +08:00
fullex
21e40db086
mv dir to data
2025-08-09 14:30:24 +08:00
fullex
92cd012037
Merge branch 'main' of https://github.com/CherryHQ/cherry-studio into wip/refactor/databases
2025-08-09 09:44:28 +08:00
Phantom
33128195fe
fix(providers): update GitHub Models api url ( #9003 )
...
* fix(providers): 更新 GitHub Models 的 API 地址和基础路径
修复 GitHub Models 的 API 地址配置错误,并调整基础路径以适配其特殊接口结构
* Update providers.ts
---------
Co-authored-by: Pleasure1234 <3196812536@qq.com>
2025-08-09 02:42:23 +08:00
Phantom
6c5088f071
fix(aiCore): FinalChunkConsumerMiddleware throw error ( #8993 )
...
* fix(aiCore): 修复中间件错误处理和日志输出问题
修复FinalChunkConsumerMiddleware中错误无法被ErrorHandlerMiddleware捕获的问题,并优化日志输出格式
* fix: 移除检查API时的冗余日志记录
2025-08-09 02:22:09 +08:00
Phantom
c97ece946a
Fix/translate selection ( #8943 )
...
* refactor(translate): 重构翻译窗口使用翻译服务接口
* refactor(translate): 重构翻译功能,提取翻译服务为独立模块
将翻译相关逻辑从ApiService中提取到独立的TranslateService模块
简化组件中翻译功能的调用方式,移除重复代码
* fix(selection): 防止流式输出完成后的重复处理
添加finished标志位,在收到LLM_RESPONSE_COMPLETE时标记完成,避免后续chunk继续处理
* fix(TranslateService): 修复翻译失败时的错误处理和日志记录
改进翻译服务的错误处理逻辑,添加日志记录以便排查问题
* fix(翻译服务): 修正未配置模型时的错误提示信息
2025-08-09 00:06:15 +08:00
Phantom
5647d6e6d4
feat: enable thinking control ( #8946 )
...
* feat(types): 添加AtLeast泛型类型用于定义至少包含指定键的对象
新增AtLeast泛型类型,用于表示一个对象至少包含类型T中指定的所有键(值类型为U),同时允许包含其他任意string类型的键(值类型也必须是U)。该类型在providers.ts中被用于定义PROVIDER_LOGO_MAP的类型约束,并调整了NOT_SUPPORTED_REANK_PROVIDERS和ONLY_SUPPORTED_DIMENSION_PROVIDERS的类型定义。
* feat(provider): 添加 enable_thinking 支持并重构 API 选项配置
将分散的 provider API 选项配置重构为统一的 ProviderApiOptions 类型
添加对 enable_thinking 参数的支持
实现配置迁移逻辑将旧配置转换为新格式
* fix(providers): 修正provider权限检查逻辑
将权限检查从直接访问provider属性改为通过apiOptions访问,确保一致性
* refactor(providers): 重命名并扩展 enable_thinking 参数支持检查
将 isSupportQwen3EnableThinkingProvider 重命名为 isSupportEnableThinkingProvider 并扩展其功能
现在支持通过 apiOptions.isNotSupportEnableThinking 配置来禁用 enable_thinking 参数
同时保持对 Qwen3 等模型的原有支持逻辑
* refactor(providers): 修改 isSupportEnableThinkingProvider 为黑名单逻辑
* fix(providers): 修复数组内容支持判断逻辑
检查 provider.apiOptions?.isNotSupportArrayContent 而非直接检查 provider.isNotSupportArrayContent
* docs(providers): 添加关于NOT_SUPPORT_QWEN3_ENABLE_THINKING_PROVIDER的注释
* fix(store): 更新持久化存储版本号至129
* feat(i18n): 为多语言文件添加 enable_thinking 参数支持
* refactor(ProviderSettings): 移除重复的provider展开操作符
更新ApiOptionsSettings组件,移除updateProviderTransition中不必要的provider展开操作符
* test(utils): 修复测试文件中provider的类型定义
将provider对象明确标记为const并添加satisfies Provider类型约束,确保类型安全
* fix(providers): 修正NOT_SUPPORTED_REANK_PROVIDERS变量名拼写错误并添加lmstudio
修复NOT_SUPPORTED_REANK_PROVIDERS变量名拼写错误为NOT_SUPPORTED_RERANK_PROVIDERS,并添加lmstudio到不支持重排的提供商列表
2025-08-09 00:05:40 +08:00
kangfenmao
73dc3325df
refactor(ApiService): streamline tool usage logic and enhance MCP tool handling
...
Updated the logic for determining tool usage by consolidating conditions into a single variable. Improved the handling of MCP tools by filtering active servers and checking for enabled tools before sending notifications. Removed redundant code and ensured that tool execution completion notifications are sent based on the new logic.
2025-08-08 23:48:00 +08:00
Pleasure1234
3b7a99ff52
feat: add language filter to local web search queries ( #8976 )
...
* feat: add language filter to local web search queries
Integrates user's language setting into search queries by applying a language filter based on the provider (Google, Bing, or others). This improves search relevance for localized results.
* fix: update language filter logic in LocalSearchProvider
Refactored applyLanguageFilter to use provider.id instead of provider.name for search engine identification. Adjusted filtering for Google, Bing, and Baidu, and removed default language filter for other providers.
* Update LocalSearchProvider.ts
2025-08-08 21:03:04 +08:00
Phantom
97a63ea5b2
fix: user custom params should always overwrite other params ( #8907 )
...
* fix(aws-bedrock): 未支持自定义参数
* refactor(AnthropicAPIClient): 简化消息创建参数逻辑
移除不必要的MessageCreateParams类型,直接在commonParams中设置stream参数
* refactor(openai): 简化API客户端参数处理逻辑
移除冗余的stream参数分支逻辑,直接在commonParams中设置stream相关参数
* docs(aiCore): 添加注释说明用户自定义参数应覆盖其他参数
* feat(openai): 添加流式输出选项支持
当流式输出启用且提供者支持时,包含stream_options以包含使用情况信息
* fix(openai): 移除冗余的逻辑判断
2025-08-08 16:58:31 +08:00
Phantom
da5372637b
refactor(models): always use lowercase model id ( #8936 )
...
* refactor(models): 统一使用getLowerBaseModelName处理模型ID比较
修改多个模型判断函数,统一使用getLowerBaseModelName处理模型ID的比较逻辑,提高代码一致性和可维护性
* refactor(models): 统一变量名baseName为modelId以提高代码可读性
2025-08-08 16:57:09 +08:00
Phantom
40282cd39d
fix: input bar covers chat nav buttons ( #8935 )
...
refactor(消息组件): 将ChatNavigation从Messages移到Chat组件中
重构消息组件结构,将ChatNavigation组件从Messages.tsx移动到Chat.tsx中
2025-08-08 15:57:51 +08:00
Phantom
339b915437
feat: developer mode help ( #8952 )
...
* feat(开发者模式): 添加开发者模式帮助提示信息
在开发者模式开关旁添加提示信息,说明启用后可以使用调用链功能查看模型调用过程的数据流
* docs(i18n): 为开发者模式添加帮助文本说明功能
2025-08-08 15:49:46 +08:00
beyondkmp
2a5869dd80
feat(package): add patch for windows-system-proxy to improve http proxy ( #8957 )
2025-08-08 14:28:55 +08:00
Phantom
d84c9e3230
refactor(SpanManagerService): remove trace warning ( #8951 )
...
refactor(SpanManagerService): 移除开发者模式下的冗余日志警告
移除在非开发者模式下关于追踪启用的冗余警告日志,这些日志对用户无实际帮助且可能造成干扰
2025-08-08 12:36:13 +08:00
George·Dong
4860d03c38
feat(knowledge): add save topic to knowledge ( #8731 )
2025-08-08 10:10:29 +08:00
Phantom
b112797a3e
fix(qwen): qwen thinking control ( #8938 )
...
* refactor(qwen): 重构Qwen模型思考控制逻辑
重命名函数并统一处理Qwen模型的思考控制逻辑,简化代码结构
* refactor(models): 重命名isQwenAlwaysThinkingModel为isQwenAlwaysThinkModel
统一函数命名风格,提高代码一致性
2025-08-08 00:50:19 +08:00
George·Dong
32c28e32cd
feat(Nutstore): 添加坚果云备份文本 ( #8940 )
2025-08-08 00:39:24 +08:00
one
9129625365
feat: draggable on filtering ( #8929 )
...
feat: support dnd on filtering
2025-08-08 00:39:10 +08:00
Peter Wang
ff58efcbf3
fix: make regex of gemma3 can match ollama's format ( #3847 #6626 ) ( #8941 )
2025-08-08 00:38:24 +08:00
Phantom
b38b2f16fc
fix: fallback when invalid reasoning effort ( #8857 )
...
* refactor(types): 扩展思考模型类型并优化相关类型定义
添加 ThinkingModelType 和 ThinkingOption 类型以支持更多模型
引入 ThinkingOptionConfig 和 ReasoningEffortConfig 类型配置
重构 ReasoningEffortOptions 为 ReasoningEffortOption 并更新相关引用
* feat(模型配置): 添加模型推理配置映射表并重构ThinkingButton组件
将模型支持的推理选项配置集中管理,新增MODEL_SUPPORTED_REASONING_EFFORT和MODEL_SUPPORTED_OPTIONS映射表
提取getThinkModelType方法用于统一判断模型类型,简化ThinkingButton组件逻辑
* fix(OpenAIApiClient): 添加对reasoning_effort参数的有效性检查
当模型不支持指定的reasoning_effort值时,回退到第一个支持的值
* fix: 修正判断模型类型的条件函数
* refactor(types): 使用 Record 类型替代映射类型语法
简化类型定义,提升代码可读性和一致性
2025-08-07 23:56:47 +08:00
Phantom
201fcf9f45
refactor(ModelEditContent): improve experience when choosing model types ( #8847 )
...
* feat(标签组件): 新增多种模型标签组件并重构标签引用路径
新增RerankerTag、EmbeddingTag、ReasoningTag、VisionTag和ToolsCallingTag组件
将CustomTag移动至Tags目录并更新所有引用路径
重构ModelTagsWithLabel组件使用新的标签组件
* feat(标签组件): 导出CustomTagProps并增强所有标签组件的props传递
- 导出CustomTagProps接口供其他组件使用
- 在所有标签组件中添加...restProps以支持更多自定义属性
- 新增WebSearchTag组件
- 统一各标签组件的props类型定义方式
* refactor(组件): 统一标签组件的showLabel属性命名
将shouldShowLabel重命名为showLabel以保持命名一致性
* feat(Tags): 为 CustomTag 组件添加 disabled 状态支持
当 disabled 为 true 时,标签颜色将变为灰色
* feat(Tags): 为 CustomTag 组件添加 onClick 事件支持并修复关闭事件冒泡
添加 onClick 属性以支持标签点击事件
修复关闭按钮点击事件冒泡问题
* fix(Tags): 修复CustomTag组件点击状态样式问题
添加$clickable属性以控制鼠标指针样式
确保当onClick存在时显示手型指针
* refactor(ProviderSettings): 替换复选框为标签组件展示模型能力
移除旧的复选框实现,改用专用标签组件展示模型能力类型
简化相关逻辑代码,提升可维护性
调整模态框宽度为自适应内容
* refactor(ProviderSettings): 重构模型编辑弹窗的布局和样式
将模型能力选择部分移动到顶部并优化布局
移除重复的类型标题并调整按钮位置
统一模态框宽度为固定值
* fix(ProviderSettings): 将 Space.Compact 替换为 Space 以修复布局问题
* feat(模型设置): 添加模型类型选择警告提示并优化交互
新增 WarnTooltip 组件用于显示模型类型选择的警告信息
修改模型类型选择交互逻辑,允许用户切换 vision 类型
更新中文翻译文本,使警告信息更准确
* refactor(components): 重构模型能力标签组件并集中管理
将分散的模型能力标签组件移动到统一的 ModelCapabilities 目录
新增 WebSearchTag 组件并优化现有标签组件结构
* feat(组件): 新增带有警告图标的Tooltip组件
* refactor(ProviderSettings): 优化模型能力标签的交互逻辑和性能
使用useMemo和useCallback优化模型类型选择和计算逻辑
重构标签组件导入路径和交互方式
* feat(Tags): 为 CustomTag 组件添加 style 属性支持
允许通过 style 属性自定义标签的样式,提供更灵活的样式控制
* refactor(ProviderSettings): 优化模型类型选择逻辑和UI交互
- 移除冗余代码并简化模型能力选择逻辑
- 添加互斥类型检查防止同时选择不兼容的模型类型
- 为重置按钮添加图标和工具提示提升用户体验
- 统一所有类型标签的禁用状态样式
* fix(ProviderSettings): 为重置按钮添加type="text"属性以修复样式问题
* refactor(组件): 移除GlobalOutlined图标并使用WebSearchTag组件替代
简化WebSearch模型的标签显示逻辑,使用统一的WebSearchTag组件替代手动创建的CustomTag,提高代码复用性和可维护性
* fix(组件): 更换deprecated属性
* feat(组件): 为CustomTag添加inactive状态并优化禁用逻辑
为CustomTag组件新增inactive属性,用于控制标签的视觉禁用状态
将disabled属性与点击事件解耦,优化禁用状态下的交互行为
更新相关调用代码以适配新的属性结构
* style(ProviderSettings): 调整 ModelEditContent 组件中 Flex 布局的换行属性
* fix(ProviderSettings): 移除Modal组件中固定的width属性
* fix(components): 为WebSearchTag组件添加size属性以保持一致性
* fix(ProviderSettings): 使用uniqueObjectArray防止模型能力重复
确保模型能力列表中的项唯一,避免重复添加相同类型的模型能力
2025-08-07 20:41:21 +08:00
kangfenmao
ad0c2a11f3
chore(version): 1.5.5
2025-08-07 18:02:10 +08:00
Phantom
9ad0dc36b7
feat: more control for service tier ( #8888 )
...
* feat(types): 添加对服务层参数的支持并完善Provider类型
为Provider类型添加isSupportServiceTier和serviceTier字段以支持服务层参数
添加isOpenAIServiceTier类型守卫函数验证服务层类型
扩展SystemProviderId枚举类型并添加ProviderSupportedServiceTier类型
* refactor(types): 将 isSystemProvider 移动到 types 模块并重构系统提供商 ID 定义
将 isSystemProvider 函数从 config/providers.ts 移动到 types/index.ts 以更好组织代码
重构系统提供商 ID 为 SystemProviderIds 常量对象并添加类型检查函数
更新所有引用 isSystemProvider 的导入路径
* refactor(llm): 将系统提供商数组改为配置对象结构
重构系统提供商数据结构,从数组改为键值对象配置,便于维护和扩展
* refactor(providers): 将系统提供商配置移动到config/providers文件
* refactor: 重命名函数isSupportedFlexServiceTier为isSupportFlexServiceTierModel
统一函数命名风格,提高代码可读性
* refactor(types): 优化OpenAIServiceTier类型定义和校验逻辑
将OpenAIServiceTier定义为常量枚举类型,提升类型安全性
使用Object.values优化类型校验性能
统一服务层参数支持标志命名风格为isNotSupport前缀
* feat(OpenAI): 添加priority服务层级选项
在OpenAIServiceTiers类型和设置选项中新增priority服务层级
* refactor(store): 移除未使用的OpenAIServiceTiers和SystemProviderIds导入
* fix(OpenAISettingsGroup): 添加priority到FALL_BACK_SERVICE_TIER映射
* feat(provider): 支持在提供商设置中配置 service_tier 参数
将 service_tier 配置从全局设置迁移到提供商设置中,并添加相关 UI 和逻辑支持
* refactor(service-tier): 统一服务层级命名并添加Groq支持
将OpenAIServiceTiers的常量值从大写改为小写以保持命名一致性
新增GroqServiceTiers及相关类型守卫
重构BaseApiClient中的服务层级处理逻辑以支持多供应商
* fix(store): 更新持久化存储版本至128并添加迁移逻辑
添加从127到128版本的迁移逻辑,将openAI的serviceTier设置迁移至provider配置
* feat(设置): 添加 Groq 服务层级选项并更新相关翻译
为 Groq 提供商添加特定的服务层级选项(on_demand 和 performance),同时更新中文翻译文件以包含新的选项
* feat(i18n): 添加服务层级和长运行模式的多语言支持
* fix(ProviderSettings): 修正服务层级选项的变量名错误
* refactor(providers): 将 PROVIDER_CONFIG 重命名为 PROVIDER_URLS 并更新相关引用
* refactor(types): 优化类型守卫使用 Object.hasOwn 替代 Object.values
简化类型守卫实现,使用 Object.hasOwn 直接检查属性存在性,提升代码简洁性
* chore: 更新 openai 依赖至 5.12.0 版本
* fix(openai): 修复 service_tier 类型断言问题
groq 有不同的 service tier 配置,不符合 openai 接口类型,因此需要显式类型断言
* fix(openai): 处理空输入时返回默认空字符串
* fix(openai): 修复 Groq 服务层级类型不匹配问题
将 service_tier 强制转换为 OpenAIServiceTier 类型,因为 Groq 的服务层级配置与 OpenAI 接口类型不兼容
* fix(测试): 修正系统提供者名称匹配测试的预期结果
将 matchKeywordsInProvider 和 matchKeywordsInModel 测试中对 'SystemProvider' 的预期结果从 false 改为 true,以匹配实际功能需求
* test(api): 添加SYSTEM_MODELS到模拟配置中
* refactor(config): 更新系统模型配置和类型定义
- 将vertexai和dashscope的模型配置从空数组更新为对应的系统模型
- 修改SYSTEM_MODELS的类型定义以包含SystemProviderId
- 移除未使用的模型配置如o3、gitee-ai和zhinao
* test(match): 更新系统提供商的测试用例以匹配id而非name
* test(services): 更新ApiService测试中的模型配置模拟
修改测试文件中的模型配置模拟,使用vi.importActual获取原始模块并扩展模拟实现,移除不再使用的SYSTEM_MODELS导入
* fix(openai): 更新openai依赖版本并修复嵌入模型处理逻辑
修复openai客户端中嵌入模型处理逻辑,当模型名称包含"jina"时不使用base64编码
移除平台相关头信息以解决兼容性问题
更新package.json中openai依赖版本至5.12.0
* refactor(OpenAISettingsGroup): 移除不必要的fallback逻辑
* Revert "refactor(OpenAISettingsGroup): 移除不必要的fallback逻辑"
This reverts commit 2837f73cf6 .
* fix(OpenAISettingsGroup): 修复服务层级回退逻辑以支持Groq提供商
当服务层级模式不在可选范围内时,根据提供商类型设置不同的默认值。对于Groq提供商使用on_demand,其他情况使用auto。
* refactor(types): 简化类型定义从值类型改为键类型
将SystemProviderId、OpenAIServiceTier和GroqServiceTier的类型定义从获取值类型改为直接使用键类型,使代码更简洁
* chore: 更新 openai 依赖至 5.12.0 并应用补丁
* test(naming): 添加getFancyProviderName的测试用例
* test(utils): 添加对系统提供商名称的匹配测试
添加对系统提供商名称"Alibaba"的匹配测试,确保matchKeywordsInModel函数能正确识别系统提供商的名称
* test(utils): 更新系统提供者的i18n名称匹配测试
添加对系统提供者i18n名称匹配的额外测试用例,验证不匹配情况
* chore: 删除旧补丁
* fix(openai): 为commonParams添加类型注解以增强类型安全
* fix(aiCore): 服务层级设置返回未定义而非默认值
* test(匹配逻辑): 更新系统提供商的i18n名称匹配测试
修改测试用例以明确系统提供商不应通过name字段匹配
添加对'Alibaba'的匹配测试
2025-08-07 17:31:08 +08:00
kangfenmao
ffb23909fa
fix: remove provider missing worning
2025-08-07 16:31:40 +08:00
kangfenmao
075dfd00ca
refactor(HtmlArtifactsPopup): improve preview handling and state synchronization
...
- Updated internal state synchronization for HTML content and preview.
- Enhanced preview refresh logic to check for content changes every 2 seconds.
- Improved comments for clarity and consistency in English.
2025-08-07 16:31:40 +08:00
one
3211e3db26
fix: lower popup height ( #8921 )
2025-08-07 16:25:30 +08:00
kangfenmao
ee5e420419
feat(ApiService): enhance chat completion handling with chunk reception
...
- Added onChunkReceived call to fetchChatCompletion to improve response handling.
- Removed redundant onChunkReceived call from the completion parameters section in fetchChatCompletion.
2025-08-07 15:34:43 +08:00
beyondkmp
d44fa1775c
refactor(ProxyManager): don't filter proxy in system proxy ( #8919 )
...
refactor(ProxyManager): streamline proxy configuration and bypass rules handling
- Simplified proxy configuration logic in registerIpc by directly assigning bypass rules.
- Removed redundant bypass rules assignment in ProxyManager, initializing it as an empty array.
- Updated GeneralSettings to conditionally render based on custom proxy mode only.
2025-08-07 15:18:53 +08:00
kangfenmao
87b74db9fc
feat(ErrorBlock): enhance error handling with closable alerts and message integration
...
- Added message prop to ErrorBlock for improved context.
- Implemented closable alerts for error messages, allowing users to remove error blocks.
- Updated MessageErrorInfo component to handle message and block props effectively.
2025-08-07 14:06:32 +08:00
JI4JUN
bcb71f68c0
feat: support 302ai sso ( #8887 )
...
* feat: support 302.AI sso
* fix: modified the name of 302.AI provider
* feat: support SSO login functionality for 302.AI
2025-08-07 13:38:23 +08:00
Phantom
18f52f2717
fix(mcp): builtin mcp objects cannot be serialized ( #8903 )
...
* fix(mcp): 修复无法序列化的问题
* refactor(i18n): 重构MCP服务器描述的国际化和错误处理
移除MCPServer接口中的descriptionI18nKey字段,改为使用统一的getLabel函数处理国际化
添加getBuiltInMcpServerDescriptionLabel函数集中管理MCP服务器描述
在标签翻译失败时添加错误日志记录
* feat(i18n): 添加 Poe 供应商的多语言支持并重构标签获取逻辑
* refactor(i18n): 优化标签翻译函数中的变量使用
* refactor(i18n): 将参数key重命名为id以提升可读性
2025-08-07 13:36:44 +08:00
kangfenmao
80b2fabea0
refactor(DraggableList): simplify cursor styles and enhance drag handle visibility
...
- Removed unnecessary cursor styles from draggable items in the VirtualRow component.
- Updated snapshot tests to reflect changes in cursor styles.
- Introduced a new DragHandle component in ProviderSettings for improved drag interaction, with hover effects to enhance user experience.
2025-08-07 13:32:17 +08:00
Phantom
4ce1218d6f
fix: drag providers caused crash ( #8906 )
...
* feat(ProviderSettings): 在搜索时禁用列表拖拽功能
当搜索文本不为空时,禁用可拖拽列表的拖拽功能,避免用户在搜索时意外拖动项目
* fix(DraggableList): 修复拖拽列表项在禁用状态下的光标样式
* style(ProviderSettings): 移除列表项的cursor: grab样式
* style(ProviderSettings): 禁止用户选择列表项文本
* fix(ProviderSettings): 为ProviderLogo添加draggable="false"属性防止拖动
* test(DraggableVirtualList): 更新快照测试添加抓取光标样式
2025-08-07 13:19:48 +08:00
Phantom
ea890c41af
feat: support gpt-oss ( #8908 )
...
* feat(models): 添加gpt-oss到函数调用模型列表
* feat(模型配置): 添加gpt-oss模型logo配置
* fix: 修复OpenAI推理模型判断逻辑
使用getLowerBaseModelName获取模型基础名称后再进行判断,增加对gpt-oss模型的支持
2025-08-07 12:34:53 +08:00
Phantom
3435dfe5e3
fix(settings): reading undefined caused crash ( #8901 )
...
* fix(settings): 修复OpenAI推理条件中provider未定义的判断问题
修复useProvider钩子中provider可能为undefined时的模型获取逻辑
* feat(provider): 添加供应商不存在时的默认回退逻辑
当供应商不存在时,自动回退到默认供应商并显示警告信息
* feat(i18n): 添加缺失供应商的警告信息翻译
* fix(SettingsTab): 移除对provider的冗余检查
2025-08-07 12:33:25 +08:00
kangfenmao
6283ffdfe4
fix(HomeTabs): correct tab positioning logic for topic selection
2025-08-07 12:23:16 +08:00
kangfenmao
2cd9418b7a
chore: update pdf-parse dependency and exclude specific versions from build
2025-08-07 11:55:59 +08:00
one
c8dbcf7b6d
fix(CodeViewer): conditional contain content ( #8898 )
...
* fix(CodeViewer): conditional contain content
* perf: add will-change
* refactor: padding right
* refactor: update will-change
2025-08-07 11:50:17 +08:00
Phantom
8a0570f383
fix(providers): fix conditions ( #8899 )
...
fix(providers): 修正多个提供商支持条件的逻辑判断
将逻辑运算符从"||"改为"&&"以正确判断提供商是否支持特定功能
2025-08-07 10:29:44 +08:00
Phantom
3c5fa06d57
fix: handle json string chunk ( #8896 )
...
* fix(ai客户端): 处理非JSON格式的响应数据块
添加对非JSON格式响应数据块的解析处理,当解析失败时抛出包含本地化错误信息的异常
* feat(i18n): 添加聊天响应无效数据格式的错误提示和多语言支持
为聊天响应添加无效数据格式的错误提示,并更新多个语言文件以支持该功能
2025-08-07 00:12:52 +08:00
Pleasure1234
ddbf710727
feat: add toggle to disable thinking mode in ThinkingButton ( #8856 )
...
Introduces logic to allow users to disable thinking mode directly from the ThinkingButton if supported. Tooltip text now reflects the action to close when thinking is enabled and 'off' is available.
2025-08-06 20:54:35 +08:00
one
d05d1309ca
refactor(Preview,CodeBlock): preview components and tools ( #8565 )
...
* refactor(CodeBlockView): generalize tool and preview
Generalize code tool to action tool
- CodeTool -> ActionTool
- usePreviewTools -> useImagePreview
- rename code tool classname from icon to tool-icon
Generalize preview
- move image preview components to Preview dir
- simplify file names
* refactor(useImageTools): simplify implementation, add pan
* refactor(Preview): move image tools to floating toolbar
* refactor: add enableDrag, enable zooming for SvgPreview
* test: add tests for preview components
* feat(Preview): add download buttons to dropdown
* refactor(Preview): remove setTools from preview, improve SvgPreview
* refactor: add useTemporaryValue
* test: add tests for hooks
* test: add tests for CodeToolButton and CodeToolbar
* refactor(PreviewTool): add a setting item to enable preview tools
* test: update snapshot
* refactor: extract more code tools to hooks, add tests
* refactor: extract tools from CodeEditor and CodeViewer
* test: add tests for new tool hooks
* refactor(CodeEditor): change collapsible to expanded, change wrappable to unwrapped
* refactor: migrate codePreview to codeViewer
* docs: CodeBlockView
* refactor: add custom file icons, center the reset button
* refactor: improve code quality
* refactor: improve migration by deprecating codePreview
* refactor: improve PlantUml and svgToCanvas
* fix: plantuml style
* test: fix tests
* fix: button icon
* refactor(SvgPreview): debounce rendering
* feat(PreviewTool): add a dialog tool
* fix: remove isValidPlantUML, improve plantuml rendering
* refactor: extract shadow dom renderer
* refactor: improve plantuml error messages
* test: add tests for ImageToolbar and ImageToolButton
* refactor: add ImagePreviewLayout to simplify layout and tests
* refactor: add useDebouncedRender, update docs
* chore: clean up unused props
* refactor: clean transformation before copy/download/preview
* refactor: update migrate version
* refactor: style refactoring and fixes
- show header background in split view
- fix status bar radius
- reset special view transformation on theme change
- fix wrap tool icon
- add a divider to split view
- improve split view toggling (switch back to previous view)
- revert copy tool to separate tools
- fix top border radius for special views
* refactor: move GraphvizPreview to shadow DOM
- use renderString
- keep renderSvgInShadowHost api consistent with others
* fix: tests, icons, deleted files
* refactor: use ResetIcon in ImageToolbar
* test: remove unnecessary tests
* fix: min height for special preview
* fix: update migrate
2025-08-06 20:09:49 +08:00
fullex
7cd937888e
Merge branch 'main' of https://github.com/CherryHQ/cherry-studio into wip/refactor/databases
2025-08-06 19:53:07 +08:00