Commit Graph

3867 Commits

Author SHA1 Message Date
karl
e0eac6ab7e
Fix/7973 (#8059)
* fix: 7973 查看原始数据的按钮没有了

* refactor(MessageTools): replace PreviewBlock with CollapsedContent for improved preview rendering

---------

Co-authored-by: suyao <sy20010504@gmail.com>
2025-07-14 21:50:55 +08:00
Teo
094eb5c17e
refactor(ThinkingEffect): Enhance thinking effect (#8147)
refactor(ThinkingEffect): simplify opacity calculation and enhance background styling
2025-07-14 20:47:34 +08:00
SuYao
3d3182095d
fix: enhance OpenAIResponseAPIClient for Azure API version (#8108)
* feat: enhance OpenAIResponseAPIClient and update localization for Azure API version

- Added a new method `formatApiHost` in OpenAIResponseAPIClient to ensure correct API host formatting.
- Updated localization files for English, Japanese, Russian, and Chinese to include tips for Azure OpenAI API version usage.
- Modified ProviderSetting component to display the new Azure API version tip in the settings interface.

* chore: clean log
2025-07-14 20:15:14 +08:00
EastlingWoo
706f8e1482
Fix: message tool button cannot click on grid mode (#8123)
* Enable pointer events for grid popover message

* Enable pointer events for grid popover message
2025-07-14 15:15:02 +08:00
fullex
ea7e07034a
fix: serif font in markdown title styles (#8129)
refactor: update font-family usage in markdown styles
2025-07-14 14:51:01 +08:00
Phantom
1fd92d6a5d
feat(constant): add .fxml file extension (#8125)
feat(常量配置): 添加对JavaFX XML文件扩展名.fxml的支持
2025-07-14 14:49:40 +08:00
cnJasonZ
810ebad9ba
Fix/ppio links (#8131)
* fix: fix ppio oauth links

* fix: fix ppio links

---------

Co-authored-by: one <wangan.cs@gmail.com>
2025-07-14 13:45:15 +08:00
one
c6554c8f80
perf: prevent unnecessary topic rerendering (#8116) 2025-07-14 13:43:01 +08:00
SuYao
19a8d9e9b3
fix(OpenAIApiClient): refine grok4 check for OpenRouter (#8074)
fix(OpenAIApiClient): refine model ID check for reasoning effort
2025-07-14 13:11:02 +08:00
kangfenmao
a490287b4a refactor: streamline Vite configuration and enhance CitationsList component
- Updated Vite configuration to remove conditional output settings, ensuring consistent build behavior.
- Refactored CitationsList component to use a Scrollbar for improved UI, encapsulating popover content within a styled container.
2025-07-14 12:57:32 +08:00
Konv Suu
90b0c91b2f
fix: set source language when checking history item (#8130)
feat: set source language when checking history item
2025-07-14 12:19:35 +08:00
Phantom
1493132974
fix: cannot paste images when mentioned visual models (#7817)
* refactor(paste): 优化粘贴功能逻辑,移除模型类型依赖

重构粘贴服务处理逻辑,将文件类型支持判断移至组件层
简化handlePaste接口,移除isVisionModel和isGenerateImageModel参数

* fix(MessageEditor): 支持生成图片模型的视觉消息检查

* refactor(Inputbar): 移除调试用的console.log语句

* refactor(PasteService): 移除调试用的console.log语句
2025-07-14 11:41:54 +08:00
kangfenmao
6a4468193b refactor(vite): set legalComments none in prod mode 2025-07-14 10:51:36 +08:00
SuYao
4dd99b5240
feat: enhance Anthropic and OpenAI API clients with incremental output support (#8104)
- Added support for incremental output in AnthropicAPIClient by introducing TEXT_START and THINKING_START chunk types.
- Updated OpenAIAPIClient to conditionally enable incremental output for specific models.
- Modified messageThunk to handle updated smartBlockUpdate calls with an isComplete parameter for better state management.
- Introduced incremental_output parameter in ReasoningEffortOptionalParams type for enhanced configuration options.
2025-07-14 10:30:51 +08:00
Teo
7961ba87ed
feat: thinking effect (#8081)
* feat(i18n): add smooth stream output translations for multiple languages

* feat(ThinkingBlock): integrate MarqueeComponent for enhanced message display

* refactor(i18n): remove smooth stream output references from translations and components

* refactor(typingOutput): enhance typing output logic and add debugging information

* refactor(Markdown): consolidate markdown utility imports for cleaner code

* feat(styles): add new styles for dropdown menus, popovers, and modals

* test(ThinkingBlock): enhance tests for streaming status and content collapse behavior

* refactor(typingOutput): remove debugging console log from outputNextChar function

* refactor(MarqueeComponent): comment out blur effect for last marquee item and adjust ThinkingBlock margin

* style(ThinkingBlock): update snapshot to include margin-top for improved layout

* refactor(typingOutput): 修改流式输出逻辑以支持队列长度检查

* refactor(Markdown): simplify useTypingOutput by removing isStreaming parameter

* test(Markdown): comment out re-render tests for content changes

* test(Markdown): remove commented-out re-render tests for content changes

* feat(ThinkingEffect): implement ThinkingEffect component for dynamic message display

- Introduced ThinkingEffect component to enhance the visual representation of thinking states.
- Integrated the new component into ThinkingBlock, replacing MarqueeComponent for improved functionality.
- Added animations and dynamic height adjustments based on message content and expansion state.

* test(ThinkingBlock): update mocks for ThinkingEffect and motion components in tests

* fix: Delete unnecessary comments
2025-07-14 10:08:09 +08:00
one
6952bea6e1
fix: table resizing in mcp tool setting (#8057)
- remove sticky headers
- add missing i18n keys
2025-07-13 23:02:13 +08:00
Caelan
53600175b9
Feature/dmxapi painting add model (#7851)
* 新增图片模型

* 新增图片生成模型

* 新增模型和调整提示语
2025-07-13 21:59:35 +08:00
Konv Suu
e5956d4039
feat: improve translate history style (#8060) 2025-07-13 21:11:15 +08:00
one
1f9850c04d
chore(gitignore): exclude more AI editor settings (#8102) 2025-07-13 21:07:45 +08:00
one
df43cb7a90
fix(Knowledge): pass searchResultCount to embed-js (#8118) 2025-07-13 20:22:02 +08:00
kangfenmao
bea664af0f refactor: simplify HtmlArtifactsPopup component and improve preview functionality
- Removed unnecessary extracted components and integrated their logic directly into HtmlArtifactsPopup.
- Enhanced preview functionality with a debounced update mechanism for HTML content.
- Updated styling for better layout and responsiveness, including fullscreen handling.
- Adjusted view mode management for clearer code structure and improved user experience.
2025-07-13 10:18:39 +08:00
kangfenmao
b265c640ca refactor: improve environment variable handling in electron.vite.config.ts
- Introduced `isDev` and `isProd` constants for clearer environment checks.
- Simplified sourcemap and noDiscovery settings based on environment.
- Enhanced esbuild configuration for production to drop console and debugger statements.
2025-07-13 10:18:39 +08:00
beyondkmp
a3d6f32202
fix: replace Select component with custom Selector in LocalBackupSetting (#8055)
* fix: replace Select component with custom Selector in LocalBackupSettings

- Updated LocalBackupSettings to use a custom Selector component for better styling and functionality.
- Enhanced the options for auto-sync interval and max backups with improved structure and internationalization support.
- Added success notification handling in restoreFromLocalBackup function in BackupService for better user feedback.

* refactor: streamline backup service and settings management

- Removed local backup auto-sync functionality and integrated its logic into the general auto-sync mechanism.
- Updated backup service methods to handle specific backup types (webdav, s3, local) more efficiently.
- Renamed backup functions for consistency and clarity.
- Enhanced local backup management in settings to utilize the new auto-sync structure.
- Improved error handling and logging for backup operations.

* refactor: replace Select component with custom Selector in S3Settings

- Updated S3Settings to utilize a custom Selector component for improved styling and functionality.
- Enhanced the options for auto-sync interval and max backups with better structure and internationalization support.
- Removed deprecated Select component to streamline the settings interface.
2025-07-13 07:09:23 +08:00
fullex
16e65d39be
fix: [Linux] support Linux Wayland global shortcuts (#8080)
feat: support Linux Wayland global shortcuts
2025-07-13 00:30:01 +08:00
luoxu1314
186bdb486f
fix: 修复从未打开过的话题导出markdown为空的问题 (#8103)
* feat: 优化导出功能使用 TopicManager 确保消息正确加载

- 移除对 db 的直接依赖,改用 TopicManager.getTopicMessages
- 修复从未打开过的话题导出为空的问题

Signed-off-by: luoxu1314 <xiaoluoxu@163.com>

* Update export.test.ts

修复相关测试mock使用TopicManager而非db.topics.get,确保测试与新的消息加载方式兼容

* Update export.ts

* Update export.test.ts

完善测试

* style(test): 移除多余空行

---------

Signed-off-by: luoxu1314 <xiaoluoxu@163.com>
Co-authored-by: GeorgeDong32 <georgedong32@qq.com>
2025-07-12 22:45:01 +08:00
fullex
ea40cc7692
fix(install): update return codes for bun and uv installation scripts (#8039) 2025-07-12 22:22:07 +08:00
LiuVaayne
16ca373c55
feat: add MCP server version display with badges (#8097) 2025-07-12 15:35:59 +08:00
cnJasonZ
38cf3869bc
fix: ppio oauth links (#8073) 2025-07-11 18:00:35 +08:00
kangfenmao
60e3431b36 chore(version): 1.4.11 2025-07-11 12:18:38 +08:00
kangfenmao
84a6c2da59 feat: add HTML code detection utility and integrate into CodeBlockView
- Introduced `isHtmlCode` function to identify HTML content based on DOCTYPE and tag presence.
- Updated `CodeBlockView` to utilize `isHtmlCode` for conditional rendering of HTML artifacts.
- Added comprehensive tests for `isHtmlCode` to ensure accurate detection of HTML structures.
2025-07-11 12:16:44 +08:00
kangfenmao
5b9ff3053b refactor: update styles and layout in markdown and message components
- Removed unnecessary letter and word spacing in markdown styles.
- Adjusted padding in Inputbar for improved layout.
- Modified margin properties in CitationsList and Message components for consistency.
- Enhanced MessageHeader logic to conditionally hide based on message type.
- Updated icon sizes in MessageMenubar for better alignment.
- Added margin adjustments in ThinkingBlock for improved spacing.
2025-07-11 11:33:20 +08:00
SuYao
8340922263
fix: smartblock update not persist to db (#8046)
* chore(version): 1.4.10

* feat: enhance ThinkingTagExtractionMiddleware and update smartBlockUpdate function

- Added support for THINKING_START and TEXT_START chunk types in ThinkingTagExtractionMiddleware.
- Updated smartBlockUpdate function to include an isComplete parameter for better block state management.
- Ensured proper handling of block updates based on completion status across various message types.

* fix: refine block update logic in messageThunk

- Adjusted conditions for canceling throttled block updates based on block type changes and completion status.
- Improved handling of block updates to ensure accurate state management during message processing.

* chore: add comment

* fix: update message block status handling

- Changed the status of image blocks from STREAMING to PENDING to better reflect the processing state.
- Refined logic in OpenAIResponseAPIClient to ensure user messages are correctly handled based on assistant message content.
- Improved rendering conditions in ImageBlock component for better user experience during image loading.

---------

Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-07-11 11:33:05 +08:00
one
a93cab6b43
fix(CodePreview): revert to absolute positioning (#7980)
* fix(CodePreview): revert to absolute positioning

* fix: add min width to codeblockview
2025-07-11 11:06:21 +08:00
one
9a81c400ab
fix: sticky code toolbar (#8012)
fix: sticky code toolbar for single-model message
2025-07-11 11:05:08 +08:00
西街工坊
808a22d5c6
fix(Doc2xPreprocessProvider): replace filePath split with path.parse… (#8042) 2025-07-11 11:03:05 +08:00
kangfenmao
10e512f32e chore(version): 1.4.10 2025-07-10 23:31:03 +08:00
one
4d75515bd6
refactor: raise the max count of document chunks from 30 to 50 (#7863)
* refactor: raise the max count of document chunks from 30 to 70

- Raise the max count of document chunks count
- Update i18n for websearch rag for consistency

* refactor: lower the count to 50
2025-07-10 22:52:18 +08:00
kangfenmao
3d6c84de6d refactor: improve styling and layout in MessageTools and Prompt components
- Adjusted spacing and border styles in MessageTools for better alignment.
- Updated margin and border properties in Prompt for consistent UI.
- Enhanced background color handling in ToolContentWrapper based on status.
2025-07-10 22:36:48 +08:00
SuYao
3dd393b840
fix: azure-openai (#7978) 2025-07-10 22:17:20 +08:00
LiuVaayne
8f86c53941
feat: implement MCP tool auto-approve functionality (#8007)
*  feat: implement MCP tool auto-approve functionality

- Add auto-approve toggle for MCP tools in settings
- Add improved UI for tool approval with Run/Cancel/Auto-approve buttons
- Add internationalization support for tool approval interface
- Update tool confirmation logic to support auto-approved tools
- Enhance tool status indicators and button styling
- Add disabledAutoApproveTools configuration for MCP servers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: use table for mcp tools setting

* refactor: improve styles, add missing i18n

* refactor: extract renderStatusIndicator, reuse colors

* refactor: simplify the table

* feat: auto approve same tool in a turn

* feat(i18n): add confirmation tooltip for auto-approve tool in multiple languages

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: one <wangan.cs@gmail.com>
Co-authored-by: suyao <sy20010504@gmail.com>
Co-authored-by: Teo <cheesen.xu@gmail.com>
2025-07-10 22:14:52 +08:00
Phantom
a7b78c547a
fix(encoding): encoding detection and decoding logic (#8024) 2025-07-10 22:13:40 +08:00
Chen Tao
bcc1046cdf
feat: add upload file (#8035) 2025-07-10 22:06:09 +08:00
Phantom
c05c06b7a1
fix: VoyageEmbeddings (#8034)
* fix(embeddings): 修复VoyageAI嵌入格式和模型验证错误

修复OpenAIBaseClient中VoyageAI提供商的embedding格式设置问题
完善VoyageEmbeddings模型验证的错误提示信息

* refactor(embeddings): 移除VoyageEmbeddings的模型维度限制检查

简化VoyageEmbeddings的创建逻辑,不再对支持的模型维度进行校验

* fix(embeddings): 修复VoyageEmbeddings模型维度设置问题

修复VoyageEmbeddings中未正确校验模型是否支持设置outputDimension的问题
当provider为voyageai且模型不支持设置dimensions时,自动忽略传入的dimensions参数

* refactor(embeddings): 集中管理支持设置维度的模型列表

将各嵌入模型支持设置维度的模型列表集中到utils模块
不再让VoyageEmbeddings中getDimensions抛出错误,而是自动修复
2025-07-10 21:53:37 +08:00
Phantom
446ebae175
feat(ui): better infinite context (#8021)
* feat(上下文): 添加最大上下文数量限制及显示组件

- 在常量配置中添加 MAX_CONTEXT_COUNT
- 创建 MaxContextCount 组件用于显示无限上下文标识
- 在相关组件中替换硬编码的上下文最大值
- 优化 TokenCount 组件的上下文计数显示样式

* refactor(常量): 添加UNLIMITED_CONTEXT_COUNT常量并替换硬编码值

使用UNLIMITED_CONTEXT_COUNT常量替代多处硬编码的100000值,提高代码可维护性

* refactor(Inputbar): 使用 SlashSeparatorSpan 组件替换内联样式

将 TokenCount.tsx 中的斜杠分隔符内联样式替换为 SlashSeparatorSpan 组件,提高代码可维护性

* fix: 为 InfinityIcon 添加 aria-label 并统一样式
2025-07-10 21:51:31 +08:00
one
ba742b7b1f
feat: save to knowledge (#7528)
* feat: save to knowledge

* refactor: simplify checkbox

* feat(i18n): add 'Save to Local File' translation key for multiple languages

---------

Co-authored-by: suyao <sy20010504@gmail.com>
2025-07-10 21:34:01 +08:00
fullex
7c6db809bb
fix(SelectionAssistant): [macOS] show actionWindow on fullscreen app (#8004)
* feat(SelectionService): enhance action window handling for macOS fullscreen mode

- Updated processAction and showActionWindow methods to support fullscreen mode on macOS.
- Added isFullScreen parameter to manage action window visibility and positioning.
- Improved action window positioning logic to ensure it remains within screen boundaries.
- Adjusted IPC channel to pass fullscreen state from the renderer to the service.
- Updated SelectionToolbar to track fullscreen state and pass it to the action processing function.

* chore(deps): update selection-hook to version 1.0.6 in package.json and yarn.lock

* fix(SelectionService): improve macOS fullscreen handling and action window focus

- Added app import to manage dock visibility on macOS.
- Enhanced fullscreen handling logic to ensure the dock icon is restored correctly.
- Updated action window focus behavior to prevent unintended hiding when blurred.
- Refactored SelectionActionApp to streamline auto pinning logic and remove redundant useEffect.
- Cleaned up SelectionToolbar by removing unnecessary window size updates when demo is false.

* refactor(SelectionService): remove commented-out code for clarity

* refactor(SelectionService): streamline macOS handling and improve code clarity
2025-07-10 20:41:01 +08:00
Konv Suu
855499681f
feat: add confirm for unsaved content in creating agent (#7965) 2025-07-10 19:37:18 +08:00
one
92be3c0f56
chore: update vscode settings (#7974)
* chore: update vscode settings

* refactor: add editorconfig to extensions
2025-07-10 19:34:57 +08:00
one
2a72f391b7
feat: codeblock dot language (#6783)
* feat(CodeBlock): support dot language in code block

- render DOT using @viz-js/viz
- highlight DOT using @viz-js/lang-dot (CodeEditor only)
- extract a special view map, update file structure
- extract and reuse the PreviewError component across special views
- update dependencies, fix peer dependencies

* chore: prepare for merge
2025-07-10 19:32:51 +08:00
SuYao
db642f0837
feat(models): support Grok4 (#8032)
refactor(models): rename and enhance reasoning model functions for clarity and functionality
2025-07-10 19:27:53 +08:00