Commit Graph

1952 Commits

Author SHA1 Message Date
Hamm
10f4fde0e3 refactor(Constants): 优化一些常量和枚举值 (#3773)
* refactor(main): 使用枚举管理 IPC 通道

- 新增 IpcChannel 枚举,用于统一管理所有的 IPC 通道
- 修改相关代码,使用 IpcChannel 枚举替代硬编码的字符串通道名称
- 此改动有助于提高代码的可维护性和可读性,避免因通道名称变更导致的错误

* refactor(ipc): 将字符串通道名称替换为 IpcChannel 枚举

- 在多个文件中将硬编码的字符串通道名称替换为 IpcChannel 枚举值
- 更新了相关文件的导入,增加了对 IpcChannel 的引用
- 通过使用枚举来管理 IPC 通道名称,提高了代码的可维护性和可读性

* refactor(ipc): 调整 IPC 通道枚举和预加载脚本

- 移除了 IpcChannel 枚举中的未使用注释
- 更新了预加载脚本中 IpcChannel 的导入路径

* refactor(ipc): 更新 IpcChannel导入路径

- 将 IpcChannel 的导入路径从 @main/enum/IpcChannel 修改为 @shared/IpcChannel
- 此修改涉及多个文件,包括 AppUpdater、BackupManager、EditMcpJsonPopup 等
- 同时移除了 tsconfig.web.json 中对 src/main/**/* 的引用

* refactor(ipc): 添加 ReduxStoreReady 事件并更新事件监听

- 在 IpcChannel 枚举中添加 ReduxStoreReady 事件
- 更新 ReduxService 中的事件监听,使用新的枚举值

* refactor(main): 重构 ReduxService 中的状态变化事件处理

- 将状态变化事件名称定义为常量 STATUS_CHANGE_EVENT
- 更新事件监听和触发使用新的常量
- 优化了代码结构,提高了可维护性

* refactor(i18n): 优化国际化配置和语言选择逻辑

- 在多个文件中引入 defaultLanguage 常量,统一默认语言设置
- 调整 i18n 初始化和语言变更逻辑,使用新配置
- 更新相关组件和 Hook 中的语言选择逻辑

* refactor(ConfigManager): 重构配置管理器

- 添加 ConfigKeys 枚举,用于统一配置项的键名
- 引入 defaultLanguage,作为默认语言设置
- 重构 get 和 set 方法,使用 ConfigKeys 枚举作为键名
- 优化类型定义和方法签名,提高代码可读性和可维护性

* refactor(ConfigManager): 重命名配置键 ZoomFactor

将配置键 zoomFactor 重命名为 ZoomFactor,以符合命名规范。
更新了相关方法和属性以反映这一变更。

* refactor(shared): 重构常量定义并优化文件大小格式化逻辑

- 在 constant.ts 中添加 KB、MB、GB 常量定义
- 将 defaultLanguage 移至 constant.ts
- 更新 ConfigManager、useAppInit、i18n、GeneralSettings 等文件中的导入路径
- 优化 formatFileSize 函数,使用新定义的常量

* refactor(FileSize): 使用 GB/MB/KB 等常量处理文件大小计算

* refactor(ipc): 将字符串通道名称替换为 IpcChannel 枚举

- 在多个文件中将硬编码的字符串通道名称替换为 IpcChannel 枚举值
- 更新了相关文件的导入,增加了对 IpcChannel 的引用
- 通过使用枚举来管理 IPC 通道名称,提高了代码的可维护性和可读性

* refactor(ipc): 更新 IpcChannel导入路径

- 将 IpcChannel 的导入路径从 @main/enum/IpcChannel 修改为 @shared/IpcChannel
- 此修改涉及多个文件,包括 AppUpdater、BackupManager、EditMcpJsonPopup 等
- 同时移除了 tsconfig.web.json 中对 src/main/**/* 的引用

* refactor(i18n): 优化国际化配置和语言选择逻辑

- 在多个文件中引入 defaultLanguage 常量,统一默认语言设置
- 调整 i18n 初始化和语言变更逻辑,使用新配置
- 更新相关组件和 Hook 中的语言选择逻辑

* refactor(shared): 重构常量定义并优化文件大小格式化逻辑

- 在 constant.ts 中添加 KB、MB、GB 常量定义
- 将 defaultLanguage 移至 constant.ts
- 更新 ConfigManager、useAppInit、i18n、GeneralSettings 等文件中的导入路径
- 优化 formatFileSize 函数,使用新定义的常量

* refactor: 移除重复的导入语句

- 在 HomeWindow.tsx 和 useAppInit.ts 文件中移除了重复的 defaultLanguage导入语句
- 这个改动简化了代码结构,提高了代码的可读性和维护性
2025-04-04 19:07:23 +08:00
lizhixuan
ce2fa4434b refactor(MCPSettings): replace MainContent callback with useMemo for performance optimization 2025-04-04 18:59:54 +08:00
kangfenmao
494d3fe2b7 feat(migrate): update migration logic to remove specific mini app from state and increment version to 89 2025-04-04 11:54:24 +08:00
kangfenmao
05caa74de8 fix(SelectModelPopup): set popup width to 600 for improved layout 2025-04-04 11:49:59 +08:00
kangfenmao
e2b617be3b refactor(Navbar): replace FormOutlined with SearchOutlined and update tooltip functionality 2025-04-04 10:54:21 +08:00
kangfenmao
78317e5873 fix(Inputbar): enhance message usage estimation and clean up code structure 2025-04-04 10:34:08 +08:00
LiuVaayne
a6d073aebd feat: mcp tool permissions (#4348)
* feat(MCPSettings): add tool toggle functionality and update server configuration

* fix(McpSettings): improve server type handling and tool fetching logic
2025-04-04 09:57:54 +08:00
fullex
8f5eb16c29 feat: render markdown when show assistant prompt (#4365)
* feat: render markdown when show assistant prompt

* fix: polish user experience
2025-04-04 09:37:29 +08:00
George·Dong
86e174d27a fix(ChatNavigation): improve navigation button collapse functionality 2025-04-04 00:07:36 +08:00
fullex
85d82c395b fix: webdav backup resume and modal problem 2025-04-03 23:09:59 +08:00
ousugo
814b15b834 fix(TopicsTab): Topic prompt word modification does not take effect immediately 2025-04-03 23:03:32 +08:00
MyPrototypeWhat
72ae719bf4 feat(mcp): add registryUrl to initialState for improved package manag… (#4279)
* feat(mcp): add registryUrl to initialState for improved package management

* feat(mcp): initialize registryUrl in MCP server state for future enhancements

* fix(inputbar):mcp server list

* refactor(Inputbar): remove unused MCP server variable and console log for cleaner code

* fix(Inputbar): 还原

* fix(Inputbar): Add activedMcpServers to Inputbar component props
2025-04-03 18:51:29 +08:00
BlBana
439435aa5e fix(Inputbar): Solve the problem that the initial state of assistant mcpServers is empty, and can not get enable mcp servers. 2025-04-03 17:45:14 +08:00
ousugo
6a6640ab09 fix(minapps): remove AI Studio entry from default mini apps list 2025-04-03 17:41:13 +08:00
Asurada
22a4f270a9 feat(Anthropic): Enable Anthropic 128k context beta feature (#2887) 2025-04-03 17:16:36 +08:00
Camol
37172fecb4 fix(nutstore): restore from nutstore #4318 (#4334)
Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
2025-04-03 10:56:05 +08:00
Yuzhong Zhang
d813b9efb0 fix(CodeBlock): incorrect behavior of message in multiple models (#4328)
* 修复多模型对比时的复制按钮sticky行为,并添加注释

* 同时修复横向滚动条消失的问题

* 增加布局判断
2025-04-03 01:01:04 +08:00
LiuVaayne
c2eb393be7 fix(mcp-tools): enhance tool lookup to match by name in addition to ID (#4323) 2025-04-02 23:20:07 +08:00
Bowie He
4014dcb480 feat:add default doubao model to model list 2025-04-02 18:56:30 +08:00
kanweiwei
febd811756 fix(NutstoreService): Fix slash handling in path processing #4208 2025-04-02 13:38:29 +08:00
fullex
cdab95221d feat: miniWindow Pin/Resize (#3201)
feat: [#2030] miniWindow pin/resizable/copy toast/move optimized
2025-04-02 10:26:56 +08:00
shiquda
a198c674fa fix(Knowledge): enable text selection in knowledge base search results (#4281) 2025-04-01 23:16:34 +08:00
kangfenmao
407e43d832 lint: Added an eslint disable comment in MinappPopupContainer to address 2025-04-01 21:05:36 +08:00
亢奋猫
f815056552 refactor(MCPService, process): Updated MCPService to conditionally set the NPM_CONFIG_REGISTRY
* refactor(MCPService, process): enhance registry URL handling and improve getBinaryPath function

- Updated MCPService to conditionally set the NPM_CONFIG_REGISTRY based on server name, improving flexibility for auto-install scenarios.
- Modified getBinaryPath function to handle optional name parameter, returning a default path when no name is provided, enhancing usability.

* refactor(MCPService, utils): add directory existence check for registry file

- Introduced makeSureDirExists utility function to ensure the specified directory exists, enhancing robustness.
- Updated MCPService to utilize this function when setting the registry URL for the mcp-auto-install server, improving error handling.

* feat:change MCP_REGISTRY_PATH

* refactor(MCPService): streamline environment variable setup for mcp-auto-install

- Updated MCPService to conditionally set NPM_CONFIG_REGISTRY and MCP_REGISTRY_PATH in a more concise manner.
- Enhanced readability by removing redundant code while maintaining functionality.

---------

Co-authored-by: lizhixuan <zhixuan.li@banosuperapp.com>
2025-04-01 20:57:56 +08:00
Chen Tao
2783c7cb7d fix(KnowledgeContent): adjust VirtualList height based on item count (#4270) 2025-04-01 19:47:58 +08:00
kangfenmao
2fa5922455 refactor(McpSettings): simplify args form item and adjust navbar padding for Windows
- Removed unnecessary validation rules from the args Form.Item in McpSettings for cleaner code.
- Updated McpSettingsNavbar to conditionally adjust padding based on the operating system.

close #4244
2025-04-01 17:03:27 +08:00
kangfenmao
50321d577e feat(Inputbar, MCPToolsButton, AssistantMCPSettings): integrate active MCP server handling and UI updates
- Added active MCP server filtering in Inputbar for message sending.
- Updated MCPToolsButton to reflect availability of enabled MCPs.
- Refactored AssistantMCPSettings to streamline MCP server updates and adjusted UI styles for consistency.
2025-04-01 16:57:12 +08:00
Hobee Liu
131311542e feat: add chat navigation bar close (#4019)
* feat(聊天导航): 新增关闭、置顶和置底按钮并更新图标

在聊天导航组件中新增了关闭、置顶和置底按钮,并更新了相关图标以提升用户体验。同时,添加了点击关闭按钮时隐藏导航的功能。

* feat(消息导航): 添加手动关闭状态以避免误触

在 ChatNavigation 组件中添加 `manuallyClosedUntil` 状态,用于在用户手动关闭导航后,1分钟内不响应鼠标靠近事件。这可以防止用户在操作时误触导航栏,提升用户体验。

* refactor(ChatNavigation): 重命名函数并添加滚动处理逻辑

重命名 handleChatNavigationClick 为 handleCloseChatNavigation 以提高代码可读性,并添加 handleScrollToTop 和 handleScrollToBottom 函数以处理滚动逻辑

* fix: 修复滚动到顶部时位置不正确的问题

将 `scrollToTop` 函数中的 `top` 值从 `0` 改为 `-container.scrollHeight`,以确保滚动到顶部时位置正确

* docs(i18n): 添加新的翻译字符串以支持更多操作

在多个语言文件中添加了“回到顶部”、“回到底部”和“关闭”的翻译字符串,以支持更多用户界面操作。

* refactor: 移除未使用的变量以简化代码
```

解释:
- **类型**: `refactor`,因为这是代码重构,移除了未使用的变量,没有改变功能行为。
- **描述**: 移除了未使用的变量以简化代码,符合简洁和可维护性的原则。
2025-04-01 16:17:57 +08:00
Cherry
d8441ae68e feat: One-click copy model id (#4190)
* feat:One-click copy model id

* fix:model id消失问题,样式问题
2025-04-01 16:11:06 +08:00
fullex
6f6e523a79 fix: chat history dark theme (#4254) 2025-04-01 14:55:24 +08:00
LiuVaayne
89e9518457 refactor: enhance mcp init (#4238)
* fix(MCPService): extend command support to include 'bun' and 'bunx', and improve environment variable handling

* fix(MCPService): enhance environment variable handling by incorporating default environment settings

* fix(hooks): simplify active MCP servers selection logic
2025-04-01 13:08:25 +08:00
kangfenmao
addea5f6f5 refactor: move websearch provider code to providers folder 2025-04-01 11:05:31 +08:00
kangfenmao
7dc0c3f6ea feat(i18n): add topic naming model support for message title generation in Japanese, Russian, and Traditional Chinese locales 2025-04-01 10:41:30 +08:00
kangfenmao
6655f88c49 fix(settings): enable clickAssistantToShowTopic by default 2025-04-01 10:06:24 +08:00
kangfenmao
a386ad02ba fix(Inputbar): simplify assistant state reset logic in useEffect 2025-04-01 09:57:21 +08:00
shiquda
9e00b443f6 feat: add support for title generation when exporting single message
#3992
2025-04-01 07:34:57 +08:00
MyPrototypeWhat
d14394970d feat: add React Developer Tools extension support and optimize CodeBlock component 2025-04-01 07:33:16 +08:00
suyao
82cf5f03b6 fix(styles): set dropdown menu width to max-content for better layout 2025-03-31 23:25:10 +08:00
suyao
538e4f2e40 fix(styles): improve scrollbar visibility by adjusting opacity and background color on hover 2025-03-31 23:25:10 +08:00
suyao
38d4b91558 fix(UI): enhance scrollbar visibility and dropdown menu overflow handling 2025-03-31 23:25:10 +08:00
SuYao
57f32b4f2e refactor(MCP): enhance schema validation for gemini (#4153) 2025-03-31 21:13:59 +08:00
LiuVaayne
66f8693124 feat(MCP): add registryUrl support for package management (#4200) 2025-03-31 21:13:20 +08:00
one
c1cc819f90 perf: improve modellist search bar responsiveness (and memorization) (#4221) 2025-03-31 21:11:46 +08:00
Yuzhong Zhang
7c6f1e4a5b optimize: Sticky CopyButton in CodeBlock (#4205) 2025-03-31 21:11:28 +08:00
LiuVaayne
64c216519c Feat/assistant level mcp (#4220) 2025-03-31 21:10:33 +08:00
fullex
3416be2c9d fix: Resolve a series of miniWindow display issues and improve app behavior across platforms (#3072) 2025-03-31 21:07:16 +08:00
MyPrototypeWhat
80170fd422 feat(MCP): add auto-install server configuration and migration for ve… (#4156)
* feat(MCP): add auto-install server configuration and migration for version 87

* update persistReducer version
2025-03-31 18:07:50 +08:00
fullex
77901f6fb2 feat: minapp show&copy current REAL url and can open it 2025-03-31 18:01:10 +08:00
fullex
51071d8c4d optimize: reduce animation gpu load of sidebar minapp 2025-03-31 17:47:41 +08:00
one
0cfad2d002 perf(Tabs): improve responsiveness when switching items rapidly 2025-03-31 09:33:17 +08:00
fullex
c0efcbe69a fix: zoomfactor should not change when resize (#4159)
* fix: zoomfactor should not change when resize

* add linux fallback support
2025-03-31 09:24:49 +08:00
suyao
965b339893 fix(models): reorganize gemini websearch model lists 2025-03-30 23:52:58 +08:00
kangfenmao
2ae6277206 refactor(BackupManager): switch to stream-based file writing for improved performance
* Updated BackupManager to use streams for writing data to temporary and backup files, enhancing efficiency and error handling.
* Replaced synchronous file writing with asynchronous stream operations to prevent blocking the event loop.
2025-03-30 14:37:20 +08:00
kangfenmao
6474b5816b refactor(knowledge): enhance CustomCollapse component and improve UI consistency
* Updated CustomCollapse to accept React nodes for labels, allowing for more flexible content.
* Replaced static labels with CollapseLabel component to display item counts.
* Introduced EmptyView component for consistent empty state representation across collapsible sections.
* Removed unnecessary styles and improved button click handling to prevent event propagation.
2025-03-30 14:32:57 +08:00
kangfenmao
834b583dfb chore(store): update migration logic and increment version to 87
* Updated migration functions to include error handling for provider additions.
* Incremented the version number in the persisted reducer configuration.
2025-03-30 14:08:14 +08:00
Hao He
31b15452e7 feat: Add keyboard navigation and selection highlighting for AddAssistantPopup (#4022)
* feat(AddAssistantPopup): 添加键盘导航和选中项高亮功能

* feat(AddAssistantPopup): 为所有项添加相同宽度的透明边框,避免布局跳动。
2025-03-30 13:58:52 +08:00
Teo
ce07439c67 refactor(files): Reconstruct file system UI (#4100)
* refactor(files): Reconstruct file system UI

* refactor(knowledge): replace Card components with CustomCollapse for better UI structure

* refactor(files): update folder icon from FolderOpenOutlined to FolderOpenFilled

* feat(components): add CustomCollapse component for enhanced collapsible UI

* refactor(files): implement virtual scrolling in FileList and KnowledgeContent components
2025-03-30 13:56:34 +08:00
George·Dong
46a93d99ea refactor(settings): 重构小程序设置 (#4092) 2025-03-30 08:48:23 +08:00
kangfenmao
c7a565b045 feat(MCPService): enhance PATH management with platform-specific directories 2025-03-30 08:32:45 +08:00
kangfenmao
745a8b027b fix(MCPSettings): ensure server name is set when missing and reorder radio options 2025-03-30 08:26:01 +08:00
Vaayne
dd4908e460 fix(MCPService): clear cache on server close and refactor tool fetching logic 2025-03-30 07:42:27 +08:00
LiuVaayne
93a59a131d fix(MCPService): prefix tool IDs with 'f' for consistency (#4121) 2025-03-30 00:26:47 +08:00
fullex
8d8abb73fa fix(UI/markdown): markdown not recognized ** as emphasis marks in CJK (#4119) 2025-03-29 23:56:41 +08:00
yangtb2024
4478b80a84 feat(config): 增强模型支持 (#4085)
* feat(config): 添加对新模型的支持

- 新增 gemini-2.5 到 visionAllowedModels
- 新增 gpt-4.5 到 visionAllowedModels 和 FUNCTION_CALLING_MODELS
- 新增 o1 到 FUNCTION_CALLING_MODELS
- 从 visionExcludedModels 和 FUNCTION_CALLING_EXCLUDED_MODELS 中排除 o1-mini, o1-preview, AIDC-AI/Marco-o1

* feat(config): 添加对 deepseek-ai 函数调用的支持

- 新增 deepseek-ai 到 FUNCTION_CALLING_MODELS
2025-03-29 23:04:51 +08:00
one
4d68be4084 fix: race condition in topic auto renaming 2025-03-29 22:58:38 +08:00
Herio
a3e5abe252 feat(ApiCheckPopup): 使用Promise.all并行处理API验证请求并更新状态 2025-03-29 22:00:21 +08:00
fullex
8a2ef9f4b0 fix: one-off minapp should not show minimize button 2025-03-29 21:59:03 +08:00
George·Dong
d0cfaf51bb fix(ApiService): context clear failed 2025-03-29 21:43:29 +08:00
Chen Tao
e45d382671 fix: add base url for gemini (#4109) 2025-03-29 21:35:04 +08:00
kangfenmao
f94255ffe4 fix(WebviewContainer): update webview partition to use a generic identifier 2025-03-29 19:00:08 +08:00
kangfenmao
0a56ef044e fix(migrate): add error handling to migration functions and ensure state integrity during updates 2025-03-29 15:28:57 +08:00
kangfenmao
bffaa26b19 chore(version): 1.1.15 2025-03-29 15:00:02 +08:00
kangfenmao
d902c24ec6 feat(i18n): add delete server confirmation messages in multiple languages 2025-03-29 08:00:51 +08:00
fullex
ca385a5092 feat: MinApp tabs on sidebar, we can keep MinApps alive and re-open it without loading again. 2025-03-29 07:29:45 +08:00
fullex
6cbc8c9dfc refactor: MinAppType id required and only string 2025-03-29 07:29:45 +08:00
Chen Tao
56f17916a9 feat: support gpt-4o image generation (#4054)
* feat: support gpt-4o image generation

* clean code
2025-03-29 07:18:42 +08:00
suyao
365c7b4cb4 feat(models): add support for new Gemini models 2025-03-29 07:17:40 +08:00
LiuVaayne
c5ea86b96c feat: mcp tools (#4069)
* feat(McpSettings): add MCP tools section and fetch tools on server activation

* refactor(McpService): improve client management and connection handling

* feat(McpService): add server management functions for restart and stop

* feat(McpTool): add tools section with input schema and availability messages

* feat(McpService): add unique IDs to tools and update function name mapping

* feat(McpService): implement caching for tool listings and enhance tool structure

* feat(McpToolsButton): streamline active server handling and update dropdown rendering

* fix(mcp-tools): update tool lookup to use unique IDs and add warning for missing tools
2025-03-29 07:16:59 +08:00
kangfenmao
d833cf11cd feat(Markdown): disallow iframe elements in Markdown rendering #4059 2025-03-28 21:46:37 +08:00
Teo
f7da00677a fix: fix fold selected (#4058)
* fix: 修复foldSelected问题

* refactor: 优化布局定位
2025-03-28 21:22:45 +08:00
fullex
9b49d451a7 remove unnecessary css 2025-03-28 18:11:21 +08:00
fullex
a6977ec547 fix: code block selection abnormal
- the reason is using display: table/table-row, which makes the selection behavior become table style.
- use display: flex/block to solve this problem, meanwhile the line number css also modified to fit the adjust
2025-03-28 18:11:21 +08:00
Chris Wan
4ed2723982 feat(MessagesService): two or more adjacent messages have the same role as user, then only the last one should be kept 2025-03-28 15:11:52 +08:00
ousugo
1c0da4127f fix(TopicsTab): Topic prompts cannot be cleared 2025-03-28 15:09:01 +08:00
Teo
ed343f51c3 refactor(mcp settings): enhance NpxSearch component layout and styling (#4053)
* refactor: mcp setting ui refactor

* refactor(mcp settings): enhance NpxSearch component layout and styling
2025-03-28 15:08:24 +08:00
nutstore-dev
f18fb5b025 fix(nutstore): fix the issue of not being able to customize the name of nutstore backup files. (#4050)
Co-authored-by: shlroland <shlroland1995@gmail.com>
2025-03-28 15:06:15 +08:00
kangfenmao
fcad681704 feat(i18n): add "New Folder" button label to multiple locales 2025-03-28 13:42:14 +08:00
Teo
559db5455a refactor: mcp setting ui refactor 2025-03-28 13:21:32 +08:00
kangfenmao
47cbb1bde4 chore(version): 1.1.11 2025-03-28 11:30:20 +08:00
kangfenmao
2a07eb75fd fix: mcp install ui 2025-03-28 11:15:49 +08:00
kangfenmao
641485d517 chore: remove useless code 2025-03-28 09:24:54 +08:00
kangfenmao
98f0f65bae refactor: mcp service 2025-03-28 04:24:10 +08:00
kangfenmao
1ba9667db7 Revert "feat: Use logo instead of avatar"
This reverts commit eeb8621037.
2025-03-28 04:14:20 +08:00
Chen Tao
a2d4e02b6a fix(Reranker): 修复rerank 400 and 完善错误信息 (#4013)
feat(Reranker): enhance error handling with detailed error messages and early return for empty results
2025-03-27 20:04:37 +08:00
MyPrototypeWhat
c8d3b529a6 feat: mcp auto server (#3996)
* feat: add configuration file management to MCPService

- Introduced methods to ensure the existence of a configuration file, load configurations from it, and save server configurations.
- Updated the MCPService class to handle server configurations more effectively, improving initialization and error handling.
- Added dependency on chokidar for file system watching.

* feat: enhance MCPService configuration handling

- Improved configuration management by adding compatibility for both old and new server formats.
- Updated methods to ensure configuration file existence, load configurations, and save server data more effectively.
- Refined server initialization logic to handle updates and notifications to Redux more efficiently.
- Removed unnecessary waiting for server data from Redux during initialization.

* feat: enhance MCPService default configuration handling

- Added logic to create a default configuration if none exists, improving the initialization process.
- Implemented migration of server configurations from Redux to file, ensuring data consistency.
- Updated methods to handle nested server structures and improved error handling during server updates.

* refactor: clean up MCPService by removing redundant console logs and unused updateServerInRedux method

- Eliminated unnecessary console log statements to improve code readability.
- Removed the unused updateServerInRedux method, streamlining the MCPService class.
- Maintained existing functionality while enhancing code clarity.
2025-03-27 17:15:16 +08:00
kangfenmao
9b8e7f0863 lint: fix code format 2025-03-27 15:15:15 +08:00
kangfenmao
bb14746e5d feat(Messages): add foldSelected property to assistant messages for improved message handling 2025-03-27 15:15:01 +08:00
kangfenmao
57c95fb882 refactor(Messages): update message group styling and improve grouped message handling 2025-03-27 14:07:19 +08:00
kangfenmao
a6a96fcc92 refactor(Scrollbar, Tabs): simplify component structure and improve styling 2025-03-27 13:40:09 +08:00
kangfenmao
97e0571b37 feat(i18n): update assistant settings titles and add new translations for multiple languages 2025-03-27 13:19:04 +08:00
MyPrototypeWhat
48670ff0c8 Perf/optimize rendering (#3923)
* optimize useMessageOperations

* chore: update dependencies and refactor React imports

- Added @ant-design/v5-patch-for-react-19 and rc-virtual-list to package.json.
- Updated React and ReactDOM types to version 19 in package.json and yarn.lock.
- Refactored ReactDOM usage to createRoot in main.tsx for better compatibility with React 18+.
- Changed useContext to use in SyntaxHighlighterProvider and ThemeProvider components.
- Adjusted flex-direction in Messages components to column for improved layout.
- Removed unused state in CodeBlock component.

* refactor(Messages): enhance scrolling behavior and introduce scroll utilities

- Added createScrollHandler and scrollToBottom utilities for improved scroll management.
- Updated Messages component to utilize new scroll utilities for better user experience.
- Refactored scroll handling logic to ensure smooth scrolling when new messages are added.
- Changed containerRef type to HTMLElement for better type safety.

* refactor(Messages): streamline message handling and introduce useTopicMessages hook

- Removed direct message selection from useMessageOperations and created a new useTopicMessages hook for better separation of concerns.
- Updated Messages component to utilize the new useTopicMessages hook for fetching messages.
- Enhanced message display logic with computeDisplayMessages function for improved message rendering.
- Refactored scrolling behavior to maintain a smooth user experience during message updates.

* refactor(Message Operations): introduce useTopicLoading hook for improved loading state management

- Removed loading state from useMessageOperations and created a new useTopicLoading hook for better separation of concerns.
- Updated components to utilize the new useTopicLoading hook for fetching loading states related to topics.
- Enhanced code organization and readability by streamlining message operations and loading state handling.

* refactor(Messages): replace updateMessage with updateMessageThunk for improved async handling

- Updated useMessageOperations and MessageAnchorLine components to utilize updateMessageThunk for message updates.
- Enhanced error handling and database synchronization in the new thunk implementation.
- Streamlined message update logic to improve code clarity and maintainability.

* refactor(SyntaxHighlighterProvider, MessageTools, AddMcpServerPopup): update styles and improve type safety

- Changed import statements to use TypeScript's type imports for better clarity and type safety.
- Updated MessageTools and AddMcpServerPopup components to replace bodyStyle with styles prop for consistent styling approach.
- Enhanced overall code organization and maintainability by adhering to TypeScript best practices.

* refactor(Messages): update layout and remove unnecessary prop

- Removed the hasChildren prop from the Messages component for cleaner code.
- Adjusted flex-direction in the mini chat Messages component to column-reverse for improved layout consistency.

* refactor: enhance type safety and component return types

- Updated functional components to return React.ReactElement instead of JSX.Element for better type consistency.
- Changed import statements to use TypeScript's type imports for improved clarity.
- Initialized useRef hooks with null for better type safety in various components.
- Adjusted props types to use HTMLAttributes for more accurate type definitions.

* chore: update package dependencies

- Removed outdated dependencies: @agentic/exa, @agentic/searxng, @agentic/tavily, and rc-virtual-list.
- Added back @ant-design/v5-patch-for-react-19 and rc-virtual-list with specified versions for improved compatibility.

* fix(useMessageOperations): ensure message retrieval from store when updating content
2025-03-27 12:06:47 +08:00
ousugo
6fdf57d908 feat(message): calculate token usage when message content is updated 2025-03-27 08:32:46 +08:00
ousugo
7cbc95d62a feat(models): add 'qwen2.5-omni' to allowed vision models 2025-03-27 08:31:58 +08:00
one
8978457995 fix: open 'data' page by default after routing to data settings 2025-03-26 22:15:27 +08:00
one
8df32b4dd9 fix(HealthCheck): exclude rerank models from being checked (#3969)
* fix(HealthCheck): exclude rerank models from being checked

* fix: info in en
2025-03-26 21:44:26 +08:00
OrzMiku
cb47fc499e refactor(AgentCard): unify dropmenus 2025-03-26 21:17:24 +08:00
Sorades
f9027b83d3 feat(message): 将fold display mode的状态持久化 2025-03-26 19:21:39 +08:00
kangfenmao
8774f83d52 build: replace @llm-tools/embedjs with @cherrystudio/embedjs 2025-03-26 18:14:04 +08:00
purefkh
46f080e813 fix(UI): exclude rerank models from mention dropdown (#3958) 2025-03-26 16:17:07 +08:00
africa1207
cc34efebe7 feat: 优化导出obsidian,自动选择库路径,不再需要手动配置 (#3854)
* feat: 优化导出obsidian,自动选择库路径,不再需要手动配置

* fix: eslint报错

* feat: 增加预设置默认仓库

* fix: 解决合并冲突
2025-03-25 21:31:22 +08:00
Teo
eeb8621037 feat: Use logo instead of avatar 2025-03-25 21:30:49 +08:00
kangfenmao
cc6796ac2c feat: update model identifiers and names in configuration
- Changed model ID from 'mixtral-8x7b-32768' to 'mistral-saba-24b' and updated its name to 'Mistral Saba 24B'.
- Updated model ID from 'gemma-7b-it' to 'gemma-9b-it' and changed its name to 'Gemma 9B'.
- Enhanced clarity and consistency in model naming conventions.
2025-03-25 20:18:14 +08:00
kangfenmao
ba194e3947 Revert "feat: support acrylic effect for Windows"
This reverts commit a829f7b5f1.
2025-03-25 20:13:54 +08:00
kangfenmao
13ddca9c11 ci: fix eslint slow 2025-03-25 18:34:20 +08:00
kangfenmao
6ec5e546c2 feat: update migration for settings auto-check update
Incremented version to 85 and updated migration logic to transition from manual to automatic update checks in settings, enhancing user experience.
2025-03-25 13:16:18 +08:00
wangxiaolong
5086e9d635 feat: 更新自动检查更新功能易读性
将手动检查更新的设置更改为自动检查更新,更新相关的状态管理和界面文本,以提升用户体验。
2025-03-25 13:06:25 +08:00
d5v
315f083fa1 feat: add Siyuan Note export functionality and configuration (#3845)
* feat(i18n): add Siyuan Note export functionality and configuration

- 增加导出到思源笔记。

* feat/Add document address

---------

Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-25 13:05:21 +08:00
nutstore-dev
2483679874 feat: nutstore integration (#3461)
* feat(protocol): add custom protocol

* feat(webdav): add handler for checking webdav connection

* feat(webdav): abstract WebDAV modal components

* feat(nutstore): add nutstore sso

---------

Co-authored-by: shlroland <shlroland1995@gmail.com>
2025-03-25 11:40:11 +08:00
z-zeechung
02da40678f feat: Katex and MathJax blocks horizontally auto-scroll (#3806) 2025-03-25 09:44:35 +08:00
ousugo
5225496936 fix(thinking): Claude think label recognition error problem 2025-03-25 08:57:49 +08:00
Chen Tao
b21021d975 feat(genmini): enhance (#3849) 2025-03-25 08:52:43 +08:00
Hakadao
a829f7b5f1 feat: support acrylic effect for Windows 2025-03-25 08:50:24 +08:00
hobee
7ebc257ef9 feat(主题): 添加settingTheme字段以增强主题切换功能
在ThemeProvider中添加settingTheme字段,用于在Sidebar组件中显示当前主题状态。这样用户可以更直观地了解当前主题设置
2025-03-25 08:50:03 +08:00
Teo
13435ae3a0 feat(pending-animation): 当消息处于后台pending时,助手头像跟话题显示脉冲动画效果 (#3867) 2025-03-25 08:48:26 +08:00
fullex
b069bd0e62 fix: some shortcuts not enabled 2025-03-25 00:48:35 +08:00
hobee
2fef8ac55d feat: 添加隐藏小程序功能
可以直接在小程序界面隐藏小程序
2025-03-25 00:32:39 +08:00
hobee
8d7a91c9b4 feat(i18n): 在侧边栏添加隐藏小工具的翻译
为多种语言添加了“隐藏小工具”的翻译,以支持新的功能需求。
2025-03-25 00:32:39 +08:00
Asurada
7a11b3c8b7 feat(SettingTab): add support for reasoning effort model check (#3842) 2025-03-24 09:23:32 +08:00
Pleasurecruise
00585792c9 fix: apikey input flickering 2025-03-23 22:45:33 +08:00
Chen Tao
72a01b8ba6 feat(knowledge): support Voyage AI (#3810)
* feat(knowledge): support Voyage AI

* chore
2025-03-23 19:31:18 +08:00
kangfenmao
229b14f3fd fix(prompts): enhance FOOTNOTE_PROMPT for clarity and completeness
- Updated the FOOTNOTE_PROMPT to instruct the model to provide answers based on its knowledge when reference materials are irrelevant, ensuring responses are clearly structured and complete.
2025-03-23 14:25:04 +08:00
kangfenmao
95d9c50ad7 fix(ApiService): remove quotes from message summaries
- Updated the fetchMessagesSummary function to remove all quotes from the generated summaries, ensuring cleaner output for the user.
2025-03-23 14:19:28 +08:00
kangfenmao
35f271bc04 feat(i18n): add chat history localization for multiple languages
- Added chat history localization entries for English, Japanese, Russian, Simplified Chinese, Traditional Chinese, ensuring consistent user experience across languages.
- Removed redundant history entries from previous versions to streamline localization files.
2025-03-23 13:38:38 +08:00
africa1207
f7050c09cf feat:增加聊天记录流程图,方便查看 (#3772)
* feat: 聊天记录流程图

* fix: 修复偶尔多标签切换不滚动的问题
2025-03-23 13:35:16 +08:00
kangfenmao
9e952e9ccc refactor(ipc): simplify launch on boot handling and improve WindowService logic
- Updated the IPC handler for setting launch on boot to directly use the boolean parameter for openAtLogin.
- Cleaned up the WindowService logic to enhance readability and maintainability, including minor adjustments to the tray behavior on macOS.
2025-03-23 13:22:54 +08:00
kangfenmao
230732378d feat(i18n): add machine translations for Greek, Spanish, French, and Portuguese
- Updated the translation script to output machine-generated translations for Greek, Spanish, French, and Portuguese.
- Adjusted file paths for translation outputs and ensured proper formatting in the translation prompts.
- Added a README file to indicate that the translations are machine-generated and should not be edited.
2025-03-22 23:41:17 +08:00
kangfenmao
87b5198df2 fix: i18n check 2025-03-22 23:21:45 +08:00
kangfenmao
2ea1c8142a feat: add GenerateImageButton component to Inputbar for image generation functionality 2025-03-22 22:45:45 +08:00
kangfenmao
dd1b538687 fix: i18n and lint 2025-03-22 22:31:43 +08:00
z-zeechung
dcbe3ac1c6 i18n: 新增自动i18n脚本。新增阿拉伯文,希腊文,西班牙文,法文,葡萄牙文翻译 (#3792)
* added auto i18n script. added arab, greek, spanish, france, portuguese translation

* remove arabian
2025-03-22 22:20:09 +08:00
Chen Tao
52bcfe4fd0 fix(knowledge): show more info (#3790)
* feat: remove rerank model from embedded model

* feat: add rerank model info

* fix: embedding and rerank model end without `/v1` bug
2025-03-22 22:14:25 +08:00
Chen Tao
79dfcb9b76 feat(provider): gemini-2.0-flash-exp image (#3421)
* feat: finish basic gemini-2.0-flash-exp generate image

* feat: support edit image

* chore

* fix: package https-proxy-agent-v5 version

* feat: throw finish message and add history messages

* feat: update generate image models

* chore

---------

Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-22 22:10:11 +08:00
one
176f03f8a1 feat: add a search bar to model list (#3788)
* feat: add a search bar to model list

* feat: make the search bar collapsible
2025-03-22 21:44:00 +08:00
kangfenmao
d74bc8d191 fix: update placeholder text in localization files for tag input fields
- Removed unnecessary information about using pure numbers in tag placeholders across multiple languages.
2025-03-22 21:42:55 +08:00
one
0d17f6a5ba fix: make the setting icon style of non-system providers consistent with system providers 2025-03-22 19:44:39 +08:00
kangfenmao
fe738bc937 refactor: enhance model tags and localization for new model types
- Added support for rerank models in ModelTags component.
- Updated localization keys for model types in various icon components.
- Modified SelectModelPopup to filter out rerank models appropriately.
- Improved model identification logic in models configuration.
- Enhanced UI elements to reflect updated model types and their respective tooltips.
2025-03-22 19:38:00 +08:00
kangfenmao
051a71571d refactor: update rerank model support and configuration
- Changed provider configuration in dev-app-update.yml to use GitHub.
- Added SUPPORTED_REANK_PROVIDERS constant to filter available rerank models.
- Updated tooltip messages in localization files to indicate supported providers.
- Enhanced AddKnowledgePopup and KnowledgeSettingsPopup components to display supported providers in the UI.
2025-03-22 16:30:54 +08:00
kangfenmao
0f6df4e5e0 fix: remove unnecessary dependency from useEffect in MessageAnchorLine component 2025-03-22 10:12:04 +08:00
Dawn-spring
9547b00691 refactor: 改进 Obsidian 导出,不再依赖 Obsidian 第三方插件 (#3637)
改进 Obsidian 导出,不在依赖 Obsidian 第三方插件
2025-03-22 10:11:49 +08:00
MyPrototypeWhat
7c1dfdd6a7 refactor(NpxSearch): improve type safety and error handling
- Changed import of MCPServer to type import for better clarity.
- Enhanced error handling in async operations to manage unknown error types.
- Updated Table component to use ellipsis for long text in description and npm link.
- Adjusted column width for actions and ensured consistent styling in the component.
2025-03-22 10:09:40 +08:00