- Removed the UI typecheck script from package.json to streamline type checking.
- Updated tsconfig.web.json to include the UI package for improved type checking coverage.
- Adjusted tsconfig.web.json to maintain formatting consistency.
- Enhanced tsconfig.json in the ui package by adding strict compiler options for better code quality.
- Modified the generate-icons script to remove an unused parameter, streamlining the function call.
- Introduced multiple new SVG icons including AddCategory, AiChat, Aicon27, AiEssentialsIconSet, AiPrompt, Brain, BrainCircuit, BrainCog, CodeAi, Emoji, Group, MessageAi1, MessageBalloonAi1, and Vector.
- Updated the icons index file to include the new icons for easier access.
- Enhanced the icons component structure for better maintainability.
* 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
* 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>
* 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>
- 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.
* 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>
* 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>
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>
- 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.
* 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>
- 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.
* 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>
* 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>
* 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>
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.
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.
* 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>
* 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>
- Introduced a new `mutate` function in the `useQuery` hook to support optimistic updates.
- Updated the documentation to include examples of using `mutate` for immediate cache updates and revalidation.
- Enhanced type definitions to ensure compatibility with SWR's `KeyedMutator` for better type safety.
- Added new cache schema keys for agent management and chat active view in `cacheSchemas.ts`.
- Replaced deprecated `useRuntime` hook with `useCache` in various components to streamline state management.
- Updated components such as `useActiveAgent`, `useActiveSession`, and `useAgentSessionInitializer` to utilize the new caching strategy.
- Removed the `useRuntime` hook entirely from the codebase, enhancing performance and reducing complexity.
- Ensured consistent access to cached data across the application.
- Introduced casual methods (`getCasual`, `setCasual`, `deleteCasual`, etc.) in `CacheService` for dynamic key handling.
- Updated various components to utilize the new casual methods for improved flexibility in cache management.
- Added new cache schema keys for file and resource paths in `cacheSchemas.ts`.
- Refactored `UserPopup`, `useAppInit`, and other components to align with the new caching strategy, ensuring consistent access to cached data.
- Replaced the use of `useAppDispatch` and `setUpdateState` with `useAppUpdateState` for better state handling in `UpdateDialogPopup`.
- Updated `UpdateAppButton` to reference the new state structure.
- Changed import paths for `HelpTooltip` in `AgentModal` and `ModelSetting` to maintain consistency across components.
- Refactored API key management in `ApiService` to utilize `cacheService` instead of `window.keyv` for improved performance and reliability.
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
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>
- 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.