Commit Graph

4992 Commits

Author SHA1 Message Date
one
8786ba6410
fix: SelectModelPopup sticky header (#5795)
* fix: remove console logs

* refactor: use onScroll instead of onItemsRendered
2025-05-09 16:43:22 +08:00
kangfenmao
c66dfa50cf fix: message citations styles and bugs 2025-05-09 15:56:54 +08:00
George Zhao
e134cacbec
feat: ParateraAI 添加支持 (#5792)
* feat: add Paratera mini app with logo and URL.

* feat: add Paratera AI provider and associated model.

* feat: add Paratera provider to migration configuration

* fix: update Paratera entry in default mini apps configuration

* feat: add additional Paratera models to system models configuration

* feat: reintroduce Paratera provider in migration configuration

* fix: update redux-persist version to 99 in store configuration

---------

Co-authored-by: George Zhao <georgezhao@SKJLAB>
2025-05-09 14:45:29 +08:00
one
85e3233a72
fix: user message usage (#5657)
* fix: user message usage estimation

* fix: estimate usage on resending edited user message

* refactor: renaming

* refactor: renaming
2025-05-09 14:17:28 +08:00
Roland
be64faf9e2
feat: add the "Export Agent" feature (#5789) 2025-05-09 13:30:21 +08:00
one
45827890ac
perf: virtual list for quick panel and SelectModelPopup (#5594)
* perf: quick panel with virtual list

* fix: adaptive virtual list height

* fix: keep panel content if it is re-opened in a very short interval

* refactor: use modified rc-virtual-list to support overscan

* fix: virtual list item key

* refactor: remove useless styles

* refactor: support smooth scrolling for virtual list

* fix: lint error

* perf: use virtual list for SelectModelPopup

* refactor: change model name style

* fix: better auto scroll behaviour

* perf: improve memorization for SelectModelPopup

* fix: group name background

* refactor: change model item margin

* chore: update rc-virtual-list to 3.19.2

* fix: adaptive list height

* refactor: improve styles for focused or selected items

* refactor: do not show model if the assistant has not default model

* chore: migrate to custom rc-virtual-list

* refactor: improve selected item style

* refactor: improve selected item style

* fix: left margin

* refactor: simplify the indicator for selected item

* fix: prevent mouse hover for keyboard events

* chore: bump rc-virtual-list

* refactor: simulate sticky group header in SelectModelPopup

* fix: cleanup timer, add comments

* perf: improve smooth scrolling

* chore: bump to rc-virtual-list:3.19.6

* refactor: update memorization

* refactor: extract item rendering logic

* refactor: delay CustomTag tooltip for performance

* fix: disable spellcheck in model search bar

* refactor: expand/collapse model label on resizing window

* refactor: simplify filtering

* chore: update rc-virtual-list

* refactor: always render virtual list to avoid inconsistent state

* chore: update dependencies

* chore: update dependencies

* chore: update dependencies

* refactor: remove useless states

* refactor: simplify selected state

* refactor: improve keyboard events for SelectModelPopup

* revert: do not expand mode tags

* refactor: reduce animation time

* chore: update dependencies

* refactor: better names and comments

* refactor: better error handling

* refactor: simplify auto-scrolling logic

* refactor: use react-window rather than rc-virtual-list

* fix: disable auto-scroll

* fix: scroll bar style and item margin

* fix: initialize sticky banner

* refactor: distinguish auto-scrolling behaviour for different causes

* fix: keyboard navigation error
2025-05-09 11:54:54 +08:00
Konv Suu
4fce9f8986 fix: remove useless border and border radius for code block 2025-05-09 09:55:47 +08:00
karl
db7a4a737f
feat: tooluse result display style optimization (#5758) 2025-05-09 09:52:15 +08:00
Camol
6dd06c8e29
fix: display image from mcp response (#5780) 2025-05-09 09:43:22 +08:00
George Zhao
ba5de53c71
feat(minapps): add n8n mini app with logo and URL. (#5776)
Co-authored-by: George Zhao <georgezhao@SKJLAB>
2025-05-09 00:52:15 +08:00
one
e23127a515
refactor(ModelList): improve model list style and grouping (#5674)
* refactor(ModelList): make the group removing button consistent with model removing button

* refactor(ModelList): improve auto-grouping, reduce the number of groups

* refactor(EditModelsPopup): extract model group tools

* refactor(naming): add special grouping rules for some providers

* feat(ModelList): add a button to add/remove all the listed models

* refactor(naming): update auto grouping

* refactor: update auto grouping for dmxapi

* revert: remove ungrouped
2025-05-08 23:20:29 +08:00
George Zhao
2b91fac5fa
feat: Custom mini app (#5731)
* feat: 新增文件写入功能,支持通过 ID 写入文件并加载自定义小应用配置。

* feat(i18n): 添加自定义小程序配置的多语言支持,包括英文、简体中文和繁体中文。

* fix(minapps): 使用 await 加载自定义小应用并合并到默认应用中,同时添加日志输出以便调试

* fix(minapps): 在开发环境中添加条件日志输出,以便调试加载的默认小应用。

* refactor(miniappSettings): 移动自定义小应用编辑区域的位置,优化界面布局。

* refactor(miniappSettings): 修改自定义小应用保存逻辑,优化应用列表重新加载方式。

* feat(i18n): 修复在merge过程中丢失的语言设置。

* fix(bug_risk): Consider adding stricter validation for the JSON config on load.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* feat(miniapp): 添加自定义小应用功能,优化应用列表展示,支持通过模态框添加新应用。

* feat(App): enhance custom app modal to support logo upload via URL.

* feat(miniapp): add application logo support and update mini app list reloading logic.

* feat(i18n): update mini app custom settings translations for multiple languages.

* feat(miniapp): add updateDefaultMinApps function and refactor mini app list reloading logic.

* feat(miniapp): add removeCustom functionality to handle custom mini app deletion

* feat(miniapp): add duplicate ID check when adding custom mini apps.

* feat(i18n): 重构侧边栏相关翻译为结构化格式,增加删除自定义应用的翻译支持。

* feat(miniapp): 优化删除自定义应用的逻辑,使用条件渲染简化代码结构。

* feat(miniapp): 添加自定义小应用内容的空值处理,确保 JSON 格式有效。

* feat(i18n): 更新默认语言为英语,并移除多个语言文件中的默认代理字段。

* feat(i18n): 为多个语言文件添加自定义小应用配置编辑描述翻译。

* feat(i18n): add success and error messages for deleting custom mini apps in multiple language files.

* feat(i18n): update success and error messages for custom mini app operations and add placeholder text in multiple language files.

* feat(i18n): 为多个语言文件添加重复ID和冲突ID的错误信息翻译,并在自定义小应用设置中实现相关检查逻辑。

* feat(miniapp): 在添加自定义小应用时,增加对默认最小应用ID的重复检查逻辑。

* feat(i18n): update edit description for custom mini app configuration in Traditional Chinese locale

* fix(miniapp): enhance error messages for duplicate and conflicting IDs in custom mini app configuration

---------

Co-authored-by: George Zhao <georgezhao@SKJLAB>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
2025-05-08 21:59:55 +08:00
SuYao
8550e5be98
Feat/claude websearch support (#5771)
* feat: enhance web search capabilities in AnthropicProvider

- Added support for Claude models in web search functionality with a new regex.
- Implemented logic to retrieve web search parameters and handle web search results.
- Updated message handling to include web search progress and completion states.
- Enhanced citation formatting for web search results from Anthropic source.

* feat: import WebSearchResultBlock for enhanced message handling

- Added import for WebSearchResultBlock from the Anthropic SDK to improve message processing capabilities in messageBlock.ts.
- Removed duplicate import to streamline the code.

* chore: update @anthropic-ai/sdk to version 0.41.0 in package.json and yarn.lock

* Update src/renderer/src/store/messageBlock.ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: Chen Tao <70054568+eeee0717@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-08 21:30:43 +08:00
Roland
0e202509d3
fix(MCP): Revise the server type judgment logic to ensure the correct… (#5769) 2025-05-08 20:57:48 +08:00
ous50 | ousfifty | 欧式fifty
cdbba49dd5
Feat: change Gemini Safety Settings to OFF; upgrade @google/genai package (#5763)
* Feat: change Gemini Safety Settings to OFF; upgrade @google/genai package

* fix: remove model.id param in getSafetySettings in Gemini Provider
2025-05-08 18:21:39 +08:00
MyPrototypeWhat
191aafe1fc
fix: enhance search functionality with optional HTTP options (#5765)
* feat: enhance search functionality with optional HTTP options

- Updated the search method signatures in BaseWebSearchProvider, WebSearchEngineProvider, LocalSearchProvider, and WebSearchService to accept optional HTTP options.
- Modified fetchWebContent and fetchWebContents to utilize the new HTTP options parameter for improved request handling.
- Enhanced error handling in messageThunk to manage abort errors more effectively.

* feat: implement abortable promises for web search and fetch operations

- Added createAbortPromise utility to handle abort signals for promises.
- Updated LocalSearchProvider and fetchWebContent to utilize abortable promises, allowing for better control over ongoing requests.
- Enhanced error handling in ApiService to log errors consistently.
2025-05-08 18:03:19 +08:00
自由的世界人
2a787fe87b
fix(theme): citation list dark theme display & url repeatedly requesting (#5752)
* fix(theme): citation list dark theme  display

* fix: 减少属性变量及反复请求

* fix: update react-query
2025-05-08 17:24:04 +08:00
MyPrototypeWhat
4b2882aab7 feat(MCP): update auto-install server name and add server registration logic
- Changed the auto-install server name to '@cherry/mcp-auto-install' in migration logic.
- Implemented logic to register the MCP server upon tool invocation if it matches the auto-install server name.
2025-05-08 13:26:40 +08:00
kangfenmao
8d3e243f3c feat: refactor AihubmixProvider and OpenAICompatibleProvider for improved model handling (#5732) 2025-05-08 13:20:12 +08:00
LiuVaayne
35bc5afdad
feat(MCP): implement login shell environment retrieval (#5739)
feat: implement login shell environment retrieval
2025-05-08 10:14:01 +08:00
kangfenmao
1185ce2b73 feat: customize aihubmix provider request logic (#5728) 2025-05-08 09:52:53 +08:00
suyao
c19a6cb764 chore: remove unuseful doc 2025-05-08 09:40:08 +08:00
beyondkmp
930074a717
feat: add zoom factor setting and localization support (#5665)
* feat: add zoom factor setting and localization support

- Introduced App_SetZoomFactor IPC channel for managing zoom levels.
- Implemented zoom factor functionality in the main IPC handler.
- Added setZoomFactor method in the settings store and corresponding UI in DisplaySettings.
- Included localization for zoom settings in English and Chinese.

* add i18n

* recover file

* delete code

* fix: update zoom factor handling to apply to all windows

- Modified the IPC handler for App_SetZoomFactor to set the zoom factor for all non-destroyed windows instead of just the main window.

* add getzoomfactor api

* feat: synchronize zoom factor with Redux state on app initialization

- Added functionality to fetch the zoom factor from the main process and dispatch it to the Redux store during app initialization.
- Removed redundant zoom factor fetching logic from DisplaySettings component.

* feat: enhance zoom factor management with IPC updates

- Added a new IPC channel for zoom factor updates to notify all renderer processes.
- Introduced a constant for predefined zoom levels to streamline zoom adjustments.
- Updated the zoom handling logic to utilize the new zoom levels and ensure smooth transitions.
- Implemented a listener in the preload script to handle zoom factor updates from the main process.
- Refactored the app initialization to include real-time updates for the zoom factor in the Redux state.

* feat: integrate zoom options into DisplaySettings component

- Added ZOOM_OPTIONS constant to generate structured options for Ant Design Select from predefined zoom levels.
- Refactored DisplaySettings to utilize ZOOM_OPTIONS, removing redundant zoom option definitions.
- Simplified the zoom factor fetching logic in useAppInit for better readability and efficiency.

* refactor: streamline zoom factor handling and remove unused IPC channel

- Removed the App_GetZoomFactor IPC channel as it was no longer needed.
- Updated zoom factor handling to directly set and notify the main window of changes.
- Simplified the logic for setting the zoom factor in the WindowService and ShortcutService.
- Adjusted the useAppInit hook to utilize the new zoom factor management approach.

* refactor: improve zoom factor handling in WindowService and useAppInit hook

- Simplified the zoom factor setting in WindowService by directly using the config manager.
- Updated useAppInit to ensure the zoom factor is set correctly on initialization, enhancing responsiveness to changes.
2025-05-08 07:18:43 +08:00
Xuanwo
8b7bc0ff4e
feat: Add OpenDAL based Remote Storage class (#2700)
* feat: Add OpenDAL based Remote Storage class

Signed-off-by: Xuanwo <github@xuanwo.io>

* Fix error logging

Signed-off-by: Xuanwo <github@xuanwo.io>

* fix(dependencies): update opendal version to ^0.47.11 and add platform-specific binaries

---------

Signed-off-by: Xuanwo <github@xuanwo.io>
Co-authored-by: suyao <sy20010504@gmail.com>
2025-05-08 03:09:40 +08:00
自由的世界人
80177458b1
fix: citation list loading (#5742)
* fix: citation loading

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix: remove unused import & cleanup some code

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-08 03:04:31 +08:00
chenxi
a38f4a5ad3
fix: failed to connect OAuth MCP server (#5709)
* fix: failed to connect OAuth MCP server

* polish: handle token fetching errors gracefully
2025-05-08 00:32:51 +08:00
SuYao
f8b4b41b91
refactor(middleware): add extractReasoningMiddleware for enhanced text processing (#5637) 2025-05-07 22:09:12 +08:00
kangfenmao
06a590328c Revert "perf: <tool_use> display (#5489)"
This reverts commit 0782b24790.
2025-05-07 21:08:59 +08:00
kangfenmao
5fe1d077e3 fix(upgrades): add check for empty content in error block creation during upgrade to v7 2025-05-07 21:08:59 +08:00
自由的世界人
636c788e2b
fix: knowledge base url error (#5735) 2025-05-07 19:42:48 +08:00
Chen Tao
97130cfb1e
feat: optimize knowledge recognize (#5707)
Co-authored-by: 自由的世界人 <3196812536@qq.com>
2025-05-07 14:34:38 +08:00
自由的世界人
b6520cdc9a
feat: change citation list style (#5516)
* feat: change citation list style

* feat: add link preview

* fix: model inside searching

* fix: change button word
2025-05-07 14:21:58 +08:00
自由的世界人
599370be4e
fix: chat message translate (#5682)
* fix: add updateTranslationBlockThunk
2025-05-07 14:19:47 +08:00
Chen Tao
0f34bde749
feat: support dashscope reranker (#5725) 2025-05-07 14:17:03 +08:00
MyPrototypeWhat
afcb0eeae2
优化消息块渲染性能,使用 useMemo 缓存图像块组;移除调试日志以清理代码 (#5722) 2025-05-07 13:38:09 +08:00
fullex
22315b7201
fix(StoreSyncService): set flag bug when register IPC handler (#5715)
fix: register IPC handler in StoreSyncService
2025-05-07 10:52:51 +08:00
Teo
2e804eeebc
feat(WebSearchButton): add 'Disable Web Search' option (#5717) 2025-05-07 10:37:08 +08:00
SuYao
1035dd2572
fix: update thinkingbutton model checks (#5708)
* fix: update model checks to include supported reasoning and thinking token models

* fix: simplify thinking button visibility logic in Inputbar component
2025-05-06 23:39:36 +08:00
fullex
6d3a994392
feat: emit event on message complete (#5696)
feat: add MESSAGE_COMPLETE event to EventService and emit on message processing completion
2025-05-06 23:14:41 +08:00
ipcjs
c920ca3da6
feat(miniapps): add Grok / X (#5706) 2025-05-06 20:17:57 +08:00
one
c0c6435fc5
fix: memorize assistant with model (#5701) 2025-05-06 18:05:32 +08:00
SuYao
89e403ae61
fix: include thinking_millsec in message block creation (#5685) 2025-05-06 08:09:25 +08:00
自由的世界人
4a925870d1
fix: openaiprovider timeout is not an integer (#5681)
Update OpenAIProvider.ts
2025-05-05 22:03:28 +08:00
SuYao
0c369b5a3e
feat(OpenAI): new Responses API support (#5621)
* feat(OpenAI): new Responses API support

- Added OpenAICompatibleProvider to handle requests for OpenAI-compatible models.
- Updated ProviderSettings to reflect changes in provider types from 'openai' to 'openai-compatible'.
- Enhanced model validation and response handling in OpenAIProvider to support new input formats.
- Refactored existing components to accommodate the new provider structure and ensure compatibility with OpenAI's response API.
- Incremented store version to 98 to reflect changes in provider types and settings.
- Updated migration logic to convert existing 'openai' provider types to 'openai-compatible' where applicable.

* refactor(OpenAI): update model validation and response handling

- Renamed `isOpenAIModel` to `isOpenAILLMModel` for clarity in model type checking.
- Updated references to the new model validation function across `OpenAICompatibleProvider` and `OpenAIProvider`.
- Enhanced web search model validation logic to accommodate new model checks.
- Refactored `getOpenAIWebSearchParams` to return structured parameters based on model type.
- Improved citation formatting in message blocks for better web search results handling.

* fix(OpenAICompatibleProvider): reset timestamps for first token handling

- Updated logic to reset timestamps for the first token and content when no prior thinking content is present.
- Added comments for clarity on the purpose of the changes and marked a temporary fix for timestamp handling.

* refactor(OpenAICompatibleProvider): improve code readability with consistent formatting

* fix(OpenAIProvider): refine service tier logic for model identification

* fix: eslint error

* fix(OpenAIProvider): enhance response metrics tracking in streaming process

* feat(OpenAIProvider): add timeout handling for model requests

---------

Co-authored-by: 自由的世界人 <3196812536@qq.com>
2025-05-05 21:08:05 +08:00
chenxi
bb5c6a8bb9
Fix: 'Web Search' and 'Clear Context' don't work (#5677) 2025-05-05 21:04:18 +08:00
beyondkmp
197016f0db
refactor: add Linux support for margin adjustments in MinappPopupConainer and McpSettingsNavbar (#5673)
* refactor: add Linux support for margin adjustments in MinappPopupContainer and McpSettingsNavbar

* refactor: adjust margin and padding for Linux support in MinappPopupContainer and McpSettingsNavbar

* refactor: enhance Linux support in MinappPopupContainer by updating button group class condition
2025-05-05 16:58:14 +08:00
one
7ce0b3072b
fix: infinite scroller layout (#5671) 2025-05-05 15:17:10 +08:00
chenxi
e506460ef9
feat: popup question editor support translation assistant (#5660)
* feat: TextEditPopup support translation assistant

* polish: ensure safe state updates in TextEditPopup during unmount

* test: make delay assertion more lenient in unclassified utils tests

* feat: add loading indicator to translation button in TextEditPopup
2025-05-05 14:58:57 +08:00
one
82884e3945
fix: conditionally show loading more spinner (#5670) 2025-05-05 14:57:01 +08:00
SuYao
9acd2121d4
Fix/image height (#5658) 2025-05-04 22:31:00 +08:00