Phantom
96a4c95a3a
feat: context message in message group ( #8833 )
...
* stash
* docs(newMessage): 修正注释中的拼写错误
* refactor(MessageGroup): 优化组件逻辑和状态管理
重构消息组件的状态管理和逻辑顺序,提升代码可读性
将相关状态和逻辑分组,并提取公共变量
* feat(消息组件): 添加消息有用性更新功能
在MessageGroup组件中实现onUpdateUseful回调,用于更新消息的有用状态
当标记某条消息为有用时,自动取消其他消息的有用标记
* fix(i18n): 更新多语言翻译文件中的键值
- 将中文简体中的"useful"键值从"有用"改为"设置为上下文"
- 在其他语言文件中为"useful"键添加待翻译标记
- 在部分语言文件中添加"merge"、"longRunning"等新键的待翻译标记
* feat(消息组): 添加群组上下文消息标识和有用消息提示
为消息组添加上下文消息标识功能,当消息被标记为有用时显示特殊标识
优化消息菜单栏的有用按钮提示文本
修复消息菜单栏依赖项数组不完整的问题
* feat(i18n): 更新多语言翻译文件并改进自动翻译脚本
为"useful"字段添加label和tip翻译,完善多个语言的翻译内容
改进自动翻译脚本,使用语言映射替换文件名
* docs(i18n): 更新多语言文件中上下文提示的翻译文本
* docs(messageUtils): 标记废弃工具调用结果消息构造函数
标记 `构造带工具调用结果的消息内容` 函数为废弃状态,后续将移除
* refactor(消息过滤): 重命名filterContextMessages为filterAfterContextClearMessages以更准确描述功能
* fix(MessageGroup): 修复依赖数组中缺少groupContextMessageId的问题
* feat(消息过滤): 添加根据上下文数量过滤消息的功能
* refactor(消息过滤): 拆分消息过滤逻辑并添加日志
将filterUsefulMessages函数拆分为多个独立函数,提高代码可维护性
添加日志输出以便调试消息过滤过程
* refactor(消息过滤): 优化聊天消息过滤逻辑并添加调试日志
重构消息过滤流程,将原有单步过滤拆分为多步处理
添加调试日志以跟踪各阶段过滤结果
* refactor(messageUtils): 移除未使用的logger并优化消息过滤逻辑
移除未使用的logger导入和调用,添加filterAdjacentUserMessaegs过滤步骤优化消息处理流程
* refactor(消息服务): 重构获取上下文消息数量的逻辑
使用 filterContextMessages 工具函数替代 lodash 的 takeRight 和手动计算逻辑
* fix(消息工具): 修复分组消息排序顺序错误
* fix(消息过滤): 优化消息组过滤逻辑,保留有用消息或最后一条消息
修改 filterUsefulMessages 函数注释以更清晰说明过滤逻辑
在 MessageGroup 组件中使用 lodash 的 last 方法获取最后一条消息
* fix(MessageGroup): 修复消息有用性更新逻辑的错误
处理消息有用性状态更新时,添加对消息存在性的检查并优化状态切换逻辑
* fix(Messages): 修复分组消息内部顺序不正确的问题
由于displayMessages是倒序的,导致分组后的消息内部顺序也是倒序的。通过toReversed()将每个分组内部的消息顺序再次反转,确保正确显示
* fix(消息过滤): 修改未标记有用消息的保留策略,从保留最后一条改为第一条
* fix: 将onUpdateUseful属性改为可选以处理未定义情况
* refactor(ApiService): 移除冗余的日志记录调用
* docs(types): 去除Message类型中useful字段的过时注释
* refactor(messageUtils): 移除分组消息中的冗余排序操作
原代码在分组消息时已经按原始索引顺序添加,无需再次排序
2025-08-10 18:17:56 +08:00
George·Dong
6b8ba9d273
feat: add max backups for NutStore ( #9020 )
2025-08-10 15:25:49 +08:00
Pleasure1234
27c9ceab9f
fix: support gpt-5 ( #8945 )
...
* Update models.ts
* Update models.ts
* Update models.ts
* feat: add OpenAI verbosity setting for GPT-5 model
Introduces a new 'verbosity' option for the OpenAI GPT-5 model, allowing users to control the level of detail in model output. Updates settings state, migration logic, UI components, and i18n translations to support this feature.
* fix(models): 修正gpt-5模型判断逻辑以支持包含gpt-5的模型ID
* fix(i18n): 修正繁体中文和希腊语的翻译错误
* fix(models): 优化OpenAI推理模型判断逻辑
* fix(OpenAIResponseAPIClient): 不再为response api添加stream_options
* fix: update OpenAI model check and add verbosity setting
Changed GPT-5 model detection to use includes instead of strict equality. Added default 'verbosity' property to OpenAI settings in migration logic.
* feat(models): 添加 GPT-5 系列模型的图标和配置
添加 GPT-5、GPT-5-chat、GPT-5-mini 和 GPT-5-nano 的图标文件,并在 models.ts 中配置对应的模型 logo
* Merge branch 'main' into fix-gpt5
* Add verbosity setting to OpenAI API client
Introduces a getVerbosity method in BaseApiClient to retrieve verbosity from settings, and passes this value in the OpenAIResponseAPIClient request payload. This enables configurable response verbosity for OpenAI API interactions.
* Upgrade OpenAI package to 5.12.2 and update patch
Replaced the OpenAI dependency from version 5.12.0 to 5.12.2 and updated related patch files and references in package.json and yarn.lock. Also updated a log message in BaseApiClient.ts for clarity.
* fix: add type and property checks for tool call handling
Improves robustness by adding explicit checks for 'function' property and 'type' when parsing tool calls and estimating tokens. Also adds error handling for unknown tool call types in mcp-tools and updates related test logic.
* feat(模型配置): 添加gpt5模型支持及相关配置
- 在模型类型中新增gpt5支持
- 添加gpt5系列模型检测函数
- 更新推理选项配置和国际化文本
- 调整effort ratio数值
* fix(ThinkingButton): 为gpt-5及后续模型添加minimal到low的选项回退映射
* feat(i18n): 更新思维链长度的中文翻译并调整对应图标
为思维链长度的"minimal"选项添加中文翻译"微念",同时调整各选项对应的灯泡图标亮度
* feat(i18n): 为推理努力设置添加"minimal"选项并调整英文文案
* fix: openai patch
* wip: OpenAISettingsGroup display
* fix: 修复OpenAISettingsGroup组件中GPT5条件下的渲染逻辑
* refactor(OpenAISettingsGroup): 优化设置项的分组和分隔符逻辑
* feat(模型配置): 添加gpt-5到visionAllowedModels列表
* feat(模型配置): 添加gpt-5到函数调用支持列表
将gpt-5及其变体添加到FUNCTION_CALLING_MODELS支持列表,同时将gpt-5-chat添加到排除列表
* fix: 在OpenAI推理模型检查中添加gpt-5-chat支持
* Update OpenAISettingsGroup.tsx
* feat(模型支持): 添加对verbosity模型的支持判断
新增isSupportVerbosityModel函数用于判断是否支持verbosity模型
替换原有isGPT5SeriesModel判断逻辑,统一使用新函数
* fix: 修复支持详细程度模型的判断逻辑
使用 getLowerBaseModelName 处理模型 ID 以确保大小写不敏感的比较
* feat: 添加对gpt-5模型的网络搜索支持但不包括chat变体
* fix(models): 修复gpt5模型支持选项缺少'off'的问题
* fix: 添加gpt-5到支持Flex Service Tier的模型列表
* refactor(aiCore): 优化OpenAI verbosity类型定义和使用
移除OpenAIResponseAPIClient中冗余的OpenAIVerbosity导入
在BaseApiClient中明确getVerbosity返回类型为OpenAIVerbosity
简化OpenAIResponseAPIClient中verbosity的类型断言
* fix(openai): 仅在支持verbosity的模型中添加verbosity参数
* fix(i18n): 修正OpenAI设置中不一致的翻译
* fix: modify low effort ratio
* fix(openai): 修复GPT5系列模型在启用网页搜索时不能使用minimal reasoning_effort的问题
* fix(openai): 修复GPT5系列模型在启用web搜索时不能使用minimal推理的问题
---------
Co-authored-by: icarus <eurfelux@gmail.com>
Co-authored-by: Phantom <59059173+EurFelux@users.noreply.github.com>
2025-08-10 14:27:26 +08:00
beyondkmp
0b89e9a8f9
feat: add RPM target support for Linux builds ( #9026 )
...
* Updated electron-builder configuration to include RPM as a target for Linux builds.
* Modified GitHub workflows to install RPM dependencies during the build process for both nightly and release workflows.
2025-08-10 12:08:36 +08:00
Phantom
67b560da08
fix(github models): get id instead of name ( #9008 )
...
* fix(openai): 修正模型ID字段从name改为id
* fix(providers): 更新github api的url路径
2025-08-09 14:28:16 +08:00
Phantom
8823dc6a52
fix: remove deprecated ( #9006 )
...
* refactor: 移除已弃用的ProviderSettingsPopup组件
* refactor(providers): 重命名函数以更准确描述其功能
* fix(openai): 修正服务层级和数组内容支持的判断逻辑
使用新的提供者检查函数替代原有的布尔值判断,提高代码可维护性
* refactor(mcp-tools): 将参数isCompatibleMode重命名为noSupportArrayContent以更清晰表达意图
* refactor(providers): 移除不再使用的provider配置属性
清理多个系统provider中已不再使用的配置属性,包括isNotSupportArrayContent、isNotSupportStreamOptions和isNotSupportDeveloperRole,以简化配置结构
2025-08-09 13:59:33 +08:00
fullex
f005afb71c
fix(SelectionService): check screen edge to prevent toolbar overlay selection ( #8972 )
...
feat(SelectionService): add toolbar boundary checks to prevent overflow on screen edges
2025-08-09 10:22:31 +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
39d96a63ac
chore: add CLAUDE.local.md to .gitignore
2025-08-06 19:43:46 +08:00
Konv Suu
e94458317a
fix(agents): cancel import situation ( #8883 )
...
fix(agents): 修复未处理的代理导入情况
2025-08-06 19:27:02 +08:00
beyondkmp
12051811fc
fix(ProxyManager): store original Axios adapter for proxy management ( #8875 )
2025-08-06 18:15:52 +08:00