Commit Graph

5475 Commits

Author SHA1 Message Date
MyPrototypeWhat
eec9048c11 fix(tabs): update tab closing logic to handle dormant tabs
- Modified the `closeTab` function in the `useTabs` hook to reactivate dormant tabs when closed.
- Ensured that dormant tabs are marked as active and their state is updated upon reactivation, improving tab management and user experience.

These changes enhance the functionality of tab closing, providing a smoother interaction with dormant tabs.
2025-12-12 15:34:08 +08:00
MyPrototypeWhat
bcbd5ed717 refactor(tabs): enhance URL handling and default title logic
- Updated `AppShell` and `TabRouter` components to improve URL synchronization with tab states, ensuring full URLs (including search/hash) are correctly managed.
- Enhanced `getDefaultRouteTitle` utility to handle full URLs for better title mapping, improving internationalization support.
- Refactored `useTabs` to retain complete URLs in tab management, optimizing tab state tracking.

These changes enhance the application's navigation and tab management, providing a more consistent user experience.
2025-12-12 15:04:01 +08:00
MyPrototypeWhat
4f7a14b044 feat(tabs): implement LRU management and tab hibernation features
- Introduced `TabLRUManager` to manage tab hibernation based on usage patterns, enhancing memory efficiency.
- Added `isDormant` and `savedState` properties to the `Tab` interface for tracking tab states during hibernation.
- Updated `useTabs` hook to include methods for hibernating and waking tabs, along with pinning functionality to exempt tabs from LRU management.
- Enhanced `AppShell` to only render non-dormant tabs, improving user experience by focusing on active content.
- Implemented logging for tab state changes to facilitate debugging and monitoring of tab behavior.

These changes significantly improve the application's performance and user experience by optimizing tab management and memory usage.
2025-12-11 17:50:50 +08:00
MyPrototypeWhat
ec3c9db9ff
Merge branch 'v2' into feat/router-design 2025-12-10 11:35:45 +08:00
MyPrototypeWhat
7dc377d467 refactor(tabs): move Tab and TabsState types to cacheValueTypes
- Moved Tab and TabsState type definitions from cacheSchemas.ts to cacheValueTypes.ts for better organization and clarity.
- Updated imports in related components to reflect the new location of these types.
- Removed the now redundant tab type definitions from cacheSchemas.ts.

These changes enhance the structure of type definitions, promoting a clearer separation of concerns within the codebase.
2025-12-10 11:33:33 +08:00
fullex
d5d30d3b9c feat: add SWR mutate function for optimistic updates in useQuery
- 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.
2025-12-09 21:25:15 +08:00
fullex
5415f43052 feat: refactor cache management and remove deprecated runtime hooks
- 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.
2025-12-09 20:00:19 +08:00
MyPrototypeWhat
544e716587 feat(tabs): implement default route titles for new tabs and navigation updates
- Introduced `getDefaultRouteTitle` utility to provide translated titles for various routes.
- Updated tab creation and navigation logic in `AppShell`, `Sidebar`, and `useTabs` to utilize the new title mapping.
- Enhanced internationalization support by adding new keys for default tab titles in multiple language files.

These changes improve the user experience by ensuring that tabs display meaningful titles based on their content, enhancing navigation clarity.
2025-12-09 19:41:13 +08:00
MyPrototypeWhat
283101ef8a
Merge branch 'v2' into feat/router-design 2025-12-09 17:30:59 +08:00
MyPrototypeWhat
ab685908a4 chore(dependencies): remove react-router and react-router-dom from package.json and yarn.lock
- Deleted react-router and react-router-dom dependencies as part of the migration to TanStack Router.
- Updated yarn.lock to reflect the removal of these packages, streamlining the dependency tree.

These changes help maintain a cleaner project structure following the recent routing enhancements.
2025-12-09 17:30:21 +08:00
MyPrototypeWhat
b9a56fcec1 feat(navigation): migrate to TanStack Router and enhance navigation structure
- Replaced react-router with TanStack Router for improved routing capabilities.
- Updated navigation logic across various components to utilize the new navigation API.
- Refactored App.tsx to integrate AppShell as the main routing component, removing the deprecated Router.
- Enhanced navigation methods to support search parameters, improving URL handling for settings and provider navigation.

These changes streamline the routing architecture, enhancing the overall user experience and maintainability of the application.
2025-12-09 17:30:04 +08:00
MyPrototypeWhat
5ad5bd537b feat(routes): add new routes for chat, code, files, knowledge, notes, store, translate, and paintings
- Introduced new route files for chat, code, files, knowledge, notes, store, translate, and paintings, each linking to their respective components.
- Updated the main index route to use LaunchpadPage instead of the previous Index component.
- Added settings routes for various configuration options, enhancing the application's routing structure.

These changes expand the application's routing capabilities, improving navigation and user experience.
2025-12-09 17:29:45 +08:00
fullex
1139d8d57a feat: enhance cache service with casual methods and update related components
- 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.
2025-12-09 13:02:39 +08:00
fullex
361aa87838 refactor: update state management in UpdateDialogPopup and related components
- 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.
2025-12-09 11:08:53 +08:00
fullex
74ca4443d6 Merge branch 'main' into v2 2025-12-09 10:45: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
MyPrototypeWhat
e5239f4623 feat: enhance AppShell and TabRouter with new tab functionality
- Updated AppShell to include a button for adding new tabs, defaulting to the home page.
- Refactored Sidebar component to remove navigation logic, simplifying its role.
- Improved TabRouter to handle external URL changes when tabs are updated, ensuring consistent navigation behavior.

These changes improve user experience by streamlining tab management and navigation within the application.
2025-12-08 19:39:06 +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
defi-failure
ef5b97813c
fix: add explicit thinking token support for gemini-3-pro-image (#11744) 2025-12-08 11:31:05 +08:00
jo1yne06
4c4f832bc7
feat: update AiOnly default models (#11745)
Co-authored-by: fengjunhao <765838796@qq.com>
2025-12-08 11:29:48 +08:00
Phantom
9f7e47304d
refactor: improve temperature and top_p parameter handling (#11663)
* refactor(model-params): split temperature and top_p support checks into separate functions

Replace deprecated isNotSupportTemperatureAndTopP with isSupportTemperatureModel and isSupportTopPModel
Add comprehensive tests for new model parameter support functions

* refactor(model-parameters): improve temperature and topP parameter handling

- Add fallback to DEFAULT_ASSISTANT_SETTINGS when enableTemperature/enableTopP is undefined
- Simplify conditional logic in parameter validation
- Update documentation to better explain parameter selection rules

* refactor(models): remove deprecated isNotSupportTemperatureAndTopP function

The function was marked as deprecated and its usage has been replaced by isSupportTemperatureModel and isSupportTopPModel. Also removed corresponding test cases.

* feat(models): add mutual exclusivity check for temperature and top_p

Add new utility function to enforce mutual exclusivity between temperature and top_p parameters for Claude 4.5 reasoning models. Update model parameter preparation logic to use this new check and add corresponding tests.
2025-12-08 11:26:44 +08:00
Xiang, Haihao
1a737f5137
fix: sync Upload UI with editImageFiles in NewApiPage (#11653)
Resolved issue where Upload component UI was not synchronized with
editImageFiles state in NewApiPage. Switched to controlled fileList and
handled file removal via onRemove to ensure consistent UI updates.
2025-12-08 11:09:18 +08:00
dependabot[bot]
82ec18c0fb
ci(deps): bump actions/checkout from 4 to 6 (#11595)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-08 11:05:02 +08:00
dependabot[bot]
0cabdefb9a
ci(deps): bump actions/github-script from 7 to 8 (#11596)
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-08 11:04:26 +08:00
Phantom
224ab6a69b
feat(models): update AI model configurations to latest versions (#11735)
- Update Claude models to 4.5 series
- Replace GPT-4.5 with GPT-5 series
- Upgrade Gemini models to 2.5/3.0 versions
- Consolidate DeepSeek and Qwen models
- Remove deprecated model versions
2025-12-08 11:00:11 +08:00
Phantom
bba7ecae6e
feat(agent): add tooltip for model selection and improve i18n (#11738)
* refactor(settings): rename actions prop to contentAfter for clarity

The prop name 'actions' was misleading as it could imply functionality rather than layout. 'contentAfter' better describes its purpose of displaying content after the title.

* feat(agent): add tooltip for model selection in agent settings

Add tooltip to explain that only Anthropic endpoint models are supported for agents

* feat(i18n): add model tooltip and translate upload strings

Add tooltip message about Anthropic endpoint model requirement for Agent feature
Translate previously untranslated upload-related strings in multiple languages
2025-12-08 10:58:56 +08:00
Phantom
516b8479d6
style: update gemini logo images (#11731)
* style: update gemini logo images and fix model logo condition

Update the Gemini logo images in both apps and models directories
Remove or fix the always-true isLight condition in getModelLogoById

* style: downsample gemini icon

* style(minapp): Add bordered property for gemini minapp

Add FIXME comment to indicate 'bodered' should be 'bordered' and update config to use correct property
2025-12-07 21:04:40 +08:00
chenxue
b58a2fce03
feat(aihubmix): fix website domain (#11734)
fix domain
2025-12-07 21:03:19 +08:00
beyondkmp
ebfc60b039
fix(windows): improve Git Bash detection for portable installations (#11671)
* fix(windows): improve Git Bash detection for portable installations

Enhance Git Bash detection on Windows to support portable Git installations
and custom installation paths. The previous implementation only checked fixed
paths and failed to detect Git when installed to custom locations or added
to PATH manually.

Key improvements:
- Use where.exe to find git.exe in PATH and derive bash.exe location
- Support CHERRY_STUDIO_GIT_BASH_PATH environment variable override
- Add security check to skip executables in current directory
- Implement three-tier fallback strategy (env var -> git derivation -> common paths)
- Add detailed logging for troubleshooting

This fixes the issue where users with portable Git installations could run
git.exe from command line but the app failed to detect Git Bash.

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

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

* fix(windows): improve Git Bash detection for portable installations

Enhance Git Bash detection on Windows to support portable Git installations
and custom installation paths. The previous implementation only checked fixed
paths and failed to detect Git when installed to custom locations or added
to PATH manually.

Key improvements:
- Move findExecutable and findGitBash to utils/process.ts for better code organization
- Use where.exe to find git.exe in PATH and derive bash.exe location
- Add security check to skip executables in current directory
- Implement two-tier fallback strategy (git derivation -> common paths)
- Add detailed logging for troubleshooting
- Remove environment variable override to simplify implementation

This fixes the issue where users with portable Git installations could run
git.exe from command line but the app failed to detect Git Bash.

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

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

* fix(windows): improve Git Bash detection for portable installations

Enhance Git Bash detection on Windows to support portable Git installations
and custom installation paths. The previous implementation only checked fixed
paths and failed to detect Git when installed to custom locations or added
to PATH manually.

Key improvements:
- Move findExecutable and findGitBash to utils/process.ts for better code organization
- Use where.exe to find git.exe in PATH and derive bash.exe location
- Add security check to skip executables in current directory
- Implement two-tier fallback strategy (git derivation -> common paths)
- Add detailed logging for troubleshooting
- Remove environment variable override to simplify implementation

This fixes the issue where users with portable Git installations could run
git.exe from command line but the app failed to detect Git Bash.

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

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

* update iswin

* test: add comprehensive test coverage for findExecutable and findGitBash

Add 33 test cases covering:
- Git found in common paths (Program Files, Program Files (x86))
- Git found via where.exe in PATH
- Windows/Unix line ending handling (CRLF/LF)
- Whitespace trimming from where.exe output
- Security checks to skip executables in current directory
- Multiple Git installation structures (Standard, Portable, MSYS2)
- Bash.exe path derivation from git.exe location
- Common paths fallback when git.exe not found
- LOCALAPPDATA environment variable handling
- Priority order (derivation over common paths)
- Error scenarios (Git not installed, bash.exe missing)
- Real-world scenarios (official installer, portable, Scoop)

All tests pass with proper mocking of fs, path, and child_process modules.

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

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

* refactor: clarify path navigation comments in findGitBash

Replace confusing arrow notation showing intermediate directories with
clearer descriptions of the navigation intent:
- "navigate up 2 levels" instead of showing "-> Git/cmd -> Git ->"
- "bash.exe in same directory" for portable installations
- Emphasizes the intent rather than the intermediate steps

Makes the code more maintainable by clearly stating what each path
pattern is checking for.

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

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

* test: skip process utility tests on non-Windows platforms

Use describe.skipIf to skip all tests when not on Windows since
findExecutable and findGitBash have platform guards that return null
on non-Windows systems. Remove redundant platform mocking in nested
describe blocks since the entire suite is already Windows-only.

This fixes test failures on macOS and Linux where all 33 tests were
failing because the functions correctly return null on those platforms.

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

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

* format

* fix: improve Git Bash detection error handling and logging

- Add try-catch wrapper in IPC handler to handle unexpected errors
- Fix inaccurate comment: usr/bin/bash.exe is for MSYS2, not Git 2.x
- Change log level from INFO to DEBUG for internal "not found" message
- Keep WARN level only in IPC handler for user-facing message

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-07 16:42:00 +08:00
Phantom
8f39ecf762
fix(models): update assistant default model when editing model capabilities (#11732)
* fix(ProviderSettings): update assistant default model when model changes

Ensure assistant's default model is updated when the underlying model is modified to maintain consistency

* refactor(EditModelPopup): simplify assistant model update logic

Replace manual model updates with a single map operation to update both model and defaultModel fields. This makes the code more concise and easier to maintain.

* refactor(EditModelPopup): remove unused dispatch import and variable

* feat(EditModelPopup): add support for translate and quick model updates

Update the EditModelPopup component to handle updates for translate and quick models in addition to the default model. This ensures consistency across all model types when changes are made.
2025-12-07 14:01:11 +08:00
Copilot
8d1d09b1ec
fix: eliminate UI freeze on multi-file selection via batch processing (#11377)
* Initial plan

* fix: improve file upload performance with batch processing and progress feedback

- Add batch processing (5 files concurrently) to uploadNotes function
- Use Promise.allSettled for parallel file processing
- Add setTimeout(0) between batches to yield to event loop
- Show loading toast when uploading more than 5 files
- Add translation keys for uploading progress (en, zh-cn, zh-tw)

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

* feat: add batch upload and file watcher control functionalities

* feat: add hint node type and implement TreeNode component for notes

- Updated NotesTreeNode type to include 'hint' as a node type.
- Implemented TreeNode component to handle rendering of notes and folders, including hint nodes.
- Added drag-and-drop functionality for organizing notes.
- Created context hooks for managing notes actions, selection, editing, drag-and-drop, search, and UI state.
- Developed file upload handling for drag-and-drop and file selection.
- Enhanced menu options for notes with actions like create, rename, delete, and export.
- Integrated auto-renaming feature for notes based on content.

* clean comment

* feat: add pause and resume functionality to file watcher; enhance error handling in useInPlaceEdit hook

* fix: adjust padding in item container style for improved layout

---------

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>
2025-12-07 11:44:57 +08:00
Phantom
3cedb95db3
fix(stream-options): add user-configurable stream options for OpenAI API (#11693)
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
* refactor(types): rename OpenAISummaryText to OpenAIReasoningSummary for clarity

* refactor: move OpenAISettingsGroup to independent folder

* refactor(OpenAISettingsGroup): extract settings components into separate files

Move ReasoningSummarySetting, ServiceTierSetting and VerbositySetting into individual components to improve code organization and maintainability

* feat(stream-options): add stream options configuration for OpenAI completions

add includeUsage option to control token usage reporting in streamed responses
update provider config and settings UI to support new stream options
add migration for existing providers to set default stream options
extend toOptionValue utility to handle boolean values

* refactor(stream-options): move stream options includeUsage to settings store

- Remove streamOptions from Provider type and move includeUsage to settings.openAI
- Update migration to initialize streamOptions in settings
- Modify providerToAiSdkConfig to read includeUsage from settings
- Update StreamOptionsSetting component to use settings store

* feat(i18n): add missing translations for 'on' and stream options

Add translations for the 'on' state and stream options including token usage in multiple languages

* docs(select): update docs

* test(providerConfig): add tests for stream options includeUsage

add test cases to verify includeUsage stream option behavior for OpenAI provider

* Update src/renderer/src/i18n/translate/ru-ru.json

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

* Update src/renderer/src/pages/home/Tabs/components/OpenAISettingsGroup/VerbositySetting.tsx

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

* Update src/renderer/src/utils/select.ts

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

* test(select): add tests for toOptionValue and toRealValue functions

* fix(providerConfig): handle undefined streamOptions in openAI settings

Prevent potential runtime errors by safely accessing nested streamOptions properties

* test(providerConfig): add tests for Copilot provider includeUsage settings

* fix(OpenAISettingsGroup): handle potential undefined streamOptions in selector

* docs(aiCoreTypes): add comment for OpenAICompletionsStreamOptions

* refactor(select): improve type safety in toOptionValue function

Use Exclude to prevent string literals from overlapping with special values

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-05 19:52:37 +08:00
MyPrototypeWhat
6903665b64
Merge branch 'v2' into feat/router-design 2025-12-05 17:54:41 +08:00
MyPrototypeWhat
255be7d4d1 refactor: finalize Multi MemoryRouter architecture and add developer docs
- Fix TanStack Router path config using resolve() for absolute paths
- Add openTab API to useTabs hook for Tab-level navigation
- Remove AppRouter.tsx (merged into AppShell)
- Add developer documentation (README.md, README.zh-CN.md)
- Add settings route placeholder
- Update App.tsx with TODO comments for migration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 17:53:21 +08:00
SuYao
9d6d827f88
fix(migrate): normalize provider type for AI gateway (#11703) 2025-12-05 17:42:44 +08:00
Copilot
968210faa7
fix: correct OVMS API URL path formation (#11701)
* Initial plan

* fix: correct OVMS API URL path from '../v1/config' to 'config'

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

* fix: update OVMSClient to use formatted API URL for model listing

---------

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>
2025-12-05 17:40:29 +08:00
MyPrototypeWhat
37766d5685 feat: implement tab management with independent MemoryRouter instances
- Introduced a new TabRouter component to manage routing for each tab independently, enhancing the tab management system.
- Updated the AppShell component to utilize the new TabRouter, allowing for true KeepAlive behavior with isolated history.
- Refactored the Sidebar component for improved navigation and tab creation, now supporting internal app routes.
- Enhanced the useTabs hook to ensure at least one default tab exists, improving user experience on initial load.
- Updated cacheSchemas to reflect changes in tab types and metadata structure.

These changes significantly improve the architecture and functionality of the tab system, providing a more robust user experience.
2025-12-05 16:21:37 +08:00
Phantom
ea36b918f1
feat(translate): support document files and refactor file reading logic (#11615)
* refactor(FileStorage): extract file reading logic into reusable method

Move common file reading functionality from readFile and readExternalFile into a new private readFileCore method
Improve error logging by distinguishing between document and text file failures
Add comprehensive JSDoc documentation for all file reading methods

* feat(translate): support document files and increase size limit

Add support for document file types in translation file selection. Increase maximum file size limit to 20MB for documents while keeping text files at 5MB. Implement separate handling for document and text file reading.
2025-12-05 13:56:54 +08:00
SuYao
92bb05950d
fix: enhance provider handling and API key rotation logic in AiProvider (#11586)
* fix: enhance provider handling and API key rotation logic in AiProvider

* fix

* fix(api): enhance API key handling and logging for providers
2025-12-05 13:25:54 +08:00
fullex
1193e6fb8c Merge 'main' into v2 2025-12-05 10:54:35 +08:00
Phantom
a566cd65f4
fix: normalize provider model data (#11580)
* fix: normalize provider model data

* fix(tests): correct provider type in ModelAdapter test
2025-12-05 00:29:38 +08:00
Phantom
cd699825ed
feat(settings): add Slovak language support for spell check (#11664)
* refactor(settings): move spell check languages to constants and add type

Add Slovak language option and define SpellCheckOption type for better type safety

* fix(settings): disable spell check selector on Mac platforms

The spell check selector should not be shown on Mac platforms as it's not supported. This change adds a platform check to hide the selector when running on macOS.
2025-12-04 23:55:33 +08:00
Phantom
86a16f5762
fix(prompts): clarify language detection rules for edge cases (#11696)
* fix(prompts): clarify language detection rules for edge cases

Update LANG_DETECT_PROMPT to explicitly handle cases where the input text describes a language but is written in a different language. Add examples to illustrate the expected behavior.

* fix(prompts): correct language code mapping for Chinese input

Update the language detection prompt to properly map '英语' to 'zh-cn' instead of 'en-us' since it's a Chinese word
2025-12-04 22:55:31 +08:00
Peijie Diao
6343628739
fix(topic): clear related message_blocks when clearing topic messages (#11665)
Ensure message_blocks rows are removed when clearing a topic's messages to avoid orphaned block entries.

Signed-off-by: Do1e <i@do1e.cn>
2025-12-04 22:32:37 +08:00
Copilot
a2a6c62f48
Fix custom parameters placement for Vercel AI Gateway (#11605)
* Initial plan

* Fix custom parameters placement for Vercel AI Gateway

For AI Gateway provider, custom parameters are now placed at the body level
instead of being nested inside providerOptions.gateway. This fixes the issue
where parameters like 'tools' were being incorrectly added to
providerOptions.gateway when they should be at the same level as providerOptions.

Fixes #4197

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

* Revert "Fix custom parameters placement for Vercel AI Gateway"

This reverts commit b14e48dd78.

* fix: rename 'ai-gateway' to 'gateway' across the codebase and update related configurations

* fix: resolve PR review issues for custom parameters field

- Fix Migration 174: use string literal 'ai-gateway' instead of non-existent constant for historical compatibility
- Fix Migration 180: update model.provider references to prevent orphaned models when renaming provider ID
- Add logging in mapVertexAIGatewayModelToProviderId when unknown model type is encountered
- Replace `any` with `Record<string, unknown>` in buildAIGatewayOptions return type for better type safety
- Add gateway mapping to getAiSdkProviderId mock in options.test.ts to match production behavior

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

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

* chore: version

* fix(options): enhance custom parameters handling for proxy providers

* fix(options): add support for cherryin provider with custom parameters handling

* chore

---------

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: Claude <noreply@anthropic.com>
2025-12-04 21:19:30 +08:00