kangfenmao
9c6de71fbb
lint: fix eslint error
2025-04-05 10:52:45 +08:00
Hamm
3290ac4b1b
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
Chen Tao
710171278a
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
kangfenmao
cc32c36222
build: replace @llm-tools/embedjs with @cherrystudio/embedjs
2025-03-26 18:14:04 +08:00
Chen Tao
ae8869e1b6
feat(knowledge): support Voyage AI ( #3810 )
...
* feat(knowledge): support Voyage AI
* chore
2025-03-23 19:31:18 +08:00
eeee0717
bddec81402
fix
2025-03-21 20:21:19 +08:00
SuYao
4927f98e59
revert(Proxy): remove proxyManager usage from multiple services ( #3720 )
...
* revert(Proxy): remove proxyManager usage from multiple services
* refactor(ProxyManager): streamline proxy configuration and management
2025-03-21 16:04:45 +08:00
eeee0717
b50f8a4c11
feat(knowledge base): enhance knowledge base with rerank model
2025-03-18 21:47:06 +08:00
kangfenmao
e760b1be6b
refactor: replace console.debug with console.log for improved logging consistency
...
- Updated various components and services to replace console.debug statements with console.log for better visibility in logs.
- This change enhances the logging approach across the application, ensuring that important messages are consistently logged.
2025-03-17 13:10:11 +08:00
suyao
b9d97e8a35
feat(Proxy): Implement proxy management system
...
- Add ProxyManager service to handle system, custom, and no proxy configurations
- Integrate proxy support for Gemini, Knowledge, and WebDav services
- Add fetch-socks and undici for advanced proxy handling
- Enhance proxy configuration with environment variable and session management
2025-03-11 09:56:40 +08:00
kangfenmao
687f140a5c
docs: Add comprehensive documentation for KnowledgeService concurrent processing mechanism
...
- Created detailed technical documentation explaining the KnowledgeService's task queue and workload management
- Added JSDoc comment to KnowledgeService.ts to provide high-level overview
- Documented key aspects of concurrent task processing, including workload evaluation, task state management, and resource optimization strategies
2025-03-02 20:36:13 +08:00
icinggslits
1b09bb47bf
feat: Improve file upload for the knowledge base ( #2544 )
...
* feat: Improve file upload for the knowledge base
* feat: Improve file upload for the knowledge base
* feat: Improve file upload for the knowledge base
---------
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-02 20:21:23 +08:00
kangfenmao
11bd55701c
revert: some proxy errors in main process ( #2294 )
2025-03-01 23:17:44 +08:00
suyao
5bacf048f2
fix: The proxy configuration is not correctly passed.
2025-03-01 00:42:56 +08:00
SuYao
d51da99b8f
fix: some proxy errors in main process ( #2294 )
...
* formatter proxy config type
* fix: some proxy errors in main process
* chore: Remove debug logging in ProxyManager
2025-02-27 16:46:05 +08:00
eeee0717
88dd75827a
fix bug: uniqueIds is null when uploaded directory
2025-02-24 21:40:17 +08:00
sijie-chan
3015e90925
fix: 添加多个目录到知识库多个进度之间展示混淆
2025-02-24 12:40:00 +08:00
kangfenmao
40203fb721
fix: Remove LM Studio provider from initial state
2025-02-22 22:31:37 +08:00
sijie-chan
d0e233f1b3
fix: 添加目录到知识库任意一个失败界面上会展示失败
2025-02-22 11:26:31 +08:00
eeee0717
3c958c3d11
feat: 目录进度可视化
2025-02-18 19:45:47 +08:00
kangfenmao
b9affe3eb8
style: code format
2025-02-13 11:40:55 +08:00
Chen Tao
c6f136caa2
feat: knowledge base support more file types ( #1300 )
...
* feat: knowledge base support more file types
* chore: add common document types
* feat: finish basic odloader
* feat: finish open document loader
* feat: support more type from dictionary
* fix: 删除目录时仍能检索到信息
* chore
2025-02-13 11:36:33 +08:00
Wenwei Lin
c900a186b7
feat: 知识库文件支持 html 类型
2025-02-09 21:27:15 +08:00
kangfenmao
3d2e209550
feat: add knowledge base settings
2025-02-08 19:19:59 +08:00
kangfenmao
bfa61ae3ee
feat: reduce embedding batch size to 5
2025-02-04 12:35:42 +08:00
Nanami
7f7300e6dc
feat: Support configurable chunk size and overlap for knowledge base
2025-01-27 12:30:22 +08:00
亢奋猫
c9813bb1e2
feature: customizable sidebar module #644 ( #680 )
...
* feat:对话的时候支持侧边栏拖拽调整宽度
* feat:对话的时候支持侧边栏拖拽调整宽度
* feat: 隐藏app sidebar 用户体验度提升,不支持隐藏对话
* fix:对话勾选知识库 国际化错误
* refactor: split the SidebarIconsManager module out of DisplaySettings
* style: update SidebarIconsManager style
* ci: fix typecheck
* Revert "feat:对话的时候支持侧边栏拖拽调整宽度"
This reverts commit 58072128f0741ecc4f918564512ec1e4ee3e9edb.
* refactor: merge migrate versions
* refactor: simplify sidebarIcons data structure
* chore: move react-beautiful-dnd to dev dependencies
* chore: use @hello-pangea/dnd replace react-beautiful-dnd
* docs: update translation and formatting of input messages
---------
Co-authored-by: hxp0618 <1169924772@qq.com>
Co-authored-by: huang <hxp0618@gmail.com>
2025-01-07 19:11:12 +08:00
kangfenmao
b2818f8619
fix: reduce batch size for knowledge service and openai embeddings
2024-12-31 14:41:08 +08:00
kangfenmao
6d9013f0a1
fix: 知识库无法向量化 MD 文件 #569
2024-12-31 00:11:51 +08:00
kangfenmao
c409256ae9
fix: azure openai embedding
2024-12-27 14:02:53 +08:00
kangfenmao
153e7a9299
refactor: knowledge base engine change to libsql
2024-12-26 10:00:37 +08:00
kangfenmao
c50ac440c8
fix: knowledge base bugs
2024-12-25 21:54:46 +08:00
kangfenmao
34ebab0af8
refactor: knowledge base database engine
2024-12-25 17:42:03 +08:00
kangfenmao
2f64653b1e
fix: knowledge base bugs
2024-12-24 12:41:58 +08:00
kangfenmao
35fd5aef22
fix: knowledge bugs
2024-12-23 10:48:40 +08:00
kangfenmao
9aa2a4727d
build: add matrix
2024-12-19 17:20:52 +08:00
kangfenmao
ca6027dd83
feat: remove knowledge queue
2024-12-19 13:45:11 +08:00
kangfenmao
c2462fd51c
feat: knowledge base
2024-12-19 09:24:20 +08:00