icarus
7bc49c32e9
refactor(ocr): 移除独立的灰度处理模块并改进预处理流程
...
将灰度处理功能直接集成到OCR预处理中,不再需要单独的image模块
添加normalise和threshold处理以提升OCR识别效果
2025-08-24 20:46:33 +08:00
icarus
362ac6d0b7
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-24 20:28:10 +08:00
icarus
f88eb8b08e
refactor(ocr): 添加OCR图像预处理功能并优化TesseractService
...
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-08-24 20:25:12 +08:00
icarus
222b3bacab
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-24 18:58:21 +08:00
icarus
0569d146f4
Merge remote-tracking branch 'upstream' into feat/ocr
2025-08-24 18:54:35 +08:00
co63oc
6d102ccef8
chore: fix typos ( #9477 )
2025-08-24 17:15:35 +08:00
icarus
07603ae9db
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-24 00:02:17 +08:00
icarus
0e0796ca8b
refactor(ocr): 移除注释掉的tesseract语言映射代码
...
使用Tesseract.js的LanguageCode类型替代硬编码的语言列表,提高类型安全性
2025-08-23 19:24:05 +08:00
beyondkmp
d6866052c4
fix: add copilot header to fix json error ( #9456 )
...
* add accept type in header
* add header
2025-08-23 18:59:29 +08:00
icarus
7d1c775afd
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-23 15:55:56 +08:00
icarus
be242d1308
refactor(OcrService): 移除重复的OcrHandler类型定义
...
已在@types中定义OcrHandler类型,移除重复定义以提高代码一致性
2025-08-23 15:08:28 +08:00
icarus
bee0cefd5c
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-23 13:48:25 +08:00
icarus
f3da4a6e36
refactor(ocr): 统一使用 SupportedOcrFile 类型替换 FileMetadata
...
更新 OCR 服务及其 Tesseract 实现,使用 SupportedOcrFile 类型替代原有的 FileMetadata 类型,以提高类型安全性和一致性。同时在 OcrService 中添加重复注册的警告日志。
2025-08-23 13:45:21 +08:00
icarus
bfb64522cd
refactor(ocr): 将Tesseract相关配置移至服务内部
...
将语言列表和下载URL常量从共享配置移至Tesseract服务内部
使用常量定义图片大小阈值以提高可读性
2025-08-23 13:26:09 +08:00
icarus
64c55385a4
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-23 13:00:47 +08:00
icarus
7cd0ff5d32
refactor(ipc): 简化OCR处理程序参数
2025-08-23 12:57:57 +08:00
beyondkmp
99157f0261
use bind function
2025-08-23 12:20:06 +08:00
beyondkmp
902f83d95f
use register design mode
2025-08-23 10:51:24 +08:00
beyondkmp
b82a58f0ff
change to asyn
2025-08-23 10:18:36 +08:00
beyondkmp
cda0686f1d
support cn data
2025-08-23 10:11:57 +08:00
beyondkmp
9acfb5fb9e
feat(ocr): enhance Tesseract service with language support and worker management
...
- Added support for multiple Tesseract languages: Chinese (Simplified and Traditional) and English.
- Refactored Tesseract worker management into a class for better encapsulation and reuse.
- Introduced methods to dynamically determine language path based on IP country and manage worker lifecycle.
2025-08-23 08:44:42 +08:00
icarus
66fff8fb76
Merge branch 'feat/ocr' into feat/ocr-translate
2025-08-23 00:38:20 +08:00
icarus
d3e338e6a8
Merge remote-tracking branch 'upstream' into feat/ocr
2025-08-23 00:37:48 +08:00
one
35968f4861
chore(ci): refine pr ci steps ( #9429 )
...
* chore(ci): refine pr ci steps
* fix: line errors
2025-08-22 22:52:03 +08:00
icarus
364a0f8bb7
fix(ocr): 修复文件类型与OCR提供者能力不匹配时的错误抛出位置
...
将错误抛出语句移至else分支
2025-08-22 20:36:45 +08:00
icarus
cf0e6a8f73
refactor(ocr): 修改tesseractOcr返回完整识别结果而非仅文本
...
返回完整识别结果以便后续处理使用更多OCR信息,同时简化imageOcr中的条件判断逻辑
2025-08-22 20:36:37 +08:00
icarus
94b71dde60
refactor(TesseractService): 添加日志记录并更新worker配置
...
添加loggerService用于记录worker日志,并更新createWorker配置以使用自定义logger
2025-08-22 20:34:39 +08:00
icarus
9d8eea7f2e
refactor(ocr): 将Tesseract服务文件移动到tesseract子目录并更新配置
2025-08-22 20:33:56 +08:00
icarus
7fa2e62dce
fix(ocr): 修复文件类型与OCR提供者能力不匹配时的错误抛出位置
...
将错误抛出语句移至else分支
2025-08-22 20:29:46 +08:00
icarus
5241f11eeb
refactor(ocr): 修改tesseractOcr返回完整识别结果而非仅文本
...
返回完整识别结果以便后续处理使用更多OCR信息,同时简化imageOcr中的条件判断逻辑
2025-08-22 20:28:33 +08:00
icarus
c04cd3b71e
feat(fs): 添加自动识别编码读取文本文件功能
...
实现通过自动检测文件编码来读取文本文件的功能
在IPC通道、预加载API和文件服务中添加相关方法
2025-08-22 19:18:09 +08:00
icarus
c5d7d7b849
refactor(TesseractService): 添加日志记录并更新worker配置
...
添加loggerService用于记录worker日志,并更新createWorker配置以使用自定义logger
2025-08-22 18:32:31 +08:00
icarus
40cf92a246
refactor(ocr): 将Tesseract服务文件移动到tesseract子目录并更新配置
2025-08-22 18:16:03 +08:00
icarus
af05960cd3
feat(OCR服务): 支持base64字符串作为OCR输入
...
扩展tesseractOcr函数以接受base64字符串或图像文件作为输入
2025-08-22 16:54:57 +08:00
icarus
1864419e70
fix(ocr): 添加图像大小检查并优化错误处理
...
检查图像文件大小是否超过50MB限制
使用buffer读取文件替代直接路径识别
简化错误处理逻辑,直接抛出原始错误
2025-08-22 16:52:02 +08:00
icarus
a6aee21a96
refactor(ocr): 统一OCR类型导入路径
...
将所有OCR相关类型从'@renderer/types/ocr'改为从'@renderer/types'或'@types'导入
优化DEFAULT_OCR_PROVIDER类型定义
2025-08-22 16:12:25 +08:00
icarus
01ad89eb54
refactor(OcrService): 更新日志上下文为'main:OcrService'
2025-08-22 15:30:49 +08:00
icarus
9d438be48f
feat(ocr): 添加OCR功能支持
...
实现基于Tesseract的OCR功能,包括文件类型检查、服务接口和IPC通信
新增OCR相关类型定义和服务实现
2025-08-22 15:30:02 +08:00
beyondkmp
f66cb2651f
refactor: simplify NotificationService initialization and use windowService for notifications ( #9411 )
...
* refactor: simplify NotificationService initialization and use windowService for notifications
- Removed the dependency on BrowserWindow in NotificationService constructor.
- Updated the notification handling to utilize windowService for showing notifications and sending events, improving code modularity.
* refactor: remove constructor from NotificationService for cleaner initialization
2025-08-22 14:41:36 +08:00
beyondkmp
b4a3a483e9
fix: change title bar overlay color for windows ( #9407 )
...
* fix: update titleBarOverlayDark color for improved visibility
* refactor: import isDev and isWin constants for cleaner configuration
2025-08-22 12:30:07 +08:00
Chen Tao
1c0e29f029
fix: knowledge encrypted ( #9385 )
2025-08-21 16:58:16 +08:00
beyondkmp
4dabc214f2
feat: enhance file extension handling in Inputbar ( #9269 )
...
* feat: add isTextFile functionality and improve file selection handling
- Introduced a new IPC channel for checking if a file is a text file.
- Implemented isTextFile method in FileStorage service to determine file type based on content.
- Enhanced AttachmentButton to filter selected files based on text file validation.
- Updated translations to include support for displaying unsupported file counts across multiple languages.
- Added utility functions for text file validation and filtering in file utilities.
* refactor(FileStorage): replace hardcoded buffer size with constant for improved readability
* restore yarn lock
* add isbinaryfile dep
* refactor: 整理导入顺序
* fix(preload): 为isTextFile方法添加返回类型Promise<boolean>
* refactor(FileManager): update getSafePath to use file metadata for path retrieval
- Modified getSafePath method to utilize the path from file metadata instead of a hardcoded file path.
- Enhanced handling for files not stored in the file storage system.
* refactor(FileUtilities): rename text file functions for clarity
- Updated function names from isTextFile to isSupportedFile and filterTextFiles to filterSupportedFiles to better reflect their purpose.
- Adjusted related imports and usages in AttachmentButton and PasteService components to align with the new naming conventions.
* fix drop files
* refactor(MarkdownStyles): remove last-child margin override; adjust MessageFooter margin and clean up unused code in MessageAttachments
* feat(Sidebar): add 'code_tools' icon and route; enhance CodeToolsPage layout with Navbar and improved provider filtering
* feat(CodeTools): add environment variable support for CLI tools; update UI to manage environment variables and enhance localization for related strings
* refactor(Sidebar): remove unused imports and code related to documentation; streamline sidebar functionality
* refactor(SvgPreview): use transparent container for SVG (#9294 )
* refactor(SvgPreview): use transparent container for SVG
* test: fix snapshot
* refactor(CodeToolsService): replace npm package version fetching with direct API call; simplify command construction for installation
* chore: release v1.5.7-rc.1
* refactor(CodeToolsService): adjust command construction for Windows compatibility; streamline installation command handling
* refactor(Markdown): update disallowed elements to include 'script' for enhanced security
* feat: quick model (#9290 )
* refactor(i18n): 将话题命名模型相关文案更新为摘要模型
更新所有语言文件中关于话题命名模型的文案,统一改为摘要模型,以反映功能的扩展和更通用的用途
* refactor(设置页面): 优化主题命名弹窗组件性能
使用useCallback和useMemo优化回调函数和渲染性能
将重复的JSX代码提取为独立组件
* feat(设置): 在模型设置中添加话题命名折叠面板
将话题命名设置从直接显示改为折叠面板形式,提升界面整洁度
* refactor(i18n): 重构话题命名相关翻译字段结构
* docs(i18n): 添加生成图像的高度、宽度和安全容忍度翻译占位符
* fix(settings): 修正主题命名弹窗中的翻译键名
* style(ui): 调整主题命名弹窗的间距和文本区域高度
移除多余的上下边距,并使用自适应高度的文本区域
* refactor(llm): 将 topicNamingModel 重命名为 summaryModel
更新相关函数、状态和测试用例以反映命名变更
增加迁移逻辑处理旧状态数据
更新持久化版本号至133
* fix(ApiService): 优先使用摘要模型替代默认模型
当获取摘要时,优先使用getSummaryModel()返回的模型,其次才是助手指定的模型或默认模型,以确保摘要生成的一致性
* docs(i18n): 更新摘要模型描述中的搜索关键词提炼
将"搜索结果摘要"修改为"搜索关键字提炼"以更准确描述功能
* fix(i18n): 更新多语言翻译文件中的摘要模型相关文本
* feat(i18n): 为摘要模型设置添加工具提示说明
添加摘要模型设置的工具提示,建议用户选择轻量模型而非思考模型
* refactor(i18n): 将摘要模型相关文案更新为快速模型
更新国际化文案和组件引用,将"摘要模型"统一改为"快速模型"以更准确描述功能用途
* feat(i18n): 将摘要模型重命名为快速模型并更新相关描述
* refactor(llm): 将summaryModel重命名为quickModel以提升语义清晰度
* test(api): 在ApiService测试中添加LlmState类型和awsBedrock配置
添加LlmState类型以满足类型检查要求,并补充awsBedrock的mock配置以完善测试覆盖
* Revert "feat(设置): 在模型设置中添加话题命名折叠面板"
This reverts commit 4d58c053da .
* refactor(settings): 重命名并移动 TopicNamingModalPopup 组件文件
将 TopicNamingModalPopup.tsx 重命名为 QuickModelPopup.tsx 并移动到相应目录
* refactor(QuickModelPopup): 优化主题命名设置布局和样式
移除 TopicNamingSettings 组件内联实现,直接整合到 Modal 中
调整间距和样式,提升视觉一致性
修复文本区域 onChange 去除换行的逻辑
* feat(模型设置): 在快速模型弹窗中添加重置按钮图标并调整布局
将重置按钮改为图标形式并内联显示,同时调整输入区域的高度样式
* docs(i18n): 更新快速模型相关翻译文本
* fix: 将迁移错误日志从133更新为134
* style(settings): 替换模型设置中的图标为Rocket图标以提升视觉一致性
* fix: unexpected quitting full screen mode (#9200 )
* fix(Inputbar): 修正拼写错误,将expend改为expand
* fix: 修复Escape键事件冒泡问题并改进全屏处理
修复多个组件中Escape键事件未阻止冒泡的问题
添加全屏控制IPC通道
将全屏退出逻辑移至渲染进程处理
移除主进程中冗余的全屏退出处理代码
* fix(SelectModelPopup): 修复键盘事件处理并移除无效的useEffect
将键盘事件监听从window移动到Modal容器,避免事件冒泡问题
移除无效的useEffect并更新键盘事件类型定义
* fix(QuickPanel): 拦截window上的keydown事件
* fix(QuickPanel): 修复事件监听器移除时未使用相同参数的问题
* fix(TopView): 修复左侧导航栏布局崩坏问题
* fix: 修正变量名拼写错误,将expended改为expanded
* Revert "fix(SelectModelPopup): 修复键盘事件处理并移除无效的useEffect"
This reverts commit 4211780b95 .
* feat: use quick model to detect translate language (#9315 )
* refactor(语言检测): 移除翻译模型依赖,改用快速或默认模型
* feat(i18n): 添加希腊语翻译支持
* fix(i18n): 更新i18n
统一将翻译模型提示改为快速模型提示,优化多语言文件中的描述
* Revert "feat(i18n): 添加希腊语翻译支持"
This reverts commit 42613cb2e2 .
* feat: add 'code_tools' to sidebar icons and update related components
* fix: KaTeX math engine render
* feat: 同步百炼服务器功能 (#9205 )
* 同步百炼服务器功能
* cr修改
---------
Co-authored-by: yunze <yunze.wyz@alibaba-inc.com>
* fix(SelectionHook): improve validation for selected text range to handle empty strings and ensure valid extraction (#9329 )
chore: update selection-hook dependency to version 1.0.10 in package.json and yarn.lock
* fix: web search references missing caused by early reset (#9328 )
* feat(openai): handle special tokens for zhipu api (#9323 )
* feat(openai): 添加对智谱特殊token的过滤处理
在OpenAIAPIClient中添加对智谱AI特殊token的过滤逻辑,避免不需要的token被输出
* docs(OpenAIApiClient): 添加注释
* refactor(zhipu): 重命名并更新智谱特殊token处理逻辑
将 ZHIPU_SPECIAL_TOKENS_TO_FILTER 重命名为 ZHIPU_RESULT_TOKENS 以更准确描述用途
修改智谱API特殊token处理逻辑,不再过滤而是用**标记结果token
* feat: support openai codex (#9332 )
* support openai codex
* lint
* refactor: remove unused codeTools enum from constant.ts
* fix build
* fix lin
* fix: add support for qwenCode CLI tool and improve error handling in CodeToolsService
* fix: timeout memory leak (#9312 )
* fix(MinappPopupContainer): 修复内存泄漏问题,清理未使用的定时器
在组件卸载时清理setTimeout定时器,避免潜在的内存泄漏
* fix(SelectModelButton): 修复模型选择后更新导致的卡顿问题
使用useRef存储定时器并在组件卸载时清理,避免内存泄漏
* fix(QuickPanel): 修复定时器未清理导致的内存泄漏问题
添加 clearSearchTimerRef 和 focusTimerRef 来管理定时器
在组件清理和状态变化时清理所有定时器
* fix(useInPlaceEdit): 修复编辑模式下定时器未清理的问题
添加清理定时器的逻辑,避免组件卸载时内存泄漏
* refactor(useKnowledge): 使用ref管理定时器并统一检查知识库逻辑
将分散的setTimeout调用统一为checkAllBases方法
使用useRef管理定时器并在组件卸载时清理
* fix(useScrollPosition): 修复滚动位置恢复时的内存泄漏问题
添加清理函数以清除未完成的定时器,防止组件卸载时内存泄漏
* fix(WebSearchProviderSetting): 清理定时器防止内存泄漏
在组件卸载时清理检查API有效性的定时器,避免潜在的内存泄漏问题
* fix(selection-toolbar): 修复选中文本时定时器未清理的问题
* fix(translate): 修复复制文本时定时器未清理的问题
添加 copyTimerRef 来管理复制操作的定时器,并在组件卸载时清理定时器
* fix(WebSearchSettings): 使用useRef管理订阅验证定时器以避免内存泄漏
* fix(MCPSettings): 修复定时器未清理导致的内存泄漏问题
添加 useRef 来存储定时器引用,并在组件卸载时清理定时器
* refactor(ThinkingBlock): 使用 useTemporaryValue 替换手动 setTimeout
移除手动设置的 setTimeout 来重置 copied 状态,改用 useTemporaryValue hook 自动处理
* refactor(ChatNavigation): 使用 useRef 替代 useState 管理定时器
简化定时器管理逻辑,避免不必要的状态更新
* fix(AddAssistantPopup): 清理创建助手时的定时器以避免内存泄漏
添加useEffect清理定时器,防止组件卸载时内存泄漏
* feat(hooks): 添加useTimer钩子管理定时器
实现一个自定义hook来集中管理setTimeout和setInterval定时器
自动在组件卸载时清理所有定时器防止内存泄漏
* refactor(Inputbar): 使用 useTimer 替换 setTimeout 实现延迟更新
将 setTimeout 替换为 useTimer 的自定义 setTimeoutTimer 方法,提高代码可维护性并统一计时器管理
* refactor(WindowFooter): 使用 useTimer 替换 setTimeout 以管理定时器
* docs(useTimer): 更新定时器hook的注释格式和描述
* feat(hooks): 为useTimer添加返回清理函数的功能
允许从setTimeoutTimer和setIntervalTimer返回清理函数,便于手动清除定时器
* refactor(ImportAgentPopup): 使用useTimer替换setTimeout以管理定时器
* refactor: 使用useTimer替代setTimeout以优化定时器管理
* refactor(SearchResults): 使用useTimer替换setTimeout以管理定时器
* refactor(消息组件): 使用useTimer替换setTimeout以管理定时器
* refactor: 使用useTimer替换setTimeout以优化定时器管理
* refactor(AssistantsDrawer): 使用useTimer替换setTimeout以优化定时器管理
* refactor(Inputbar): 使用useTimer替换setTimeout以优化定时器管理
* refactor(MCPToolsButton): 使用useTimer优化定时器管理
* refactor(QuickPhrasesButton): 使用useTimer替换setTimeout以优化定时器管理
* refactor(ChatFlowHistory): 使用useTimer替换setTimeout以管理定时器
* refactor(Message): 使用useTimer替换setTimeout以管理定时器
* refactor(MessageAnchorLine): 使用useTimer替换setTimeout以优化定时器管理
* refactor(MessageGroup): 使用useTimer替换setTimeout以优化定时器管理
* refactor(MessageMenubar): 使用 useTemporaryValue 替换手动 setTimeout 逻辑
* refactor(Messages): 使用 useTimer 优化定时器管理
* refactor(MessageTools): 使用useTimer替换setTimeout以管理定时器
* fix(SelectionBox): 修复鼠标移动时未清除定时器导致的内存泄漏
在鼠标移动事件处理中增加定时器清理逻辑,避免组件卸载时未清除定时器导致的内存泄漏问题
* refactor(ErrorBlock): 使用自定义hook替换setTimeout
使用useTimer中的setTimeoutTimer替代原生setTimeout,便于统一管理定时器
* refactor(GeneralSettings): 使用useTimer替换setTimeout以实现更好的定时器管理
* refactor(ShortcutSettings): 使用useTimer替换setTimeout以优化定时器管理
* refactor(AssistantModelSettings): 使用useTimer替换setTimeout以优化定时器管理
* refactor(DataSettings): 使用useTimer替换setTimeout以增强定时器管理
统一使用useTimer hook管理所有定时器操作,提高代码可维护性
* refactor(NutstoreSettings): 使用useTimer优化setTimeout管理
替换直接使用setTimeout为useTimer hook的setTimeoutTimer方法,提升定时器管理的可维护性
* refactor(MCPSettings): 使用useTimer替换setTimeout以提升代码可维护性
* refactor(ProviderSetting): 使用useTimer优化setTimeout管理
* refactor(ProviderSettings): 使用 useTimer 替换 setTimeout 以优化定时器管理
* refactor(InputBar): 使用useTimer替换setTimeout以实现更好的定时器管理
* refactor(MessageEditor): 使用useTimer替换setTimeout以管理定时器
使用自定义hook useTimer来替代原生setTimeout,便于统一管理和清理定时器
* docs(useTimer): 添加 useTimer hook 的使用示例和详细说明
* refactor(MinappPopupContainer): 使用useTimer替换setTimeout实现
替换直接使用setTimeout为自定义hook useTimer,简化组件清理逻辑
* refactor(AddAssistantPopup): 使用useTimer替换手动定时器管理
用useTimer钩子替代手动管理定时器,简化代码并提高可维护性
* refactor(WebSearchSettings): 使用 useTimer 替换手动定时器管理
移除手动管理的定时器逻辑,改用 useTimer hook 统一处理
* refactor(WebSearchProviderSetting): 使用自定义hook替代原生定时器
用useTimer hook替换原有的setTimeout和clearTimeout逻辑,提高代码可维护性
* refactor(translate): 使用 useTemporaryValue 替换手动实现的复制状态定时器
* refactor(SelectionToolbar): 使用 useTimer 钩子替换 setTimeout 和 clearTimeout
重构 SelectionToolbar 组件,使用自定义的 useTimer 钩子来管理定时器,提升代码可维护性
清理隐藏时的定时器逻辑,避免内存泄漏
* fix(Translate): update settings into db (#9305 )
* fix(翻译): 修复设置没有储存到db的错误
* fix(translate): 修复自动检测方法设置更新失败的问题
添加错误处理逻辑,当更新自动检测方法设置失败时显示错误信息
* Fix AWS Bedrock models not receiving uploaded document content (#9337 )
* Initial plan
* Add file content processing to AWS Bedrock client convertMessageToSdkParam method
Co-authored-by: caozhiyuan <3415285+caozhiyuan@users.noreply.github.com>
* Fix file content format to match other AI clients and update tests
Co-authored-by: caozhiyuan <3415285+caozhiyuan@users.noreply.github.com>
* Update src/renderer/src/aiCore/clients/aws/AwsBedrockAPIClient.ts
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: caozhiyuan <3415285+caozhiyuan@users.noreply.github.com>
Co-authored-by: Phantom <59059173+EurFelux@users.noreply.github.com>
* feat(migrate): initialize default assistant settings if not present (#9303 )
* feat(migrate): update migration logic for version 134; initialize default assistant settings if not present
* Update src/renderer/src/store/migrate.ts
Co-authored-by: Phantom <59059173+EurFelux@users.noreply.github.com>
---------
Co-authored-by: Phantom <59059173+EurFelux@users.noreply.github.com>
* feat: support language aliases for code editor (#9336 )
* feat(CodeEditor): support language aliases
* fix: mermaid
* refactor: lookup
* chore: sort package.json
* fix(SelectionHook): [macOS] add type safety to prevent crashes (#9354 )
chore: update selection-hook dependency to version 1.0.11 in package.json and yarn.lock
* fix: sidebar code icon reset bug (#9307 ) (#9333 )
* fix: 修复侧边栏重置时 Code 图标消失的问题 (#9307 )
问题原因:
- types/index.ts 中的 SidebarIcon 类型定义缺少 'code_tools'
- 存在重复的类型定义和常量定义导致不一致
修复内容:
- 在 types/index.ts 的 SidebarIcon 类型中添加 'code_tools'
- 删除 minapps.ts 中重复的 DEFAULT_SIDEBAR_ICONS 常量
- 统一从 @renderer/types 导入 SidebarIcon 类型
- 删除 settings.ts 中重复的 SidebarIcon 类型定义
这确保了在导航栏设置为左侧时,点击侧边栏设置的重置按钮后,
Code 图标能够正确显示。
* refactor: 将侧边栏配置移至 config 目录
根据 code review 建议,将侧边栏相关配置从 store/settings.ts
移动到 config/sidebar.ts,使配置管理更加清晰。
改动内容:
- 创建 config/sidebar.ts 存放侧边栏配置常量
- 更新相关文件的导入路径
- 在 settings.ts 中重新导出以保持向后兼容
- 添加 REQUIRED_SIDEBAR_ICONS 常量便于未来扩展
这个改动保持了最小化原则,不影响现有功能。
* refactor: improve locate highlight animation (#9345 )
* feat(utils): show weekday in date and datetime prompt variables (#9362 )
* feat(utils): 优化日期时间变量替换格式
为 {{date}} 和 {{datetime}} 变量替换添加更详细的格式选项,包括星期、年月日和时间信息
* test(prompt): 更新测试中日期时间的本地化格式
* refactor(CodeToolsPage): simplify CLI tool change handling and optimize provider filtering logic
* fix(newMessage): reduce default display count from 20 to 10
* feat(AssistantService): introduce DEFAULT_ASSISTANT_SETTINGS for consistent assistant configuration and update migration logic for version 136
* chore: release v1.5.7-rc.2
* fix(Markdown/Link): set href to undefined when it's empty (#9343 )
fix(Markdown/Link): 处理空链接时设置href为undefined
* fix(Inputbar): update file handling to use functional state update for setFiles
* refactor(file): update isSupportedFile function to accept filePath instead of FileMetadata for improved clarity and consistency in file handling
---------
Co-authored-by: icarus <eurfelux@gmail.com>
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: one <wangan.cs@gmail.com>
Co-authored-by: Phantom <59059173+EurFelux@users.noreply.github.com>
Co-authored-by: alickreborn0 <i@guyi.me>
Co-authored-by: yunze <yunze.wyz@alibaba-inc.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Co-authored-by: caozhiyuan <568022847@qq.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: caozhiyuan <3415285+caozhiyuan@users.noreply.github.com>
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Jason Young <44939412+farion1231@users.noreply.github.com>
2025-08-21 14:19:51 +08:00
beyondkmp
332ba5d678
feat: support openai codex ( #9332 )
...
* support openai codex
* lint
* refactor: remove unused codeTools enum from constant.ts
* fix build
* fix lin
* fix: add support for qwenCode CLI tool and improve error handling in CodeToolsService
2025-08-20 15:46:44 +08:00
Phantom
a21fc91915
fix: unexpected quitting full screen mode ( #9200 )
...
* fix(Inputbar): 修正拼写错误,将expend改为expand
* fix: 修复Escape键事件冒泡问题并改进全屏处理
修复多个组件中Escape键事件未阻止冒泡的问题
添加全屏控制IPC通道
将全屏退出逻辑移至渲染进程处理
移除主进程中冗余的全屏退出处理代码
* fix(SelectModelPopup): 修复键盘事件处理并移除无效的useEffect
将键盘事件监听从window移动到Modal容器,避免事件冒泡问题
移除无效的useEffect并更新键盘事件类型定义
* fix(QuickPanel): 拦截window上的keydown事件
* fix(QuickPanel): 修复事件监听器移除时未使用相同参数的问题
* fix(TopView): 修复左侧导航栏布局崩坏问题
* fix: 修正变量名拼写错误,将expended改为expanded
* Revert "fix(SelectModelPopup): 修复键盘事件处理并移除无效的useEffect"
This reverts commit 4211780b95 .
2025-08-19 21:32:53 +08:00
kangfenmao
c5554995dd
refactor(CodeToolsService): adjust command construction for Windows compatibility; streamline installation command handling
2025-08-19 18:10:10 +08:00
kangfenmao
2ace9ba492
refactor(CodeToolsService): replace npm package version fetching with direct API call; simplify command construction for installation
2025-08-19 17:30:07 +08:00
kangfenmao
2265ecab21
feat(CodeTools): add environment variable support for CLI tools; update UI to manage environment variables and enhance localization for related strings
2025-08-19 16:39:50 +08:00
beyondkmp
4a62bb6ad7
refactor: replace axios and node fetch with electron's net module ( #9212 )
...
* refactor: replace axios and node fetch with electron's net module for network requests in preprocess providers
- Updated Doc2xPreprocessProvider and MineruPreprocessProvider to use net.fetch instead of axios for making HTTP requests.
- Improved error handling for network responses across various methods.
- Removed unnecessary AxiosRequestConfig and related code to streamline the implementation.
* lint
* refactor(Doc2xPreprocessProvider): enhance file validation and upload process
- Added file size validation to prevent loading files larger than 300MB into memory.
- Implemented file size check before reading the PDF to ensure efficient memory usage.
- Updated the file upload method to use a stream, setting the 'Content-Length' header for better handling of large files.
* refactor(brave-search): update net.fetch calls to use url.toString()
- Modified all instances of net.fetch to use url.toString() for better URL handling.
- Ensured consistency in how URLs are passed to the fetch method across various functions.
* refactor(MCPService): improve URL handling in net.fetch calls
- Updated net.fetch to use url.toString() for better type handling of URLs.
- Ensured consistent URL processing across the MCPService class.
* feat(ProxyManager): integrate axios with fetch proxy support
- Added axios as a dependency to enable fetch proxy usage.
- Implemented logic to set axios's adapter to 'fetch' for proxy handling.
- Preserved original axios adapter for restoration when disabling the proxy.
2025-08-15 22:48:22 +08:00
beyondkmp
f2b7b07e51
refactor(AppUpdater): streamline release version fetching and improve update logic ( #9167 )
...
- Renamed method from _getPreReleaseVersionFromGithub to _getReleaseVersionFromGithub for clarity.
- Enhanced logic to check for the latest release version using semver.
- Removed unnecessary checks related to test plans when updates are not available.
- Improved logging for better traceability of release version fetching.
2025-08-15 10:45:11 +08:00
George·Dong
5d34e49c57
refactor(bakcup): 单例化S3/WebDAV ( #9181 )
...
* feat(backup): 单例化S3/WebDAV并动态更新配置
* feat(backup): reuse storage instances by comparing core configs
* feat(backup): cache only connection fields for storages
2025-08-15 01:55:19 +08:00