MyPrototypeWhat
02b85afefb
fix(aiCore): update file data and mediaType extraction in convertFileBlockToFilePart function
...
- Modified the conversion logic to correctly extract base64 data and MIME type from the API response.
- Ensured that the filename remains unchanged during the conversion process.
2025-09-01 13:36:01 +08:00
MyPrototypeWhat
e74c5a8ba3
feat(providerConfig): implement API key rotation logic for providers
...
- Added a new function to handle rotating API keys for providers, reusing legacy multi-key logic.
- Updated the providerToAiSdkConfig function to utilize the new key rotation mechanism.
- Enhanced TranslateService imports for better organization.
2025-09-01 12:47:12 +08:00
lizhixuan
e39e349dd3
fix(providerConfig): update Google Vertex AI import and creator function name
...
- Changed the import path for Google Vertex AI to '@ai-sdk/google-vertex/edge'.
- Updated the creator function name from 'createGoogleVertex' to 'createVertex' for consistency.
2025-08-30 18:42:08 +08:00
lizhixuan
1d331c8ffc
feat(providerConfig): add AWS Bedrock support in provider configuration
...
- Implemented AWS Bedrock integration by adding access key, region, and secret access key retrieval.
- Enhanced providerToAiSdkConfig function to handle Bedrock-specific options.
2025-08-30 18:18:33 +08:00
lizhixuan
837e929731
refactor(aiCore): consolidate StreamTextParams type imports and enhance type definitions
...
- Moved StreamTextParams type definition to a new file for better organization.
- Updated imports across multiple files to reference the new location.
- Adjusted related type definitions in ApiService and ConversationService for consistency.
2025-08-30 17:58:28 +08:00
lizhixuan
6b92e676dc
fix(registry): enhance provider config validation and update error handling in tests
...
- Added a check for null or undefined config in registerProviderConfig function.
- Updated tests to ensure proper error messages are thrown when no providers are registered.
- Adjusted mock implementations in generateImage tests to reflect changes in provider model identifiers.
2025-08-30 17:05:43 +08:00
icarus
c982976fe0
test(streamCallback): 添加serializeError的mock实现
2025-08-30 03:05:19 +08:00
icarus
461b54c53b
refactor(ThinkingBlock): 优化条件渲染逻辑以提高可读性
2025-08-30 02:59:24 +08:00
icarus
2f3b1d767d
test(ThinkingBlock): 移除不再需要的实时计时测试用例
2025-08-30 02:59:17 +08:00
icarus
895c30057f
test(Spinner): 更新快照
2025-08-30 02:42:53 +08:00
icarus
d62e336dad
test(ActionUtils): 添加对ConversationService和models模块的mock测试
2025-08-30 02:38:02 +08:00
icarus
7f643d058c
fix: 添加注释说明redux设置状态不应被服务层使用
2025-08-30 02:21:26 +08:00
icarus
4cf239f165
test(aiCore): 更新客户端兼容性测试的mock数据
...
添加isOpenAIModel等mock函数用于测试
修复AnthropicVertexClient的mock路径
添加注释说明服务层不应调用React Hook
2025-08-30 02:18:46 +08:00
icarus
aaa56da614
refactor(vertexai): 将VertexAI配置检查从ApiClientFactory移至VertexAPIClient
...
重构VertexAI客户端的配置检查逻辑,将其从工厂类移动到具体的客户端实现类中
2025-08-30 02:16:06 +08:00
icarus
d468bb6ad3
test: 更新ApiService测试中ApiClientFactory的模拟路径
2025-08-30 01:26:53 +08:00
lizhixuan
1ef63aed3a
feat(release): 更新版本至1.6.0-beta.3并添加新功能和优化
...
- 新增多个功能,包括ErrorBoundary组件、智谱AI模型支持、系统OCR功能、文件页面批量删除等
- 重构翻译服务和语言检测功能,提升扩展性和类型安全
- 修复多个问题,改善API检查和翻译过程中的错误处理
- 优化构建配置和性能,提升初始化效率
2025-08-30 00:40:20 +08:00
suyao
415fc23fee
Merge branch 'feat/aisdk-package' of https://github.com/CherryHQ/cherry-studio into feat/aisdk-package
2025-08-29 23:20:14 +08:00
icarus
e8bf1552d0
feat(mini窗口): 添加ErrorBoundary组件包裹内容
...
为mini窗口内容添加错误边界组件,防止未捕获错误导致整个应用崩溃
2025-08-29 23:01:50 +08:00
icarus
c1c91db9d2
fix(api): 修复API检查时的错误处理和取消逻辑
...
添加对API检查过程中错误的处理,并支持通过abortController取消请求
避免空系统提示词导致的报错,优化检查流程的健壮性
2025-08-29 22:51:49 +08:00
icarus
27fa16daa3
docs(i18n): 添加请求路径的国际化翻译
2025-08-29 22:34:56 +08:00
icarus
e0f86688a2
fix(translate): 修复翻译过程中中止控制器的错误处理
...
修正abortController.ts中中止控制器的回调函数调用方式
统一翻译错误消息的格式化处理
改进翻译服务的中止逻辑和错误传播
2025-08-29 22:32:37 +08:00
icarus
7a5050d2a2
feat(aiCore): 添加对文本增量累积的可配置支持
...
根据模型是否支持文本增量来决定是否累积文本内容,新增accumulate参数控制行为
2025-08-29 22:25:07 +08:00
icarus
e653a52265
feat(abortController): 添加readyToAbort函数用于创建并注册AbortController
...
提供便捷方法创建AbortController并自动注册到全局映射中,简化取消操作的流程
2025-08-29 22:04:53 +08:00
icarus
f76952b0dd
refactor(TranslateService): 重构翻译服务使用新的API接口
...
移除旧的翻译逻辑,改用新的fetchChatCompletion接口实现翻译功能
简化代码结构并移除不再需要的依赖
2025-08-29 21:42:19 +08:00
icarus
01d7f784f7
refactor(translate): 重构语言检测功能,使用通用聊天接口替代专用接口
...
- 移除专用的语言检测接口 fetchLanguageDetection
- 使用现有的 fetchChatCompletion 接口实现语言检测功能
- 处理 QwenMT 模型的特殊逻辑
- 优化语言检测的提示词和参数处理
2025-08-29 21:35:33 +08:00
icarus
4960eb712b
fix(ApiService): 修复prompt参数类型并添加消息转换逻辑
...
根据vercel/ai#8363问题,将prompt参数类型从StreamTextParams['prompt']改为string
当传入prompt参数时自动转换为messages格式
2025-08-29 21:30:26 +08:00
icarus
694ecc5243
fix(ApiService): 使FetchChatCompletionOptions参数变为可选
...
为了增加接口的灵活性,将options参数改为可选
2025-08-29 21:16:04 +08:00
icarus
84f920e54e
refactor(ApiService): 重构 fetchChatCompletion 参数类型定义
...
将参数类型提取为独立的类型定义,支持 messages 或 prompt 两种参数形式
2025-08-29 21:07:22 +08:00
icarus
d4a22d3b0c
refactor(services): 提取 FetchChatCompletionOptions 类型以提升代码可维护性
2025-08-29 20:33:22 +08:00
icarus
ddb203170e
refactor(aiCore): 提取 ModernAiProviderConfig 类型以复用
...
将多处重复的配置类型定义提取为 ModernAiProviderConfig 类型,提高代码可维护性
2025-08-29 20:25:16 +08:00
icarus
1460a0b5b9
refactor(aiCore): 将console.log替换为logger.debug以改进日志记录
2025-08-29 19:52:13 +08:00
icarus
aaa51c435e
feat(翻译): 添加对Qwen MT模型翻译选项的特殊处理
...
添加对Qwen MT模型的支持,当助手类型为翻译时设置翻译选项。若目标语言不支持则抛出错误
2025-08-29 19:36:40 +08:00
icarus
9bde8b3cae
Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/aisdk-package
2025-08-29 19:34:55 +08:00
icarus
e56218f3ac
Merge branch 'feat/aisdk-package' of github.com:CherryHQ/cherry-studio into feat/aisdk-package
2025-08-29 19:19:59 +08:00
icarus
58874a954c
feat(aiCore): 添加对智谱AI模型的支持
...
在getReasoningEffort函数中新增对智谱AI模型的支持逻辑,包括判断模型类型及设置对应的推理参数
2025-08-29 19:19:54 +08:00
MyPrototypeWhat
6fa82533d5
refactor(aiCore): improve provider registration and model resolution logic
...
- Enhanced the model resolution logic to support dynamic provider IDs for chat modes.
- Updated provider registration to handle both OpenAI and Azure with a unified approach for chat variants.
- Refactored the `buildOpenAIProviderOptions` function to streamline parameter handling and removed unnecessary parameters.
- Added configuration options for Azure to manage API versions and deployment URLs effectively.
2025-08-29 19:16:21 +08:00
icarus
a7b8b40301
feat(reasoning): 增强模型推理控制逻辑,支持更多提供商和模型类型
...
添加对Hunyuan、DeepSeek混合推理等模型的支持
优化OpenRouter、Qwen等提供商的推理控制逻辑
统一不同提供商的思考控制方式
添加日志记录和错误处理
2025-08-29 19:09:33 +08:00
icarus
bdbb2c2c75
refactor(aiCore): 重构provider选项构建逻辑以支持更多provider类型
...
重构buildProviderOptions函数,使用schema验证providerId并分为基础provider和自定义provider处理
新增对deepseek、openai-compatible等provider的支持
2025-08-29 18:43:03 +08:00
icarus
005cd730b0
refactor(providers): 重构基础 providers 定义和类型导出
...
将基础 provider IDs 和 schema 定义移到文件顶部
移除从 baseProviders 动态生成 IDs 的逻辑
使用 satisfies 约束 baseProviders 类型
2025-08-29 18:30:00 +08:00
one
86635eef49
refactor(SvgPreview): add tag use and animate ( #9660 )
...
* refactor(SvgPreview): add tag use
* refactor(Svg): add tag animate
2025-08-29 18:29:52 +08:00
icarus
3d131dc213
feat(OrchestrateService): 添加提示变量替换功能
...
在调用API前替换assistant.prompt中的变量,以支持动态提示内容
2025-08-29 17:53:19 +08:00
icarus
b5c1530d97
docs(OrchestrateService): 添加注释说明暂时未使用的类和函数用途
2025-08-29 17:53:05 +08:00
one
25c94dc2f0
fix: mcp tags overflow ( #9662 )
2025-08-29 17:29:27 +08:00
Konv Suu
c376426cdf
fix: useAssistant hook 导致快捷助手渲染问题 ( #9657 )
2025-08-29 17:19:22 +08:00
icarus
a2326ee825
refactor(transformParameters): 移除DEFAULT_MAX_TOKENS并替换console.log为logger.debug
...
移除未使用的DEFAULT_MAX_TOKENS常量,直接使用传入的maxTokens参数
将调试日志输出从console.log改为更规范的logger.debug
2025-08-29 17:13:23 +08:00
one
2f5cd78f7f
chore(deps): bump mermaid, shiki, tanstack, etc. ( #9658 )
...
* chore(deps): bump mermaid, shiki, tanstack, etc.
* refactor: update code languages, fix lint warnings
2025-08-29 16:17:55 +08:00
MyPrototypeWhat
70c6478278
chore(package): bump version to 1.6.0-beta.2
2025-08-29 16:01:45 +08:00
MyPrototypeWhat
0944faf8e5
refactor(aiCore): clean up KnowledgeSearchTool and searchOrchestrationPlugin
...
- Commented out unused parameters and code in the KnowledgeSearchTool to improve clarity and maintainability.
- Removed the tool choice assignment in searchOrchestrationPlugin to streamline the logic.
- Updated instructions handling in KnowledgeSearchTool to eliminate unnecessary fields.
2025-08-29 16:01:11 +08:00
one
ffbbec879b
refactor: provider list and urlSchema popup ( #9626 )
...
* refactor: separate ProviderList from index
* refactor: add UrlSchemaInfoPopup
* refactor: improve popup style
2025-08-29 15:51:33 +08:00
MyPrototypeWhat
6a1918deef
feat(releaseNotes): update release notes with new features and improvements
...
- Added a modal for detailed error information with multi-language support.
- Enhanced AI Core with version upgrade and improved parameter handling.
- Refactored error handling for better type safety and performance.
- Removed deprecated code and improved provider initialization logic.
2025-08-29 15:23:58 +08:00