Commit Graph

5196 Commits

Author SHA1 Message Date
kangfenmao
a1f0addafb fix: update MCPSettings layout and styling
- Increased maxHeight of the modal body to 70vh for improved visibility.
- Changed LogList to extend Scrollbar for better scrolling experience.
- Updated LogItem background color to use a more appropriate variable for consistency.
2025-12-15 10:10:03 +08:00
Peter Dave Hello
e78f25ff91
i18n: Improve zh-tw Traditional Chinese locale (#11915) 2025-12-15 10:04:06 +08:00
George·Dong
68f70e3b16
fix: add capabilities support for Doubao Seed Code models (#11910)
- Add tool calling support in tooluse.ts
- Add reasoning support in reasoning.ts  
- Add vision support in vision.ts

Doubao Seed Code models (doubao-seed-code-preview-251028 and future models)
now support function calling, deep thinking (enabled/disabled), and image understanding.
2025-12-15 03:12:01 +08:00
SuYao
fd921103dd
fix: preserve thinking block (#11901)
* fix: preserve thinking block

* test: add coverage for reasoning parts in assistant messages (#11902)

* Initial plan

* test: add test coverage for reasoning parts in assistant messages

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-12-14 20:05:45 +08:00
kangfenmao
a1e44a6827 fix: adjust marginRight calculation in Chat component for improved layout
Updated the marginRight property in the Chat component to include the border width when the topic position is 'right' and topics are shown. This change enhances the layout by ensuring proper spacing in the UI.
2025-12-13 23:18:45 +08:00
SuYao
ee7eee24da
fix: max search result (#11883)
* fix: add search result limit

* fix: typo

* Update src/renderer/src/aiCore/utils/websearch.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: test

* Apply suggestion from @GeorgeDong32

Co-authored-by: George·Dong <98630204+GeorgeDong32@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: George·Dong <98630204+GeorgeDong32@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: George·Dong <98630204+GeorgeDong32@users.noreply.github.com>
2025-12-13 22:58:59 +08:00
defi-failure
f0ec2354dc
chore: fix sync to gitcode action retry logic (#11881) 2025-12-13 22:51:11 +08:00
SuYao
5bd550bfb4
Fix/cannot get dimension (#11879)
* fix: use ModernAiProvider for embedding dimensions

* fix(ollama)

* Update src/renderer/src/aiCore/legacy/clients/openai/OpenAIBaseClient.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: defi-failure <159208748+defi-failure@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-13 21:09:38 +08:00
SuYao
dc0c47c64d
feat: support gpt 5.2 series (#11873)
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
* feat: support gpt 5.2

* feat: support param when set to 'none'

* chore version & simply type

* fix: comment

* fix: typecheck

* replace placeholder

* simplify func

* feat: add gpt-5.1-codex-max
2025-12-12 22:53:10 +08:00
defi-failure
66feee714b
fix: use ModernAiProvider for embedding dimensions (#11876) 2025-12-12 18:48:38 +08:00
MyPrototypeWhat
96aba33077
fix: correct token calculation in prompt tool use plugin (#11867)
* fix: correct token calculation in prompt tool use plugin

- Fix duplicate token accumulation in recursive stream handling
- Accumulate usage for finish-step without tool calls
- Filter out recursive stream's start/finish events (only one per conversation)
- Make accumulateUsage method public for reuse

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

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

* refactor: simplify pipeRecursiveStream method in StreamEventManager

- Removed unnecessary context parameter from pipeRecursiveStream method
- Streamlined the invocation of pipeRecursiveStream in recursive call handling

This change enhances code clarity and reduces complexity in stream management.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 18:23:49 +08:00
Pleasure1234
97f6275104
fix: update Ollama provider options for Qwen model support (#11850)
* fix: update Ollama provider options for Qwen model support

Pass the model to buildOllamaProviderOptions and enable 'think' option only for supported Qwen models. This improves reasoning capability handling for Ollama providers.

* fix: empty array

* feat: ollama oss

---------

Co-authored-by: suyao <sy20010504@gmail.com>
2025-12-12 16:48:12 +08:00
kangfenmao
b906849c17 fix: update anthropicBaseURL and geminiBaseURL for cherryin provider to include versioning 2025-12-12 16:11:20 +08:00
kangfenmao
f742ebed1f chore(version): 1.7.3 2025-12-12 15:20:40 +08:00
Copilot
d7b9a6e09a
fix: remove cloneDeep to prevent stack overflow with base64 images (#11761)
* Initial plan

* fix: replace cloneDeep with shallow copy to prevent stack overflow with base64 images

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* fix: remove unnecessary cloneDeep in ApiService to prevent stack overflow

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* fix: update message conversion logic for image enhancement models to preserve system messages and collapse user content

* Revert "fix: replace cloneDeep with shallow copy to prevent stack overflow with base64 images"

This reverts commit e203f72fc6.

* fix: 添加数据URL媒体类型解析和URL媒体类型推测功能

* Update src/renderer/src/aiCore/prepareParams/messageConverter.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: remove dead code

* fix: resolve PR review issues for Proxy API Server

- Fix silent data loss: upgrade image load failure from warn to error level with context
- Update JSDoc: rewrite convertMessagesToSdkMessages documentation to accurately describe collapse behavior
- Add test coverage: base64 extraction from data URLs with proper mediaType handling
- Add edge case tests: collapse logic for no assistant, empty images, multiple assistants, conversation endings
- Document mutation safety: add comments explaining shallow copy is intentional in ApiService

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

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

* fix comment

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 15:16:31 +08:00
defi-failure
be9a8b8699
fix: infinite loop in knowledge queue processing (#11856)
* fix: infinite loop in knowledge queue processing

* fix: address review comments
2025-12-12 15:15:49 +08:00
kangfenmao
512d872ac3 fix: prevent closing quick panel in multiple selection mode
- Updated InputbarCore to avoid closing the quick panel when in multiple selection mode or if triggered by input.
- Removed unnecessary useEffect in KnowledgeBaseButton that dynamically updated the quick panel list based on selected bases.
2025-12-12 15:13:32 +08:00
Kejiang Ma
95f5853d7d
feat: OVMS remove intel ultra limit (#11854) 2025-12-12 13:31:05 +08:00
SuYao
c1bf6cfbb7
fix: add gpustack provider for qwen3 enable think (#11843)
* add gpustack provider

* fix: test

* fix: type
2025-12-11 18:16:47 +08:00
亢奋猫
595a0f194a
feat(assistants): enhance ManageAssistantPresetsPopup with sort and batch delete modes (#11835)
* feat(assistants): enhance ManageAssistantPresetsPopup with sort and batch delete modes

- Merge sorting and batch delete functionality into a single popup
- Add Segmented control to switch between sort and delete modes
- Sort mode: drag and drop to reorder assistants using DraggableList
- Delete mode: select and batch delete assistants with checkbox
- Add "+100" button for quick batch selection when there are many presets
- Add manage button to AssistantPresetsPage header
- Update AssistantPresetCard menu to use the new ManageAssistantPresetsPopup

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

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

* feat(assistants): improve selection logic in ManageAssistantPresetsPopup

- Update the "+100" button functionality to select the next 100 unselected presets starting from the last selected preset.
- Enhance user experience by ensuring that the selection continues from the correct index, allowing for more intuitive batch selection of presets.

* feat(assistants): adjust initial mode in ManageAssistantPresetsPopup based on preset count

- Modify the initial state of the mode to switch between 'delete' and 'sort' based on the number of presets available, enhancing user experience by optimizing the default action for larger preset collections.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:50:52 +08:00
Copilot
a91c69982c
feat: Add print to PDF and save as HTML for mini program webviews (#11104)
* Initial plan

*  feat: Add print to PDF and save as HTML for mini program webviews

- Add IPC channels for Webview_PrintToPDF and Webview_SaveAsHTML
- Implement printWebviewToPDF and saveWebviewAsHTML functions in WebviewService
- Add keyboard shortcuts handlers (Cmd/Ctrl+P for print, Cmd/Ctrl+S for save)
- Update WebviewContainer to handle keyboard shortcuts and trigger print/save actions
- Add preload API methods for webview print and save operations

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* ♻️ refactor: Improve webview ID handling and remove unused import

- Get webviewId dynamically when shortcuts are triggered instead of caching
- Remove unused 'join' import from WebviewService
- Add null check for webviewId in shortcut handler

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* 🐛 fix: Improve doctype serialization for better cross-browser compatibility

- Use direct DOCTYPE construction instead of XMLSerializer
- More reliable across different browser contexts
- Based on code review feedback

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

*  enhance: Complete DOCTYPE support with publicId and systemId

- Add full DOCTYPE construction including publicId and systemId
- Fix grammar in comment (custom -> with custom logic)
- Ensures proper HTML5 and XHTML document types are preserved

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* 🔒 security: Add input validation and improve code structure

- Extract shortcut checking logic into isHandledShortcut helper
- Add try-catch in executeJavaScript for safety
- Escape quotes in DOCTYPE publicId and systemId
- Add optional chaining for documentElement
- Provide fallback if doctype properties are unexpected

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* 🐛 fix: Correct DOCTYPE declaration format and quote escaping

- Use single quotes and proper escaping for DOCTYPE attributes
- Add SYSTEM keyword for systemId-only cases
- Ensure PUBLIC is only used with publicId
- Fix quote escaping to use backslashes instead of HTML entities
- Properly handle all DOCTYPE declaration formats per HTML/SGML spec

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* 🐛 fix: Correct JavaScript string escaping for quotes

- Fix quote escaping from \\\\\' to \\'
- Ensures proper backslash escaping in JavaScript template string
- Produces correct \' in the final DOCTYPE string

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* fix(i18n): Auto update translations for PR #11104

*  enhance: Use page title for default filename and improve PDF pagination

- Get page title from webview and use it as default filename for both PDF and HTML export
- Sanitize filename by removing invalid characters and limiting length
- Add preferCSSPageSize option to printToPDF for better multi-page support
- Fallback to timestamp-based filename if title is unavailable

Addresses reviewer feedback and fixes PDF export only capturing first page issue.

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* 🎨 style: Fix formatting issues

- Remove trailing whitespace in WebviewContainer.tsx
- Run biome format and lint to ensure code style compliance

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: SuYao <sy20010504@gmail.com>
2025-12-11 16:42:33 +08:00
Calvin Wade
6b25fbb901
fix: stop thinking timer when reply is aborted (#11794)
Fixes #11772
When user stops the reply after thinking is complete but text is still
streaming, all blocks in STREAMING status are now updated to PAUSED,
which properly stops the thinking timer.

Signed-off-by: Calvin <calvinvwei@gmail.com>
2025-12-11 16:25:31 +08:00
kangfenmao
c52a2dbc48 chore: update typecheck command to use concurrently and add dependency
- Modified the typecheck script in package.json to run node and web type checks concurrently for improved efficiency.
- Added 'concurrently' as a new dependency in package.json and updated yarn.lock accordingly.
2025-12-11 16:20:37 +08:00
亢奋猫
367c4fe6b6
refactor(ui): improve settings tab and assistant item UI (#11819)
* refactor(ui): improve settings tab and assistant item UI

- Remove SettingsTab from HomeTabs, open settings via navbar drawer instead
- Add menu icon to assistant/agent items for quick access to settings popup
- Remove SessionSettingsTab component (consolidated into settings popup)
- Restore avatar display in bubble message style
- Update topic/session item styles for consistency

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

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

* refactor(ui): simplify MessageHeader component logic

- Removed unnecessary header visibility check in MessageHeader.
- Updated justifyContent logic for UserWrap to account for multi-select mode.

This change enhances the clarity and maintainability of the MessageHeader component.

* refactor(ui): streamline ChatNavbar and SettingsTab components

- Removed unused chat state from ChatNavbar.
- Updated SettingsTab to conditionally render settings based on active topic or session.
- Enhanced clarity and maintainability by reducing unnecessary checks and improving component logic.

This change improves the overall user experience and code readability.

* refactor(ui): enhance AgentItem and ChatNavbar components for improved UI

- Updated AgentItem to conditionally hide the assistant icon based on settings.
- Enhanced ChatNavbar to display the assistant's emoji and name with a new layout.
- Introduced memoization for assistant name to optimize rendering.

These changes improve the user interface and maintainability of the components.

* refactor(ui): update HtmlArtifactsPopup to start in fullscreen mode

- Changed initial state of isFullscreen in HtmlArtifactsPopup from false to true.

This adjustment enhances the user experience by providing a more immersive view upon opening the popup.

* refactor(types): remove 'settings' tab from Tab type

- Updated the Tab type in chat.ts to remove the 'settings' option, simplifying the available tabs for the chat interface.

This change streamlines the chat functionality and improves code clarity.

* refactor(ui): enhance UserWrap styling in MessageHeader component

- Added flex property to UserWrap to improve layout flexibility.

This change enhances the responsiveness and layout management of the MessageHeader component.

* refactor(ui): update HtmlArtifactsPopup to prevent drag on ViewControls

- Added "nodrag" class to ViewControls to prevent drag events on double click.

This change improves the user interaction by ensuring that double-clicking on the ViewControls does not trigger drag actions.

* refactor(ui): adjust spacing in AgentLabel component

- Updated the gap between items in the AgentLabel component from 1 to 2 for improved layout consistency.

This change enhances the visual spacing and overall user interface of the AgentSettings page.

* refactor(ui): remove unused useSessions hook from AgentItem component

- Eliminated the useSessions hook from the AgentItem component to streamline the code and improve performance.

This change enhances the maintainability of the AgentItem component by removing unnecessary dependencies.

* refactor(ui): optimize MessageHeader component layout and logic

- Introduced a memoized userNameJustifyContent calculation to streamline the justifyContent logic for UserWrap.
- Simplified the HStack component by replacing inline logic with the new memoized value.

These changes enhance the maintainability and clarity of the MessageHeader component.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:11:21 +08:00
kangfenmao
5f3af646f4 fix: update CherryIN API URL and add thinking budget parameter
- Changed the Gemini base URL in providerToAiSdkConfig to point to '/v1beta/models' for CherryIN provider.
- Added a default thinking budget of -1 in getGeminiReasoningParams to enhance reasoning configuration.
2025-12-11 15:58:37 +08:00
beyondkmp
ed695a8620
feat: Support custom git bash path (#11813)
* feat: allow custom Git Bash path for Claude Code

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* format code

* format code

* update i18n

* fix: correct Git Bash invalid path translation key

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* test: cover null inputs for validateGitBashPath

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* refactor: rely on findGitBash for env override check

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: validate env override for Git Bash path

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* chore: align Git Bash path getter with platform guard

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* test: cover env override behavior in findGitBash

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* refactor: unify Git Bash path detection logic

- Add customPath parameter to findGitBash() for config-based paths
- Simplify checkGitBash IPC handler by delegating to findGitBash
- Change validateGitBashPath success log level from info to debug
- Only show success Alert when custom path is configured
- Add tests for customPath parameter priority handling

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

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

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-11 15:04:04 +08:00
LiuVaayne
8cd4b1b747
🐛 fix: stabilize MCP log IPC registration (#11830) 2025-12-11 15:02:26 +08:00
SuYao
9ac7e2c78d
feat: enhance web search tool switching logic to support provider-specific context (#11769)
* feat: enhance web search tool switching logic to support provider-specific context

* Update packages/aiCore/src/core/plugins/built-in/webSearchPlugin/helper.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/aiCore/src/core/plugins/built-in/webSearchPlugin/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: consolidate control flow in switchWebSearchTool (#11771)

* Initial plan

* refactor: make control flow consistent in switchWebSearchTool

Replace early returns with break statements in all switch cases to ensure
consistent control flow. Move fallback logic into default case for clarity.

Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>

* Update packages/aiCore/src/core/plugins/built-in/webSearchPlugin/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/aiCore/src/core/plugins/built-in/webSearchPlugin/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: format

* fix: ensure switchWebSearchTool is always called for cherryin providers

- Add missing else branch to prevent silent failure when provider extraction fails
- Add empty string check for extracted providerId from split operation
- Ensures web search functionality is preserved in all edge cases

Addresses PR review feedback from #11769

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

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

* refactor: simplify repetitive switchWebSearchTool calls

- Extract providerId determination logic before calling switchWebSearchTool
- Call switchWebSearchTool only once at the end with updated providerId
- Reduce code duplication while maintaining all edge case handling

Addresses review feedback from @kangfenmao

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

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

* refactor: eliminate code duplication in switchWebSearchTool

- Extract helper functions: ensureToolsObject, applyToolBasedSearch, applyProviderOptionsSearch
- Replace switch statement and fallback if-else chain with providerHandlers map
- Use array-based priority order for fallback logic
- Reduce code from 73 lines to 80 lines but with much better maintainability
- Eliminates 12 instances of "if (!params.tools) params.tools = {}"
- Single source of truth for each provider's configuration logic

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

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 15:01:01 +08:00
fullex
c4fd48376d
feat(SelectionAssistant): open URL for search action (#11770)
* feat(SelectionAssistant): open URL for search action

When selected text is a valid URI or file path, directly open it
instead of searching. This enhances the search action to be smarter
about handling URLs and file paths.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: format

* feat: increase maximum custom and enabled items in settings actions list

Updated the maximum number of custom items from 8 to 10 and enabled items from 6 to 8 in the settings actions list to enhance user customization options.

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-11 14:51:32 +08:00
defi-failure
600a045ff7
chore: add gitcode release sync workflow (#11807)
* chore: add gitcode release sync workflow

* fix(ci): address review feedback for gitcode sync workflow

- Use Authorization header instead of token in URL query parameter
- Add file existence check before copying signed Windows artifacts
- Remove inappropriate `|| true` from artifact listing
- Use heredoc for safe GITHUB_OUTPUT writing
- Add error context logging in upload_file function
- Add curl timeout for API requests (connect: 30s, max: 60s)
- Add cleanup step for temp files with `if: always()`
- Add env var validation for GitCode credentials

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

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 14:05:41 +08:00
kangfenmao
880673c4eb fix(AssistantPresetCard): update group handling to use isArray for better type safety 2025-12-11 11:57:16 +08:00
Phantom
03db02d5f7
fix(ThinkingButton): show correct icon when isFixedReasoning (#11825) 2025-12-11 11:29:18 +08:00
Ying-xi
fda2287475
fix(knowledge): prioritize query & refine intent prompt (#11828)
Fixes logic issues in knowledge base search:

1. Inverted search priority in KnowledgeService to use specific sub-queries over generic rewrites.

2. Updated SEARCH_SUMMARY_PROMPT_KNOWLEDGE_ONLY to explicitly allow decomposed questions, improving intent recognition for complex queries.
2025-12-11 11:21:10 +08:00
亢奋猫
76524d68c6
feat: add CherryIN API host selection settings (#11797)
feat(provider): add CherryIN settings and migration support

- Introduced CherryINSettings component for configuring CherryIN API hosts.
- Updated ProviderSetting to conditionally render CherryINSettings based on provider ID and user language.
- Enhanced providerToAiSdkConfig to include CherryIN API host URLs.
- Incremented store version to 183 and added migration logic to set default CherryIN API hosts.
2025-12-11 11:19:28 +08:00
LiuVaayne
96085707ce
feat: add MCP server log viewer (#11826)
*  feat: add MCP server log viewer

* 🧹 chore: format files

* 🐛 fix: resolve MCP log viewer type errors

* 🧹 chore: sync i18n for MCP log viewer

* 💄 fix: improve MCP log modal contrast in dark mode

* 🌐 fix: translate MCP log viewer strings

Add translations for noLogs and viewLogs keys in:
- German (de-de)
- Greek (el-gr)
- Spanish (es-es)
- French (fr-fr)
- Japanese (ja-jp)
- Portuguese (pt-pt)
- Russian (ru-ru)

* 🌐 fix: update MCP log viewer translations and key references

Added "logs" key to various language files and updated references in the MCP settings component to improve consistency across translations. This includes updates for English, Chinese (Simplified and Traditional), German, Greek, Spanish, French, Japanese, Portuguese, and Russian.

---------

Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-12-11 11:18:56 +08:00
zane
711f805a5b
fix(aiCore): omit empty content in assistant messages with tool_calls (#11818)
* fix(aiCore): omit empty content in assistant messages with tool_calls

When an assistant message contains tool_calls but no text content,
the content field was being set to undefined or empty string.
This caused API errors on strict OpenAI-compatible endpoints like CherryIn:
"messages: text content blocks must be non-empty"

The fix conditionally includes the content field only when there is
actual text content, which conforms to the OpenAI API specification.

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

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

* fix(aiCore): omit empty assistant message in new aiCore StreamEventManager

When building recursive params after tool execution, only add the assistant
message when textBuffer has content. This avoids sending empty/invalid
assistant messages to strict OpenAI-compatible APIs like CherryIn, which
causes "text content blocks must be non-empty" errors.

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

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

* revert: remove legacy OpenAIApiClient fix (legacy is deprecated)

The legacy aiCore code is no longer used. Only the fix in the new aiCore
architecture (StreamEventManager.ts) is needed.

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

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 10:46:13 +08:00
LiuVaayne
6df60a69c3
⬆️ chore(deps): upgrade @anthropic-ai/claude-agent-sdk to 0.1.62 (#11824)
Upgrade from 0.1.53 to 0.1.62 and recreate the spawn->fork patch
for proper IPC communication in Electron.
2025-12-10 23:42:04 +08:00
Phantom
058a2c763b
fix: restore API version control with trailing # delimiter (addresses #11750) (#11773)
* feat(utils): add isWithTrailingSharp URL helper function

Add new utility function to check if URLs end with trailing '#' character
Includes comprehensive test cases covering various URL patterns and edge cases

* fix(api): check whether to auto append api version or not when formatting api host

- extract api version to variable in GeminiAPIClient for consistency
- simplify getBaseURL in OpenAIBaseClient by removing formatApiHost
- modify provider api host formatting to respect trailing #
- add tests for url parsing with trailing # characters

* fix: update provider config tests for new isWithTrailingSharp function

- Add isWithTrailingSharp to vi.mock in providerConfig tests
- Update test expectations to match new formatApiHost calling behavior
- All tests now pass with the new trailing # delimiter functionality

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

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

* fix(anthropic): prevent duplicate api version in base url

The Anthropic SDK automatically appends /v1 to endpoints, so we need to avoid duplication by removing the version from baseURL and explicitly setting the path in listModels

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-10 13:42:15 +08:00
kangfenmao
7507443d8b Revert "chore: remove unused icon files and related script from package.json"
This reverts commit 8ede7b197f.
2025-12-09 17:40:25 +08:00
kangfenmao
8ede7b197f chore: remove unused icon files and related script from package.json
Deleted multiple icon files from the build/icons directory and removed the generate:icons script from package.json as they are no longer needed.
2025-12-09 14:06:48 +08:00
Phantom
086190228a
fix(aiCore): correct provider adaptation with model parameter (#11758)
Ensure the model parameter is properly passed to adaptProvider when provider is specified
2025-12-09 10:42:18 +08:00
Phantom
adbadf5da6
fix(models): include model name as fallback for id field (#11760)
Add model's name as an additional fallback option when determining the id field in adaptSdkModel to handle cases where neither id nor modelId is available
2025-12-09 10:35:39 +08:00
SuYao
73fc74d875
fix: add support for OpenRouter embeddings in listModels method (#11774)
* feat: add support for OpenRouter embeddings in listModels method

* fix: broken url

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: format

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 10:29:35 +08:00
fullex
bc00c11a00
fix(windows): add manual window resize for SelectionAction window (#11766)
Implement custom window resize functionality for the SelectionAction window
on Windows only. This is a workaround for an Electron bug where native
window resize doesn't work with frame: false + transparent: true.

- Add IPC channel and API for window resize
- Implement resize handler in SelectionService
- Add 8 resize handles (4 edges + 4 corners) in SelectionActionApp
- Only enable on Windows, other platforms use native resize

Bug reference: https://github.com/electron/electron/issues/42738
All workaround code is documented and can be removed once the bug is fixed.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-09 09:03:35 +08:00
kangfenmao
f8c33db450 fix: run typecheck sequentially to avoid tsgo GC crash on Windows
Some checks failed
Stale Issue Management / stale (push) Has been cancelled
Replace concurrently with sequential execution to prevent Go runtime
GC worker crashes when running tsgo in parallel on Windows.
2025-12-08 15:36:19 +08:00
kangfenmao
61c171dafc refactor: update GitHub Actions workflow for app-upgrade-config
- Renamed job from 'propose-update' to 'update-config' for clarity.
- Replaced pull request creation step with direct commit and push to streamline the update process.
- Configured Git user for automated commits to improve workflow reliability.
2025-12-08 13:34:42 +08:00
kangfenmao
e1e6702425 chore: release v1.7.2
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 13:17:06 +08:00
kangfenmao
e6003463ac feat: enhance update dialog functionality and state management
- Added ability to ignore updates in the UpdateDialogPopup, updating the state accordingly.
- Updated UpdateAppButton to conditionally render based on the ignore state.
- Refactored runtime state to include an ignore flag for better update management.
- Minor UI adjustments in UpdateAppButton for improved user experience.
2025-12-08 13:06:32 +08:00
SagoLu
0cc4c96bc0
fix: Quick Assistant cannot register shortcuts leading to inability to call out #11071(#11071)
* 修复快捷助手无法呼出的问题

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-08 11:43:45 +08:00
Phantom
d35434b6d6
feat: improve ImageViewer context menu UX (#11547)
- Reorder menu items to prioritize "Copy as Image" as the first action
- Rename "Copy" to "Copy Image Source" for better clarity
- Remove unused ImageIcon import
- Add i18n support for "preview.copy.src" across all locales

This change improves the user experience by making the most common
action (copy image) the first option in the context menu, while also
clarifying what each copy action does.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-08 11:38:19 +08:00