* feat: add support for Xiaomi MiMo model
- Implemented support for the MiMo model in reasoning logic.
- Added MiMo model configuration in default models.
- Included MiMo logos for both models and providers.
- Updated provider configurations to include Xiaomi MiMo.
- Enhanced reasoning effort and options to accommodate MiMo.
- Added migration logic for state management to include MiMo.
- Updated versioning in store to reflect changes.
* chore(i18n): add specific provider name
* fix(provider): add xiaomi mimo anthropic apihost
* chore: url
* fix: add tool use capability
* ✨ feat(mcp): add Nowledge Mem builtin MCP server
Add @cherry/nowLedgeMem as a new builtin MCP server that connects
to local Nowledge Mem service via HTTP at 127.0.0.1:14242/mcp.
- Add nowLedgeMem to BuiltinMCPServerNames type definitions
- Add HTTP transport handling in MCPService with APP header
- Add server config to builtinMCPServers array
- Add i18n translations (en-us, zh-cn, zh-tw)
* Fix Nowledge Mem server name typos across codebase
* 🌐 i18n: add missing translations for Nowledge Mem and Git Bash settings
Translate [to be translated] markers across 8 locale files:
- zh-tw, de-de, fr-fr, es-es, pt-pt, ru-ru: nowledgeMem description
- fr-fr, es-es, pt-pt, ru-ru, el-gr, ja-jp: xhigh reasoning chain option
- el-gr, ja-jp: Git Bash configuration strings
* 🐛 fix: address PR review comments for Nowledge Mem MCP
- Fix log message typo: use server.name instead of hardcoded "NowLedgeMem"
- Rename i18n key from "nowledgeMem" to "nowledge_mem" for consistency
- Update descriptions to warn about external dependency requirement
* refactor: improve budget calculation logic
* Update src/renderer/src/aiCore/utils/__tests__/reasoning.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/renderer/src/aiCore/utils/__tests__/reasoning.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [WIP] Address feedback on budget calculation logic refactor (#11974)
* Initial plan
* fix: revert budget calculation to linear interpolation formula
Reverted the budget calculation in getAnthropicThinkingBudget from
`tokenLimit.max * effortRatio` back to the original linear interpolation
formula `(tokenLimit.max - tokenLimit.min) * effortRatio + tokenLimit.min`.
The new formula was causing lower budgets for all effort ratios (e.g.,
LOW effort changed from 2609 to 1638 tokens, a 37% reduction). The linear
interpolation formula ensures budgets range from min (at effortRatio=0) to
max (at effortRatio=1), matching the behavior in other parts of the codebase
(lines 221, 597).
Updated tests to reflect the correct expected values with the linear
interpolation formula.
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>
* fix(test): reasoning
* fix: test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* feat(reasoning): add default reasoning effort option and update i18n
Add 'default' reasoning effort option to all reasoning models to represent no additional configuration. Update translations for new option and modify reasoning logic to handle default case. Also update store version and migration for new reasoning_effort field.
Update test cases and reasoning configuration to include default option. Add new lightbulb question icon for default reasoning state.
* fix(ThinkingButton): correct isThinkingEnabled condition to exclude 'default'
The condition now properly disables thinking when effort is 'default' to match intended behavior. Click thinking button will not switch reasoning effort to 'none'.
* refactor(types): improve reasoning_effort_cache documentation
Update comments to clarify the purpose and future direction of reasoning_effort_cache
Remove TODO and replace with FIXME suggesting external cache service
* feat(i18n): add reasoning effort descriptions and update thinking button logic
add descriptions for reasoning effort options in multiple languages
move reasoning effort label maps to component for better maintainability
* fix(aiCore): handle default reasoning_effort value consistently across providers
Ensure consistent behavior when reasoning_effort is 'default' or undefined by returning empty object
* test(reasoning): fix failing tests after 'default' option introduction
Fixed two test cases that were failing after the introduction of the 'default'
reasoning effort option:
1. getAnthropicReasoningParams test: Updated to explicitly set reasoning_effort
to 'none' instead of empty settings, as undefined/empty now represents
'default' behavior (no configuration override)
2. getGeminiReasoningParams test: Similarly updated to set reasoning_effort
to 'none' for the disabled thinking test case
This aligns with the new semantic where:
- undefined/'default' = use model's default behavior (returns {})
- 'none' = explicitly disable reasoning (returns disabled config)
* feat: auto-discover and persist Git Bash path on Windows
- Add autoDiscoverGitBash function to find and cache Git Bash path when needed
- Modify System_CheckGitBash IPC handler to auto-discover and persist path
- Update Claude Code service with fallback auto-discovery mechanism
- Git Bash path is now cached after first discovery, improving UX for Windows users
* udpate
* fix: remove redundant validation of auto-discovered Git Bash path
The autoDiscoverGitBash function already returns a validated path, so calling validateGitBashPath again is unnecessary.
Co-Authored-By: Claude <noreply@anthropic.com>
* udpate
* test: add unit tests for autoDiscoverGitBash function
Add comprehensive test coverage for autoDiscoverGitBash including:
- Discovery with no existing config path
- Validation of existing config paths
- Handling of invalid existing paths
- Config persistence verification
- Real-world scenarios (standard Git, portable Git, user-configured paths)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove unnecessary async keyword from System_CheckGitBash handler
The handler doesn't use await since autoDiscoverGitBash is synchronous.
Removes async for consistency with other IPC handlers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: rename misleading test to match actual behavior
Renamed "should not call configManager.set multiple times on single discovery"
to "should persist on each discovery when config remains undefined" to
accurately describe that each call to autoDiscoverGitBash persists when
the config mock returns undefined.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: use generic type parameter instead of type assertion
Replace `as string | undefined` with `get<string | undefined>()` for
better type safety when retrieving GitBashPath from config.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: simplify Git Bash path resolution in Claude Code service
Remove redundant validateGitBashPath call since autoDiscoverGitBash
already handles validation of configured paths before attempting
discovery. Also remove unused ConfigKeys and configManager imports.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: attempt auto-discovery when configured Git Bash path is invalid
Previously, if a user had an invalid configured path (e.g., Git was
moved or uninstalled), autoDiscoverGitBash would return null without
attempting to find a valid installation. Now it logs a warning and
attempts auto-discovery, providing a better user experience by
automatically fixing invalid configurations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: ensure CLAUDE_CODE_GIT_BASH_PATH env var takes precedence over config
Previously, if a valid config path existed, the environment variable
CLAUDE_CODE_GIT_BASH_PATH was never checked. Now the precedence order is:
1. CLAUDE_CODE_GIT_BASH_PATH env var (highest - runtime override)
2. Configured path from settings
3. Auto-discovery via findGitBash
This allows users to temporarily override the configured path without
modifying their persistent settings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: improve code quality and test robustness
- Remove duplicate logging in Claude Code service (autoDiscoverGitBash logs internally)
- Simplify Git Bash path initialization with ternary expression
- Add afterEach cleanup to restore original env vars in tests
- Extract mockExistingPaths helper to reduce test code duplication
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: track Git Bash path source to distinguish manual vs auto-discovered
- Add GitBashPathSource type and GitBashPathInfo interface to shared constants
- Add GitBashPathSource config key to persist path origin ('manual' | 'auto')
- Update autoDiscoverGitBash to mark discovered paths as 'auto'
- Update setGitBashPath IPC to mark user-set paths as 'manual'
- Add getGitBashPathInfo API to retrieve path with source info
- Update AgentModal UI to show different text based on source:
- Manual: "Using custom path" with clear button
- Auto: "Auto-discovered" without clear button
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: simplify Git Bash config UI as form field
- Replace large Alert components with compact form field
- Use static isWin constant instead of async platform detection
- Show Git Bash field only on Windows with auto-fill support
- Disable save button when Git Bash path is missing on Windows
- Add "Auto-discovered" hint for auto-detected paths
- Remove hasGitBash state, simplify checkGitBash logic
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ui: add explicit select button for Git Bash path
Replace click-on-input interaction with a dedicated "Select" button
for clearer UX
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: simplify Git Bash UI by removing clear button
- Remove handleClearGitBash function (no longer needed)
- Remove clear button from UI (auto-discover fills value, user can re-select)
- Remove auto-discovered hint (SourceHint)
- Remove unused SourceHint styled component
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add reset button to restore auto-discovered Git Bash path
- Add handleResetGitBash to clear manual setting and re-run auto-discovery
- Show "Reset" button only when source is 'manual'
- Show "Auto-discovered" hint when path was found automatically
- User can re-select if auto-discovered path is not suitable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: re-run auto-discovery when resetting Git Bash path
When setGitBashPath(null) is called (reset), now automatically
re-runs autoDiscoverGitBash() to restore the auto-discovered path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(i18n): add Git Bash config translations
Add translations for:
- autoDiscoveredHint: hint text for auto-discovered paths
- placeholder: input placeholder for bash.exe selection
- tooltip: help tooltip text
- error.required: validation error message
Supported languages: en-US, zh-CN, zh-TW
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update i18n
* fix: auto-discover Git Bash when getting path info
When getGitBashPathInfo() is called and no path is configured,
automatically trigger autoDiscoverGitBash() first. This handles
the upgrade scenario from old versions that don't have Git Bash
path configured.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor: rewrite filesystem MCP server with new tool set
- Replace existing filesystem MCP with modular architecture
- Implement 6 new tools: glob, ls, grep, read, write, delete
- Add comprehensive TypeScript types and Zod schemas
- Maintain security with path validation and allowed directories
- Improve error handling and user feedback
- Add result limits for performance (100 files/matches max)
- Format output with clear, helpful messages
- Keep backward compatibility with existing import patterns
BREAKING CHANGE: Tools renamed from snake_case to lowercase
- read_file → read
- write_file → write
- list_directory → ls
- search_files → glob
- New tools: grep, delete
- Removed: edit_file, create_directory, directory_tree, move_file, get_file_info
* 🐛 fix: remove filesystem allowed directories restriction
* 🐛 fix: relax binary detection for text files
* ✨ feat: add edit tool with fuzzy matching to filesystem MCP server
- Add edit tool with 9 fallback replacers from opencode for robust
string replacement (SimpleReplacer, LineTrimmedReplacer,
BlockAnchorReplacer, WhitespaceNormalizedReplacer, etc.)
- Add Levenshtein distance algorithm for similarity matching
- Improve descriptions for all tools (read, write, glob, grep, ls, delete)
following opencode patterns for better LLM guidance
- Register edit tool in server and export from tools index
* ♻️ refactor: replace allowedDirectories with baseDir in filesystem MCP server
- Change server to use single baseDir (from WORKSPACE_ROOT env or userData/workspace default)
- Remove list_allowed_directories tool as restriction mechanism is removed
- Add ripgrep integration for faster grep searches with JS fallback
- Simplify validatePath() by removing allowlist checks
- Display paths relative to baseDir in tool outputs
* 📝 docs: standardize filesystem MCP server tool descriptions
- Unify description format to bullet-point style across all tools
- Add absolute path requirement to ls, glob, grep schemas and descriptions
- Update glob and grep to output absolute paths instead of relative paths
- Add missing error case documentation for edit tool (old_string === new_string)
- Standardize optional path parameter descriptions
* ♻️ refactor: use ripgrep for glob tool and extract shared utilities
- Extract shared ripgrep utilities (runRipgrep, getRipgrepAddonPath) to types.ts
- Rewrite glob tool to use `rg --files --glob` for reliable file matching
- Update grep tool to import shared ripgrep utilities
* 🐛 fix: handle ripgrep exit code 2 with valid results in glob tool
- Process ripgrep stdout when content exists, regardless of exit code
- Exit code 2 can indicate partial errors while still returning valid results
- Remove fallback directory listing (had buggy regex for root-level files)
- Update tool description to clarify patterns without "/" match at any depth
* 🔥 chore: remove filesystem.ts.backup file
Remove unnecessary backup file from mcpServers directory
* 🐛 fix: use correct default workspace path in filesystem MCP server
Change default baseDir from userData/workspace to userData/Data/Workspace
to match the app's data storage convention (Data/Files, Data/Notes, etc.)
Addresses PR #11937 review feedback.
* 🐛 fix: pass WORKSPACE_ROOT to FileSystemServer constructor
The envs object passed to createInMemoryMCPServer was not being used
for the filesystem server. Now WORKSPACE_ROOT is passed as a constructor
parameter, following the same pattern as other MCP servers.
* \feat: add link to documentation for MCP server configuration requirement
Wrap the configuration requirement tag in a link to the documentation for better user guidance on MCP server settings.
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Change the default knowledge base retrieval behavior from tool call to prompt injection mode.
This provides faster response times when knowledge base search is forced.
Intent recognition mode (tool call) is still available as an opt-in option.
- Remove toolChoiceMiddleware for forced knowledge base search
- Add prompt injection for knowledge base references in KnowledgeService
- Move transformMessagesAndFetch to ApiService, delete OrchestrateService
- Export getMessageContent from searchOrchestrationPlugin
- Add setCitationBlockId callback to citationCallbacks
- Default knowledgeRecognition to 'off' (prompt mode)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat(assistants): merge import and subscribe popups, add export to manage
- Merge import and subscribe buttons into single unified popup
- Add export functionality to manage assistant presets
- Change delete mode to manage mode with both export and delete options
- Show import count in success message
- Default to manage mode when opening manage popup
- Fix unsubscribe button to clear URL properly
- Fix file import not working issue
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(topics): add topic manage mode for batch operations
- Add topic manage mode with batch delete and move operations
- Implement search functionality within manage mode with keyword matching
- Create reusable AssistantAvatar component for consistent icon display
- Add assistant icons to move-to dropdown menus
- Include selection badge with clear selection tooltip
- Add delete confirmation dialog with danger button styling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor(TopicManageMode): convert styled components to Tailwind CSS
- Replace styled-components with Tailwind CSS for ManagePanel, ManagePanelContent, ManageIconButton, and other UI elements.
- Update button styling to use Tailwind classes for improved consistency and maintainability.
- Enhance component structure with functional components and props for better reusability.
* style(Topics): update HeaderIconButton dimensions and border radius
- Increased dimensions of HeaderIconButton from 28px to 32px for improved visibility.
- Updated border radius to use a CSS variable for consistency with other UI elements.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Incremented the version number in the persisted reducer from 185 to 186.
- Added migration logic for version 186 to handle API server settings and OpenAI configuration updates, ensuring compatibility with existing user settings.
This change prepares the application for the new migration requirements and maintains backward compatibility.
* feat: add tool use mode setting to default assistant settings
- Add toolUseMode selector (prompt/function) to DefaultAssistantSettings
- Add dividers between model parameter sections for better UI
- Reduce slider margins for compact layout
- Add migration (v185) to reset toolUseMode to 'function' for existing users
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: reset toolUseMode for all assistants during migration
- Update migration logic to reset toolUseMode to 'function' for all assistants with a 'prompt' setting.
- Ensure compatibility with function calling models by checking model type before resetting.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Simplifies and centralizes header construction by merging defaultAppHeaders and extra_headers, and sets X-Api-Key for OpenAI providers. Removes redundant header assignment logic for improved maintainability.
* refactor: rename i18n commands for better consistency
- Rename `check:i18n` to `i18n:check`
- Rename `sync:i18n` to `i18n:sync`
- Rename `update:i18n` to `i18n:translate` (clearer purpose)
- Rename `auto:i18n` to `i18n:all` (runs check, sync, and translate)
- Update lint script to use new `i18n:check` command name
This follows the common naming convention of grouping related commands
under a namespace prefix (e.g., `test:main`, `test:renderer`).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: update i18n command names and improve documentation
- Renamed i18n commands for consistency: `sync:i18n` to `i18n:sync`, `check:i18n` to `i18n:check`, and `auto:i18n` to `i18n:translate`.
- Updated relevant documentation and scripts to reflect new command names.
- Improved formatting and clarity in i18n-related guides and scripts.
This change enhances the clarity and usability of i18n commands across the project.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* ✨ feat: add CDP browser MCP server
* ♻️ refactor: add navigation timeout for browser cdp
* 🐛 fix: reuse window for execute and add debugger logging
* ✨ feat: add show option and multiline execute for browser cdp
* ✨ feat: support multiple sessions for browser cdp
* ♻️ refactor: add LRU and idle cleanup for browser cdp sessions
* Refactor browser-cdp for readability and set Firefox UA
* 🐛 fix: type electron mock for cdp tests
* ♻️ refactor: rename browser_cdp MCP server to browser
Simplify the MCP server name from @cherry/browser-cdp to just browser
for cleaner tool naming in the MCP protocol.
* ✨ feat: add fetch tool to browser MCP server
Add a new `fetch` tool that uses the CDP-controlled browser to fetch URLs
and return content in various formats (html, txt, markdown, json).
Also ignore .conductor folder in biome and eslint configs.
* ♻️ refactor: split browser MCP server into modular folder structure
Reorganize browser.ts (525 lines) into browser/ folder with separate
files for better maintainability. Each tool now has its own file with
schema, definition, and handler.
* ♻️ refactor: use switch statement in browser server request handler
* ♻️ refactor: extract helpers and use handler registry pattern
- Add successResponse/errorResponse helpers in tools/utils.ts
- Add closeWindow helper to consolidate window cleanup logic
- Add ensureDebuggerAttached helper to consolidate debugger setup
- Add toolHandlers map for registry-based handler lookup
- Simplify server.ts to use dynamic handler dispatch
* 🐛 fix: improve browser MCP server robustness
- Add try-catch for JSON.parse in fetch() to handle invalid JSON gracefully
- Add Zod schema validation to reset tool for consistency with other tools
- Fix memory leak in open() by ensuring event listeners cleanup on timeout
- Add JSDoc comments for key methods and classes
* ♻️ refactor: rename browser MCP to @cherry/browser
Follow naming convention of other builtin MCP servers.
* 🌐 i18n: translate pending strings across 8 locales
Translate all "[to be translated]" markers including:
- CDP browser MCP server description (all 8 locales)
- "Extra High" reasoning chain length option (6 locales)
- Git Bash configuration strings (el-gr, ja-jp)
* ✨ feat: add ExaMCP free web search provider
Add a new web search provider that uses Exa's free MCP API endpoint,
requiring no API key. This provides users with a free alternative
to the existing Exa provider.
- Add 'exa-mcp' to WebSearchProviderIds
- Create ExaMcpProvider using JSON-RPC/SSE protocol
- Add provider config and migration for existing users
- Use same Exa logo in settings UI
* Add robust text chunk parser for ExaMcpProvider results
* feat(translate): add reasoning effort option to translate service
Add support for configuring reasoning effort level in translation requests. This allows better control over the translation quality and processing time based on model capabilities.
* test: add comprehensive tests for getModelSupportedReasoningEffort
* test(reasoning): update model test cases and comments
- Remove test case for 'gpt-4o-deep-research' as it needs to be an actual OpenAI model
- Add provider requirement comment for Grok 4 Fast recognition
- Simplify array assertions in test cases
- Add comment about Qwen models working well for name-based fallback
* docs(reasoning): add detailed jsdoc for getModelSupportedReasoningEffort
* refactor(openai): replace getThinkModelType with getModelSupportedReasoningEffort
Simplify reasoning effort validation by using getModelSupportedReasoningEffort
* refactor(models): rename getModelSupportedReasoningEffort to getModelSupportedReasoningEffortOptions
Update function name and all related references to better reflect its purpose of returning reasoning effort options
* fix(code-viewer): copy selected code without line numbers
* fix(context-menu): strip line numbers from code selection
* style(codeviewer): fix format
* fix: preserve indentation and format when copying mixed content (text + code blocks)
- Replace regex-based extraction with DOM structure-based approach
- Remove line number elements while preserving all other content
- Use TreeWalker to handle mixed content (text paragraphs + code blocks)
- Preserve indentation and newlines in code blocks
- Simplify CodeViewer.tsx by removing duplicate context menu logic
Fixes#11790
* style: remove unused comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor: optimize TreeWalker performance
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- 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.
- 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.
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.
* 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.