From ab3bce33b8154c61e2c06404e4f111a89882cd15 Mon Sep 17 00:00:00 2001 From: Shemol Date: Fri, 26 Dec 2025 17:05:45 +0800 Subject: [PATCH 01/11] docs: fix copy -> cp in development guide (#12142) Signed-off-by: SherlockShemol --- docs/en/guides/development.md | 2 +- docs/zh/guides/development.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/guides/development.md b/docs/en/guides/development.md index fe67742768..032a515f61 100644 --- a/docs/en/guides/development.md +++ b/docs/en/guides/development.md @@ -36,7 +36,7 @@ yarn install ### ENV ```bash -copy .env.example .env +cp .env.example .env ``` ### Start diff --git a/docs/zh/guides/development.md b/docs/zh/guides/development.md index fe67742768..032a515f61 100644 --- a/docs/zh/guides/development.md +++ b/docs/zh/guides/development.md @@ -36,7 +36,7 @@ yarn install ### ENV ```bash -copy .env.example .env +cp .env.example .env ``` ### Start From 99b431ec9299add599e6f74067f058a954f83d02 Mon Sep 17 00:00:00 2001 From: defi-failure <159208748+defi-failure@users.noreply.github.com> Date: Fri, 26 Dec 2025 17:37:58 +0800 Subject: [PATCH 02/11] fix: remove trailing api version in ANTHROPIC_BASE_URL (#12145) --- packages/shared/utils.ts | 53 +++++++++++++++++++ .../agents/services/claudecode/index.ts | 10 +++- .../legacy/clients/gemini/GeminiAPIClient.ts | 2 +- .../aiCore/legacy/clients/ovms/OVMSClient.ts | 3 +- src/renderer/src/utils/__tests__/api.test.ts | 3 +- src/renderer/src/utils/api.ts | 53 ------------------- 6 files changed, 66 insertions(+), 58 deletions(-) diff --git a/packages/shared/utils.ts b/packages/shared/utils.ts index a14f78958d..7e90624aba 100644 --- a/packages/shared/utils.ts +++ b/packages/shared/utils.ts @@ -35,3 +35,56 @@ export const defaultAppHeaders = () => { // return value // } // } + +/** + * Extracts the trailing API version segment from a URL path. + * + * This function extracts API version patterns (e.g., `v1`, `v2beta`) from the end of a URL. + * Only versions at the end of the path are extracted, not versions in the middle. + * The returned version string does not include leading or trailing slashes. + * + * @param {string} url - The URL string to parse. + * @returns {string | undefined} The trailing API version found (e.g., 'v1', 'v2beta'), or undefined if none found. + * + * @example + * getTrailingApiVersion('https://api.example.com/v1') // 'v1' + * getTrailingApiVersion('https://api.example.com/v2beta/') // 'v2beta' + * getTrailingApiVersion('https://api.example.com/v1/chat') // undefined (version not at end) + * getTrailingApiVersion('https://gateway.ai.cloudflare.com/v1/xxx/v1beta') // 'v1beta' + * getTrailingApiVersion('https://api.example.com') // undefined + */ +export function getTrailingApiVersion(url: string): string | undefined { + const match = url.match(TRAILING_VERSION_REGEX) + + if (match) { + // Extract version without leading slash and trailing slash + return match[0].replace(/^\//, '').replace(/\/$/, '') + } + + return undefined +} + +/** + * Matches an API version at the end of a URL (with optional trailing slash). + * Used to detect and extract versions only from the trailing position. + */ +const TRAILING_VERSION_REGEX = /\/v\d+(?:alpha|beta)?\/?$/i + +/** + * Removes the trailing API version segment from a URL path. + * + * This function removes API version patterns (e.g., `/v1`, `/v2beta`) from the end of a URL. + * Only versions at the end of the path are removed, not versions in the middle. + * + * @param {string} url - The URL string to process. + * @returns {string} The URL with the trailing API version removed, or the original URL if no trailing version found. + * + * @example + * withoutTrailingApiVersion('https://api.example.com/v1') // 'https://api.example.com' + * withoutTrailingApiVersion('https://api.example.com/v2beta/') // 'https://api.example.com' + * withoutTrailingApiVersion('https://api.example.com/v1/chat') // 'https://api.example.com/v1/chat' (no change) + * withoutTrailingApiVersion('https://api.example.com') // 'https://api.example.com' + */ +export function withoutTrailingApiVersion(url: string): string { + return url.replace(TRAILING_VERSION_REGEX, '') +} diff --git a/src/main/services/agents/services/claudecode/index.ts b/src/main/services/agents/services/claudecode/index.ts index 45cecb049f..69266f5a61 100644 --- a/src/main/services/agents/services/claudecode/index.ts +++ b/src/main/services/agents/services/claudecode/index.ts @@ -18,6 +18,7 @@ import { validateModelId } from '@main/apiServer/utils' import { isWin } from '@main/constant' import { autoDiscoverGitBash } from '@main/utils/process' import getLoginShellEnvironment from '@main/utils/shell-env' +import { withoutTrailingApiVersion } from '@shared/utils' import { app } from 'electron' import type { GetAgentSessionResponse } from '../..' @@ -112,6 +113,13 @@ class ClaudeCodeService implements AgentServiceInterface { // Auto-discover Git Bash path on Windows (already logs internally) const customGitBashPath = isWin ? autoDiscoverGitBash() : null + // Claude Agent SDK builds the final endpoint as `${ANTHROPIC_BASE_URL}/v1/messages`. + // To avoid malformed URLs like `/v1/v1/messages`, we normalize the provider host + // by stripping any trailing API version (e.g. `/v1`). + const anthropicBaseUrl = withoutTrailingApiVersion( + modelInfo.provider.anthropicApiHost?.trim() || modelInfo.provider.apiHost + ) + const env = { ...loginShellEnvWithoutProxies, // TODO: fix the proxy api server @@ -120,7 +128,7 @@ class ClaudeCodeService implements AgentServiceInterface { // ANTHROPIC_BASE_URL: `http://${apiConfig.host}:${apiConfig.port}/${modelInfo.provider.id}`, ANTHROPIC_API_KEY: modelInfo.provider.apiKey, ANTHROPIC_AUTH_TOKEN: modelInfo.provider.apiKey, - ANTHROPIC_BASE_URL: modelInfo.provider.anthropicApiHost?.trim() || modelInfo.provider.apiHost, + ANTHROPIC_BASE_URL: anthropicBaseUrl, ANTHROPIC_MODEL: modelInfo.modelId, ANTHROPIC_DEFAULT_OPUS_MODEL: modelInfo.modelId, ANTHROPIC_DEFAULT_SONNET_MODEL: modelInfo.modelId, diff --git a/src/renderer/src/aiCore/legacy/clients/gemini/GeminiAPIClient.ts b/src/renderer/src/aiCore/legacy/clients/gemini/GeminiAPIClient.ts index ac10106f37..d7f14326f6 100644 --- a/src/renderer/src/aiCore/legacy/clients/gemini/GeminiAPIClient.ts +++ b/src/renderer/src/aiCore/legacy/clients/gemini/GeminiAPIClient.ts @@ -46,7 +46,6 @@ import type { GeminiSdkRawOutput, GeminiSdkToolCall } from '@renderer/types/sdk' -import { getTrailingApiVersion, withoutTrailingApiVersion } from '@renderer/utils' import { isToolUseModeFunction } from '@renderer/utils/assistant' import { geminiFunctionCallToMcpTool, @@ -56,6 +55,7 @@ import { } from '@renderer/utils/mcp-tools' import { findFileBlocks, findImageBlocks, getMainTextContent } from '@renderer/utils/messageUtils/find' import { defaultTimeout, MB } from '@shared/config/constant' +import { getTrailingApiVersion, withoutTrailingApiVersion } from '@shared/utils' import { t } from 'i18next' import type { GenericChunk } from '../../middleware/schemas' diff --git a/src/renderer/src/aiCore/legacy/clients/ovms/OVMSClient.ts b/src/renderer/src/aiCore/legacy/clients/ovms/OVMSClient.ts index 02ac6de091..4936b693ee 100644 --- a/src/renderer/src/aiCore/legacy/clients/ovms/OVMSClient.ts +++ b/src/renderer/src/aiCore/legacy/clients/ovms/OVMSClient.ts @@ -3,7 +3,8 @@ import { loggerService } from '@logger' import { isSupportedModel } from '@renderer/config/models' import type { Provider } from '@renderer/types' import { objectKeys } from '@renderer/types' -import { formatApiHost, withoutTrailingApiVersion } from '@renderer/utils' +import { formatApiHost } from '@renderer/utils' +import { withoutTrailingApiVersion } from '@shared/utils' import { OpenAIAPIClient } from '../openai/OpenAIApiClient' diff --git a/src/renderer/src/utils/__tests__/api.test.ts b/src/renderer/src/utils/__tests__/api.test.ts index f5251b8393..ad64dc0d73 100644 --- a/src/renderer/src/utils/__tests__/api.test.ts +++ b/src/renderer/src/utils/__tests__/api.test.ts @@ -1,5 +1,6 @@ import store from '@renderer/store' import type { VertexProvider } from '@renderer/types' +import { getTrailingApiVersion, withoutTrailingApiVersion } from '@shared/utils' import { beforeEach, describe, expect, it, vi } from 'vitest' import { @@ -8,14 +9,12 @@ import { formatAzureOpenAIApiHost, formatOllamaApiHost, formatVertexApiHost, - getTrailingApiVersion, hasAPIVersion, isWithTrailingSharp, maskApiKey, routeToEndpoint, splitApiKeyString, validateApiHost, - withoutTrailingApiVersion, withoutTrailingSharp } from '../api' diff --git a/src/renderer/src/utils/api.ts b/src/renderer/src/utils/api.ts index 25a73dcb16..fd470d5406 100644 --- a/src/renderer/src/utils/api.ts +++ b/src/renderer/src/utils/api.ts @@ -19,12 +19,6 @@ export function formatApiKeys(value: string): string { */ const VERSION_REGEX_PATTERN = '\\/v\\d+(?:alpha|beta)?(?=\\/|$)' -/** - * Matches an API version at the end of a URL (with optional trailing slash). - * Used to detect and extract versions only from the trailing position. - */ -const TRAILING_VERSION_REGEX = /\/v\d+(?:alpha|beta)?\/?$/i - /** * 判断 host 的 path 中是否包含形如版本的字符串(例如 /v1、/v2beta 等), * @@ -272,50 +266,3 @@ export function splitApiKeyString(keyStr: string): string[] { .map((k) => k.replace(/\\,/g, ',')) .filter((k) => k) } - -/** - * Extracts the trailing API version segment from a URL path. - * - * This function extracts API version patterns (e.g., `v1`, `v2beta`) from the end of a URL. - * Only versions at the end of the path are extracted, not versions in the middle. - * The returned version string does not include leading or trailing slashes. - * - * @param {string} url - The URL string to parse. - * @returns {string | undefined} The trailing API version found (e.g., 'v1', 'v2beta'), or undefined if none found. - * - * @example - * getTrailingApiVersion('https://api.example.com/v1') // 'v1' - * getTrailingApiVersion('https://api.example.com/v2beta/') // 'v2beta' - * getTrailingApiVersion('https://api.example.com/v1/chat') // undefined (version not at end) - * getTrailingApiVersion('https://gateway.ai.cloudflare.com/v1/xxx/v1beta') // 'v1beta' - * getTrailingApiVersion('https://api.example.com') // undefined - */ -export function getTrailingApiVersion(url: string): string | undefined { - const match = url.match(TRAILING_VERSION_REGEX) - - if (match) { - // Extract version without leading slash and trailing slash - return match[0].replace(/^\//, '').replace(/\/$/, '') - } - - return undefined -} - -/** - * Removes the trailing API version segment from a URL path. - * - * This function removes API version patterns (e.g., `/v1`, `/v2beta`) from the end of a URL. - * Only versions at the end of the path are removed, not versions in the middle. - * - * @param {string} url - The URL string to process. - * @returns {string} The URL with the trailing API version removed, or the original URL if no trailing version found. - * - * @example - * withoutTrailingApiVersion('https://api.example.com/v1') // 'https://api.example.com' - * withoutTrailingApiVersion('https://api.example.com/v2beta/') // 'https://api.example.com' - * withoutTrailingApiVersion('https://api.example.com/v1/chat') // 'https://api.example.com/v1/chat' (no change) - * withoutTrailingApiVersion('https://api.example.com') // 'https://api.example.com' - */ -export function withoutTrailingApiVersion(url: string): string { - return url.replace(TRAILING_VERSION_REGEX, '') -} From 401d66f3ddbb3c1bdecbb23f6fcf69dafae83252 Mon Sep 17 00:00:00 2001 From: fullex <106392080+0xfullex@users.noreply.github.com> Date: Fri, 26 Dec 2025 23:43:38 +0800 Subject: [PATCH 03/11] fix(windows): remember size not working for SelectionAction window (#12132) Co-authored-by: Claude Opus 4.5 --- src/main/services/SelectionService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/services/SelectionService.ts b/src/main/services/SelectionService.ts index 695026003b..629e67401c 100644 --- a/src/main/services/SelectionService.ts +++ b/src/main/services/SelectionService.ts @@ -1435,6 +1435,12 @@ export class SelectionService { } actionWindow.setBounds({ x, y, width, height }) + + // [Windows only] Update remembered window size for custom resize + // setBounds() may not trigger the 'resized' event, so we need to update manually + if (this.isRemeberWinSize) { + this.lastActionWindowSize = { width, height } + } } /** From 9586f381577f3bb0e8e1768c56151fb1d2dc6c0c Mon Sep 17 00:00:00 2001 From: Phantom Date: Sat, 27 Dec 2025 12:27:11 +0800 Subject: [PATCH 04/11] build: upgrade electron-vite to 5.0.0 with HMR support (#12120) --- electron.vite.config.ts | 7 +- package.json | 7 +- yarn.lock | 486 +++++++++++++++++++++++++++++----------- 3 files changed, 356 insertions(+), 144 deletions(-) diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 172d48ca9a..89c0cf2f9b 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -1,6 +1,6 @@ import react from '@vitejs/plugin-react-swc' import { CodeInspectorPlugin } from 'code-inspector-plugin' -import { defineConfig, externalizeDepsPlugin } from 'electron-vite' +import { defineConfig } from 'electron-vite' import { resolve } from 'path' import { visualizer } from 'rollup-plugin-visualizer' @@ -17,7 +17,7 @@ const isProd = process.env.NODE_ENV === 'production' export default defineConfig({ main: { - plugins: [externalizeDepsPlugin(), ...visualizerPlugin('main')], + plugins: [...visualizerPlugin('main')], resolve: { alias: { '@main': resolve('src/main'), @@ -51,8 +51,7 @@ export default defineConfig({ plugins: [ react({ tsDecorators: true - }), - externalizeDepsPlugin() + }) ], resolve: { alias: { diff --git a/package.json b/package.json index 7ad4140af7..2c3c05daf2 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "scripts": { "start": "electron-vite preview", "dev": "dotenv electron-vite dev", + "dev:watch": "dotenv electron-vite dev -- -w", "debug": "electron-vite -- --inspect --sourcemap --remote-debugging-port=9222", "build": "npm run typecheck && electron-vite build", "build:check": "yarn lint && yarn test", @@ -273,7 +274,7 @@ "electron-reload": "^2.0.0-alpha.1", "electron-store": "^8.2.0", "electron-updater": "patch:electron-updater@npm%3A6.7.0#~/.yarn/patches/electron-updater-npm-6.7.0-47b11bb0d4.patch", - "electron-vite": "4.0.1", + "electron-vite": "5.0.0", "electron-window-state": "^5.0.3", "emittery": "^1.0.3", "emoji-picker-element": "^1.22.1", @@ -370,7 +371,7 @@ "undici": "6.21.2", "unified": "^11.0.5", "uuid": "^13.0.0", - "vite": "npm:rolldown-vite@7.1.5", + "vite": "npm:rolldown-vite@7.3.0", "vitest": "^3.2.4", "webdav": "^5.8.0", "winston": "^3.17.0", @@ -400,7 +401,7 @@ "pkce-challenge@npm:^4.1.0": "patch:pkce-challenge@npm%3A4.1.0#~/.yarn/patches/pkce-challenge-npm-4.1.0-fbc51695a3.patch", "tar-fs": "^2.1.4", "undici": "6.21.2", - "vite": "npm:rolldown-vite@7.1.5", + "vite": "npm:rolldown-vite@7.3.0", "tesseract.js@npm:*": "patch:tesseract.js@npm%3A6.0.1#~/.yarn/patches/tesseract.js-npm-6.0.1-2562a7e46d.patch", "@ai-sdk/openai@npm:^2.0.52": "patch:@ai-sdk/openai@npm%3A2.0.52#~/.yarn/patches/@ai-sdk-openai-npm-2.0.52-b36d949c76.patch", "@img/sharp-darwin-arm64": "0.34.3", diff --git a/yarn.lock b/yarn.lock index 1dffdbeb42..b6b87c568a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -381,7 +381,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0": +"@ampproject/remapping@npm:^2.3.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" dependencies: @@ -1524,26 +1524,26 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.27.7": - version: 7.28.0 - resolution: "@babel/core@npm:7.28.0" +"@babel/core@npm:^7.28.4": + version: 7.28.5 + resolution: "@babel/core@npm:7.28.5" dependencies: - "@ampproject/remapping": "npm:^2.2.0" "@babel/code-frame": "npm:^7.27.1" - "@babel/generator": "npm:^7.28.0" + "@babel/generator": "npm:^7.28.5" "@babel/helper-compilation-targets": "npm:^7.27.2" - "@babel/helper-module-transforms": "npm:^7.27.3" - "@babel/helpers": "npm:^7.27.6" - "@babel/parser": "npm:^7.28.0" + "@babel/helper-module-transforms": "npm:^7.28.3" + "@babel/helpers": "npm:^7.28.4" + "@babel/parser": "npm:^7.28.5" "@babel/template": "npm:^7.27.2" - "@babel/traverse": "npm:^7.28.0" - "@babel/types": "npm:^7.28.0" + "@babel/traverse": "npm:^7.28.5" + "@babel/types": "npm:^7.28.5" + "@jridgewell/remapping": "npm:^2.3.5" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10c0/423302e7c721e73b1c096217880272e02020dfb697a55ccca60ad01bba90037015f84d0c20c6ce297cf33a19bb704bc5c2b3d3095f5284dfa592bd1de0b9e8c3 + checksum: 10c0/535f82238027621da6bdffbdbe896ebad3558b311d6f8abc680637a9859b96edbf929ab010757055381570b29cf66c4a295b5618318d27a4273c0e2033925e72 languageName: node linkType: hard @@ -1560,6 +1560,19 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/generator@npm:7.28.5" + dependencies: + "@babel/parser": "npm:^7.28.5" + "@babel/types": "npm:^7.28.5" + "@jridgewell/gen-mapping": "npm:^0.3.12" + "@jridgewell/trace-mapping": "npm:^0.3.28" + jsesc: "npm:^3.0.2" + checksum: 10c0/9f219fe1d5431b6919f1a5c60db8d5d34fe546c0d8f5a8511b32f847569234ffc8032beb9e7404649a143f54e15224ecb53a3d11b6bb85c3203e573d91fca752 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.27.2": version: 7.27.2 resolution: "@babel/helper-compilation-targets@npm:7.27.2" @@ -1590,16 +1603,16 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.27.3": - version: 7.27.3 - resolution: "@babel/helper-module-transforms@npm:7.27.3" +"@babel/helper-module-transforms@npm:^7.28.3": + version: 7.28.3 + resolution: "@babel/helper-module-transforms@npm:7.28.3" dependencies: "@babel/helper-module-imports": "npm:^7.27.1" "@babel/helper-validator-identifier": "npm:^7.27.1" - "@babel/traverse": "npm:^7.27.3" + "@babel/traverse": "npm:^7.28.3" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10c0/fccb4f512a13b4c069af51e1b56b20f54024bcf1591e31e978a30f3502567f34f90a80da6a19a6148c249216292a8074a0121f9e52602510ef0f32dbce95ca01 + checksum: 10c0/549be62515a6d50cd4cfefcab1b005c47f89bd9135a22d602ee6a5e3a01f27571868ada10b75b033569f24dc4a2bb8d04bfa05ee75c16da7ade2d0db1437fcdb languageName: node linkType: hard @@ -1624,6 +1637,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/helper-validator-identifier@npm:7.28.5" + checksum: 10c0/42aaebed91f739a41f3d80b72752d1f95fd7c72394e8e4bd7cdd88817e0774d80a432451bcba17c2c642c257c483bf1d409dd4548883429ea9493a3bc4ab0847 + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.27.1": version: 7.27.1 resolution: "@babel/helper-validator-option@npm:7.27.1" @@ -1631,13 +1651,13 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.27.6": - version: 7.27.6 - resolution: "@babel/helpers@npm:7.27.6" +"@babel/helpers@npm:^7.28.4": + version: 7.28.4 + resolution: "@babel/helpers@npm:7.28.4" dependencies: "@babel/template": "npm:^7.27.2" - "@babel/types": "npm:^7.27.6" - checksum: 10c0/448bac96ef8b0f21f2294a826df9de6bf4026fd023f8a6bb6c782fe3e61946801ca24381490b8e58d861fee75cd695a1882921afbf1f53b0275ee68c938bd6d3 + "@babel/types": "npm:^7.28.4" + checksum: 10c0/aaa5fb8098926dfed5f223adf2c5e4c7fbba4b911b73dfec2d7d3083f8ba694d201a206db673da2d9b3ae8c01793e795767654558c450c8c14b4c2175b4fcb44 languageName: node linkType: hard @@ -1652,6 +1672,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/parser@npm:7.28.5" + dependencies: + "@babel/types": "npm:^7.28.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/5bbe48bf2c79594ac02b490a41ffde7ef5aa22a9a88ad6bcc78432a6ba8a9d638d531d868bd1f104633f1f6bba9905746e15185b8276a3756c42b765d131b1ef + languageName: node + linkType: hard + "@babel/plugin-transform-arrow-functions@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-arrow-functions@npm:7.27.1" @@ -1695,7 +1726,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.27.3, @babel/traverse@npm:^7.28.0": +"@babel/traverse@npm:^7.27.1": version: 7.28.0 resolution: "@babel/traverse@npm:7.28.0" dependencies: @@ -1710,7 +1741,22 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.6, @babel/types@npm:^7.28.0": +"@babel/traverse@npm:^7.28.3, @babel/traverse@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/traverse@npm:7.28.5" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.28.5" + "@babel/helper-globals": "npm:^7.28.0" + "@babel/parser": "npm:^7.28.5" + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.28.5" + debug: "npm:^4.3.1" + checksum: 10c0/f6c4a595993ae2b73f2d4cd9c062f2e232174d293edd4abe1d715bd6281da8d99e47c65857e8d0917d9384c65972f4acdebc6749a7c40a8fcc38b3c7fb3e706f + languageName: node + linkType: hard + +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.27.1, @babel/types@npm:^7.28.0": version: 7.28.1 resolution: "@babel/types@npm:7.28.1" dependencies: @@ -1730,6 +1776,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.28.4, @babel/types@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/types@npm:7.28.5" + dependencies: + "@babel/helper-string-parser": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.28.5" + checksum: 10c0/a5a483d2100befbf125793640dec26b90b95fd233a94c19573325898a5ce1e52cdfa96e495c7dcc31b5eca5b66ce3e6d4a0f5a4a62daec271455959f208ab08a + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^1.0.2": version: 1.0.2 resolution: "@bcoe/v8-coverage@npm:1.0.2" @@ -2887,6 +2943,16 @@ __metadata: languageName: node linkType: hard +"@emnapi/core@npm:^1.7.1": + version: 1.7.1 + resolution: "@emnapi/core@npm:1.7.1" + dependencies: + "@emnapi/wasi-threads": "npm:1.1.0" + tslib: "npm:^2.4.0" + checksum: 10c0/f3740be23440b439333e3ae3832163f60c96c4e35337f3220ceba88f36ee89a57a871d27c94eb7a9ff98a09911ed9a2089e477ab549f4d30029f8b907f84a351 + languageName: node + linkType: hard + "@emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.4.4, @emnapi/runtime@npm:^1.4.5": version: 1.4.5 resolution: "@emnapi/runtime@npm:1.4.5" @@ -2896,6 +2962,15 @@ __metadata: languageName: node linkType: hard +"@emnapi/runtime@npm:^1.7.1": + version: 1.7.1 + resolution: "@emnapi/runtime@npm:1.7.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/26b851cd3e93877d8732a985a2ebf5152325bbacc6204ef5336a47359dedcc23faeb08cdfcb8bb389b5401b3e894b882bc1a1e55b4b7c1ed1e67c991a760ddd5 + languageName: node + linkType: hard + "@emnapi/wasi-threads@npm:1.0.4": version: 1.0.4 resolution: "@emnapi/wasi-threads@npm:1.0.4" @@ -2905,7 +2980,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/wasi-threads@npm:^1.0.4": +"@emnapi/wasi-threads@npm:1.1.0, @emnapi/wasi-threads@npm:^1.0.4": version: 1.1.0 resolution: "@emnapi/wasi-threads@npm:1.1.0" dependencies: @@ -3883,7 +3958,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/remapping@npm:^2.3.4": +"@jridgewell/remapping@npm:^2.3.4, @jridgewell/remapping@npm:^2.3.5": version: 2.3.5 resolution: "@jridgewell/remapping@npm:2.3.5" dependencies: @@ -4987,14 +5062,14 @@ __metadata: languageName: node linkType: hard -"@napi-rs/wasm-runtime@npm:^1.0.3": - version: 1.0.3 - resolution: "@napi-rs/wasm-runtime@npm:1.0.3" +"@napi-rs/wasm-runtime@npm:^1.1.0": + version: 1.1.0 + resolution: "@napi-rs/wasm-runtime@npm:1.1.0" dependencies: - "@emnapi/core": "npm:^1.4.5" - "@emnapi/runtime": "npm:^1.4.5" - "@tybys/wasm-util": "npm:^0.10.0" - checksum: 10c0/7918d82477e75931b6e35bb003464382eb93e526362f81a98bf8610407a67b10f4d041931015ad48072c89db547deb7e471dfb91f4ab11ac63a24d8580297f75 + "@emnapi/core": "npm:^1.7.1" + "@emnapi/runtime": "npm:^1.7.1" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/ee351052123bfc635c4cef03ac273a686522394ccd513b1e5b7b3823cecd6abb4a31f23a3a962933192b87eb7b7c3eb3def7748bd410edc66f932d90cf44e9ab languageName: node linkType: hard @@ -5329,6 +5404,13 @@ __metadata: languageName: node linkType: hard +"@oxc-project/runtime@npm:0.101.0": + version: 0.101.0 + resolution: "@oxc-project/runtime@npm:0.101.0" + checksum: 10c0/86fd7bb37e94986e7a09bde07a16fa63cebeaada6bcb8963bc07087d54c107d1a128e1c4a5d27b9b593354c092b8976d7653b6700fbb0da0a2b925fb3de4b34c + languageName: node + linkType: hard + "@oxc-project/runtime@npm:0.71.0": version: 0.71.0 resolution: "@oxc-project/runtime@npm:0.71.0" @@ -5336,13 +5418,6 @@ __metadata: languageName: node linkType: hard -"@oxc-project/runtime@npm:=0.82.3": - version: 0.82.3 - resolution: "@oxc-project/runtime@npm:0.82.3" - checksum: 10c0/48fd0577a9bd146da7eefea8e61a7c855f8947ef6233fe7db2921e5c1f07d73459d8fb4d2d9e45f4d522d5bb31af8157c96020860154fdf7223a9cb0957e36c0 - languageName: node - linkType: hard - "@oxc-project/types@npm:0.71.0": version: 0.71.0 resolution: "@oxc-project/types@npm:0.71.0" @@ -5350,10 +5425,10 @@ __metadata: languageName: node linkType: hard -"@oxc-project/types@npm:=0.82.3": - version: 0.82.3 - resolution: "@oxc-project/types@npm:0.82.3" - checksum: 10c0/17dffc91dc3b726be67b7333d251e811bf4badce8ae77269d1626a107cd7cb673674a3fd6e0f127e40951d630281b9a164fee787a1a0cad12e7372a14b89d7cf +"@oxc-project/types@npm:=0.101.0": + version: 0.101.0 + resolution: "@oxc-project/types@npm:0.101.0" + checksum: 10c0/e4e98da6e34ef0163a652e842e795bda77b703d8282fed4984292ff7b289c4e03d848ed8762e549445e33a142d3883e1013cd9ed43156f6eba34c151b8f599c1 languageName: node linkType: hard @@ -6265,16 +6340,16 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-android-arm64@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-android-arm64@npm:1.0.0-beta.34" +"@rolldown/binding-android-arm64@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-android-arm64@npm:1.0.0-beta.53" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-darwin-arm64@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-darwin-arm64@npm:1.0.0-beta.34" +"@rolldown/binding-darwin-arm64@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-darwin-arm64@npm:1.0.0-beta.53" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -6286,9 +6361,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-darwin-x64@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-darwin-x64@npm:1.0.0-beta.34" +"@rolldown/binding-darwin-x64@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-darwin-x64@npm:1.0.0-beta.53" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -6300,9 +6375,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-freebsd-x64@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-freebsd-x64@npm:1.0.0-beta.34" +"@rolldown/binding-freebsd-x64@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-freebsd-x64@npm:1.0.0-beta.53" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -6314,9 +6389,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-linux-arm-gnueabihf@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.0.0-beta.34" +"@rolldown/binding-linux-arm-gnueabihf@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.0.0-beta.53" conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -6328,9 +6403,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-linux-arm64-gnu@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.0.0-beta.34" +"@rolldown/binding-linux-arm64-gnu@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.0.0-beta.53" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -6342,9 +6417,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-linux-arm64-musl@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-linux-arm64-musl@npm:1.0.0-beta.34" +"@rolldown/binding-linux-arm64-musl@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-linux-arm64-musl@npm:1.0.0-beta.53" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -6356,9 +6431,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-linux-x64-gnu@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-linux-x64-gnu@npm:1.0.0-beta.34" +"@rolldown/binding-linux-x64-gnu@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-linux-x64-gnu@npm:1.0.0-beta.53" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -6370,9 +6445,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-linux-x64-musl@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-linux-x64-musl@npm:1.0.0-beta.34" +"@rolldown/binding-linux-x64-musl@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-linux-x64-musl@npm:1.0.0-beta.53" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -6384,18 +6459,18 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-openharmony-arm64@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-openharmony-arm64@npm:1.0.0-beta.34" +"@rolldown/binding-openharmony-arm64@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-openharmony-arm64@npm:1.0.0-beta.53" conditions: os=openharmony & cpu=arm64 languageName: node linkType: hard -"@rolldown/binding-wasm32-wasi@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-wasm32-wasi@npm:1.0.0-beta.34" +"@rolldown/binding-wasm32-wasi@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-wasm32-wasi@npm:1.0.0-beta.53" dependencies: - "@napi-rs/wasm-runtime": "npm:^1.0.3" + "@napi-rs/wasm-runtime": "npm:^1.1.0" conditions: cpu=wasm32 languageName: node linkType: hard @@ -6409,9 +6484,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-win32-arm64-msvc@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.0.0-beta.34" +"@rolldown/binding-win32-arm64-msvc@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.0.0-beta.53" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -6423,13 +6498,6 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-win32-ia32-msvc@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-win32-ia32-msvc@npm:1.0.0-beta.34" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@rolldown/binding-win32-ia32-msvc@npm:1.0.0-beta.9-commit.d91dfb5": version: 1.0.0-beta.9-commit.d91dfb5 resolution: "@rolldown/binding-win32-ia32-msvc@npm:1.0.0-beta.9-commit.d91dfb5" @@ -6437,9 +6505,9 @@ __metadata: languageName: node linkType: hard -"@rolldown/binding-win32-x64-msvc@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/binding-win32-x64-msvc@npm:1.0.0-beta.34" +"@rolldown/binding-win32-x64-msvc@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/binding-win32-x64-msvc@npm:1.0.0-beta.53" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -6458,10 +6526,10 @@ __metadata: languageName: node linkType: hard -"@rolldown/pluginutils@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "@rolldown/pluginutils@npm:1.0.0-beta.34" - checksum: 10c0/96565287991825ecd90b60607dae908ebfdde233661fc589c98547a75c1fd0282b2e2a7849c3eb0c9941e2fba34667a8d5cdb8d597370815c19c2f29b4c157b4 +"@rolldown/pluginutils@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "@rolldown/pluginutils@npm:1.0.0-beta.53" + checksum: 10c0/e8b0a7eb76be22f6f103171f28072de821525a4e400454850516da91a7381957932ff0ce495f227bcb168e86815788b0c1d249ca9e34dca366a82c8825b714ce languageName: node linkType: hard @@ -8204,6 +8272,15 @@ __metadata: languageName: node linkType: hard +"@tybys/wasm-util@npm:^0.10.1": + version: 0.10.1 + resolution: "@tybys/wasm-util@npm:0.10.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/b255094f293794c6d2289300c5fbcafbb5532a3aed3a5ffd2f8dc1828e639b88d75f6a376dd8f94347a44813fd7a7149d8463477a9a49525c8b2dcaa38c2d1e8 + languageName: node + linkType: hard + "@types/aria-query@npm:^5.0.1": version: 5.0.4 resolution: "@types/aria-query@npm:5.0.4" @@ -10209,7 +10286,7 @@ __metadata: electron-reload: "npm:^2.0.0-alpha.1" electron-store: "npm:^8.2.0" electron-updater: "patch:electron-updater@npm%3A6.7.0#~/.yarn/patches/electron-updater-npm-6.7.0-47b11bb0d4.patch" - electron-vite: "npm:4.0.1" + electron-vite: "npm:5.0.0" electron-window-state: "npm:^5.0.3" emittery: "npm:^1.0.3" emoji-picker-element: "npm:^1.22.1" @@ -10322,7 +10399,7 @@ __metadata: undici: "npm:6.21.2" unified: "npm:^11.0.5" uuid: "npm:^13.0.0" - vite: "npm:rolldown-vite@7.1.5" + vite: "npm:rolldown-vite@7.3.0" vitest: "npm:^3.2.4" webdav: "npm:^5.8.0" winston: "npm:^3.17.0" @@ -13773,15 +13850,15 @@ __metadata: languageName: node linkType: hard -"electron-vite@npm:4.0.1": - version: 4.0.1 - resolution: "electron-vite@npm:4.0.1" +"electron-vite@npm:5.0.0": + version: 5.0.0 + resolution: "electron-vite@npm:5.0.0" dependencies: - "@babel/core": "npm:^7.27.7" + "@babel/core": "npm:^7.28.4" "@babel/plugin-transform-arrow-functions": "npm:^7.27.1" cac: "npm:^6.7.14" - esbuild: "npm:^0.25.5" - magic-string: "npm:^0.30.17" + esbuild: "npm:^0.25.11" + magic-string: "npm:^0.30.19" picocolors: "npm:^1.1.1" peerDependencies: "@swc/core": ^1.0.0 @@ -13791,7 +13868,7 @@ __metadata: optional: true bin: electron-vite: bin/electron-vite.js - checksum: 10c0/4e81ac4e4ede6060ffec56ba9b1d5ff95bb263496e62527345e8c79542924c54c54def39de9b466a81ed250b68774792c2106b93274c790b4cd8e7be448f6af8 + checksum: 10c0/e7797910b23f23f39c12ded92d07d7164c5c6adab294aa13278c1b49ada3b12868b13ace8546d2656db4dbab89978cf8368a659d1ce6a2fb9f1aeddb1c8de557 languageName: node linkType: hard @@ -17573,6 +17650,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-android-arm64@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-android-arm64@npm:1.30.2" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "lightningcss-darwin-arm64@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-darwin-arm64@npm:1.30.1" @@ -17580,6 +17664,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-darwin-arm64@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-darwin-arm64@npm:1.30.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "lightningcss-darwin-x64@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-darwin-x64@npm:1.30.1" @@ -17587,6 +17678,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-darwin-x64@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-darwin-x64@npm:1.30.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "lightningcss-freebsd-x64@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-freebsd-x64@npm:1.30.1" @@ -17594,6 +17692,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-freebsd-x64@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-freebsd-x64@npm:1.30.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "lightningcss-linux-arm-gnueabihf@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-linux-arm-gnueabihf@npm:1.30.1" @@ -17601,6 +17706,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-linux-arm-gnueabihf@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-linux-arm-gnueabihf@npm:1.30.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "lightningcss-linux-arm64-gnu@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-linux-arm64-gnu@npm:1.30.1" @@ -17608,6 +17720,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-linux-arm64-gnu@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-linux-arm64-gnu@npm:1.30.2" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "lightningcss-linux-arm64-musl@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-linux-arm64-musl@npm:1.30.1" @@ -17615,6 +17734,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-linux-arm64-musl@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-linux-arm64-musl@npm:1.30.2" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "lightningcss-linux-x64-gnu@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-linux-x64-gnu@npm:1.30.1" @@ -17622,6 +17748,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-linux-x64-gnu@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-linux-x64-gnu@npm:1.30.2" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "lightningcss-linux-x64-musl@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-linux-x64-musl@npm:1.30.1" @@ -17629,6 +17762,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-linux-x64-musl@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-linux-x64-musl@npm:1.30.2" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "lightningcss-win32-arm64-msvc@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-win32-arm64-msvc@npm:1.30.1" @@ -17636,6 +17776,13 @@ __metadata: languageName: node linkType: hard +"lightningcss-win32-arm64-msvc@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-win32-arm64-msvc@npm:1.30.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "lightningcss-win32-x64-msvc@npm:1.30.1": version: 1.30.1 resolution: "lightningcss-win32-x64-msvc@npm:1.30.1" @@ -17643,7 +17790,14 @@ __metadata: languageName: node linkType: hard -"lightningcss@npm:1.30.1, lightningcss@npm:^1.30.1": +"lightningcss-win32-x64-msvc@npm:1.30.2": + version: 1.30.2 + resolution: "lightningcss-win32-x64-msvc@npm:1.30.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"lightningcss@npm:1.30.1": version: 1.30.1 resolution: "lightningcss@npm:1.30.1" dependencies: @@ -17683,6 +17837,49 @@ __metadata: languageName: node linkType: hard +"lightningcss@npm:^1.30.2": + version: 1.30.2 + resolution: "lightningcss@npm:1.30.2" + dependencies: + detect-libc: "npm:^2.0.3" + lightningcss-android-arm64: "npm:1.30.2" + lightningcss-darwin-arm64: "npm:1.30.2" + lightningcss-darwin-x64: "npm:1.30.2" + lightningcss-freebsd-x64: "npm:1.30.2" + lightningcss-linux-arm-gnueabihf: "npm:1.30.2" + lightningcss-linux-arm64-gnu: "npm:1.30.2" + lightningcss-linux-arm64-musl: "npm:1.30.2" + lightningcss-linux-x64-gnu: "npm:1.30.2" + lightningcss-linux-x64-musl: "npm:1.30.2" + lightningcss-win32-arm64-msvc: "npm:1.30.2" + lightningcss-win32-x64-msvc: "npm:1.30.2" + dependenciesMeta: + lightningcss-android-arm64: + optional: true + lightningcss-darwin-arm64: + optional: true + lightningcss-darwin-x64: + optional: true + lightningcss-freebsd-x64: + optional: true + lightningcss-linux-arm-gnueabihf: + optional: true + lightningcss-linux-arm64-gnu: + optional: true + lightningcss-linux-arm64-musl: + optional: true + lightningcss-linux-x64-gnu: + optional: true + lightningcss-linux-x64-musl: + optional: true + lightningcss-win32-arm64-msvc: + optional: true + lightningcss-win32-x64-msvc: + optional: true + checksum: 10c0/5c0c73a33946dab65908d5cd1325df4efa290efb77f940b60f40448b5ab9a87d3ea665ef9bcf00df4209705050ecf2f7ecc649f44d6dfa5905bb50f15717e78d + languageName: node + linkType: hard + "lilconfig@npm:^3.1.3": version: 3.1.3 resolution: "lilconfig@npm:3.1.3" @@ -18046,6 +18243,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.30.19": + version: 0.30.21 + resolution: "magic-string@npm:0.30.21" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.5" + checksum: 10c0/299378e38f9a270069fc62358522ddfb44e94244baa0d6a8980ab2a9b2490a1d03b236b447eee309e17eb3bddfa482c61259d47960eb018a904f0ded52780c4a + languageName: node + linkType: hard + "magicast@npm:^0.3.5": version: 0.3.5 resolution: "magicast@npm:0.3.5" @@ -22873,28 +23079,25 @@ __metadata: languageName: node linkType: hard -"rolldown@npm:1.0.0-beta.34": - version: 1.0.0-beta.34 - resolution: "rolldown@npm:1.0.0-beta.34" +"rolldown@npm:1.0.0-beta.53": + version: 1.0.0-beta.53 + resolution: "rolldown@npm:1.0.0-beta.53" dependencies: - "@oxc-project/runtime": "npm:=0.82.3" - "@oxc-project/types": "npm:=0.82.3" - "@rolldown/binding-android-arm64": "npm:1.0.0-beta.34" - "@rolldown/binding-darwin-arm64": "npm:1.0.0-beta.34" - "@rolldown/binding-darwin-x64": "npm:1.0.0-beta.34" - "@rolldown/binding-freebsd-x64": "npm:1.0.0-beta.34" - "@rolldown/binding-linux-arm-gnueabihf": "npm:1.0.0-beta.34" - "@rolldown/binding-linux-arm64-gnu": "npm:1.0.0-beta.34" - "@rolldown/binding-linux-arm64-musl": "npm:1.0.0-beta.34" - "@rolldown/binding-linux-x64-gnu": "npm:1.0.0-beta.34" - "@rolldown/binding-linux-x64-musl": "npm:1.0.0-beta.34" - "@rolldown/binding-openharmony-arm64": "npm:1.0.0-beta.34" - "@rolldown/binding-wasm32-wasi": "npm:1.0.0-beta.34" - "@rolldown/binding-win32-arm64-msvc": "npm:1.0.0-beta.34" - "@rolldown/binding-win32-ia32-msvc": "npm:1.0.0-beta.34" - "@rolldown/binding-win32-x64-msvc": "npm:1.0.0-beta.34" - "@rolldown/pluginutils": "npm:1.0.0-beta.34" - ansis: "npm:^4.0.0" + "@oxc-project/types": "npm:=0.101.0" + "@rolldown/binding-android-arm64": "npm:1.0.0-beta.53" + "@rolldown/binding-darwin-arm64": "npm:1.0.0-beta.53" + "@rolldown/binding-darwin-x64": "npm:1.0.0-beta.53" + "@rolldown/binding-freebsd-x64": "npm:1.0.0-beta.53" + "@rolldown/binding-linux-arm-gnueabihf": "npm:1.0.0-beta.53" + "@rolldown/binding-linux-arm64-gnu": "npm:1.0.0-beta.53" + "@rolldown/binding-linux-arm64-musl": "npm:1.0.0-beta.53" + "@rolldown/binding-linux-x64-gnu": "npm:1.0.0-beta.53" + "@rolldown/binding-linux-x64-musl": "npm:1.0.0-beta.53" + "@rolldown/binding-openharmony-arm64": "npm:1.0.0-beta.53" + "@rolldown/binding-wasm32-wasi": "npm:1.0.0-beta.53" + "@rolldown/binding-win32-arm64-msvc": "npm:1.0.0-beta.53" + "@rolldown/binding-win32-x64-msvc": "npm:1.0.0-beta.53" + "@rolldown/pluginutils": "npm:1.0.0-beta.53" dependenciesMeta: "@rolldown/binding-android-arm64": optional: true @@ -22920,13 +23123,11 @@ __metadata: optional: true "@rolldown/binding-win32-arm64-msvc": optional: true - "@rolldown/binding-win32-ia32-msvc": - optional: true "@rolldown/binding-win32-x64-msvc": optional: true bin: rolldown: bin/cli.mjs - checksum: 10c0/3fdaa36b3bfcdd6913973ef8d785a7e7eeb8c181626ac0d0b8a75aecca2ba3d536ff29a3f5c003f692d7c422e022d0357d7d564ab4aa67cf128230ca137473e8 + checksum: 10c0/363109aa38b31254e682e69aa9f199074d98b823b437faac6d05fd1b4a2b73168b9434043a060fecfc25d3e1d441e2d3b757e92621bc1e843a3e916e2b0d3f58 languageName: node linkType: hard @@ -24478,6 +24679,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.15": + version: 0.2.15 + resolution: "tinyglobby@npm:0.2.15" + dependencies: + fdir: "npm:^6.5.0" + picomatch: "npm:^4.0.3" + checksum: 10c0/869c31490d0d88eedb8305d178d4c75e7463e820df5a9b9d388291daf93e8b1eb5de1dad1c1e139767e4269fe75f3b10d5009b2cc14db96ff98986920a186844 + languageName: node + linkType: hard + "tinypool@npm:^1.1.1": version: 1.1.1 resolution: "tinypool@npm:1.1.1" @@ -25590,20 +25801,21 @@ __metadata: languageName: node linkType: hard -"vite@npm:rolldown-vite@7.1.5": - version: 7.1.5 - resolution: "rolldown-vite@npm:7.1.5" +"vite@npm:rolldown-vite@7.3.0": + version: 7.3.0 + resolution: "rolldown-vite@npm:7.3.0" dependencies: + "@oxc-project/runtime": "npm:0.101.0" fdir: "npm:^6.5.0" fsevents: "npm:~2.3.3" - lightningcss: "npm:^1.30.1" + lightningcss: "npm:^1.30.2" picomatch: "npm:^4.0.3" postcss: "npm:^8.5.6" - rolldown: "npm:1.0.0-beta.34" - tinyglobby: "npm:^0.2.14" + rolldown: "npm:1.0.0-beta.53" + tinyglobby: "npm:^0.2.15" peerDependencies: "@types/node": ^20.19.0 || >=22.12.0 - esbuild: ^0.25.0 + esbuild: ^0.27.0 jiti: ">=1.21.0" less: ^4.0.0 sass: ^1.70.0 @@ -25641,7 +25853,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/55f6648a8700345700382adac4877208eedcfff5757debba74851227dbc50eae3cc7ccea86bcfda689a9855fbbd2c7e7dd020ffc0c01bfb815dbc6bf65991cbd + checksum: 10c0/7098ba9be029e6530baf6a08e786859910e502e14f18a6fdda856b149fe676ff81d5cb069b8b42f3e88e791fff17f77f9f067c26159fb85a7aab4e4b8692bbb2 languageName: node linkType: hard From 723fa116477f5e36129d6c6e36dc587dadc5d44d Mon Sep 17 00:00:00 2001 From: Shemol Date: Sat, 27 Dec 2025 13:57:33 +0800 Subject: [PATCH 05/11] perf(ModelList): use Map for O(1) model status lookup (#12161) - Replace Array.find() with Map.get() for modelStatus lookup - Add useMemo to create modelStatusMap from modelStatuses array - Stabilize onEditModel callback with useCallback to prevent memo invalidation Fixes #12035 Signed-off-by: SherlockShemol --- .../ProviderSettings/ModelList/ModelList.tsx | 12 ++++++++++-- .../ProviderSettings/ModelList/ModelListGroup.tsx | 7 ++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelList.tsx b/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelList.tsx index b2455a8ad5..a8eb888813 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelList.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelList.tsx @@ -49,6 +49,9 @@ const ModelList: React.FC = ({ providerId }) => { const { t } = useTranslation() const { provider, models, removeModel } = useProvider(providerId) + // 稳定的编辑模型回调,避免内联函数导致子组件 memo 失效 + const handleEditModel = useCallback((model: Model) => EditModelPopup.show({ provider, model }), [provider]) + const providerConfig = PROVIDER_URLS[provider.id] const docsWebsite = providerConfig?.websites?.docs const modelsWebsite = providerConfig?.websites?.models @@ -63,6 +66,11 @@ const ModelList: React.FC = ({ providerId }) => { const { isChecking: isHealthChecking, modelStatuses, runHealthCheck } = useHealthCheck(provider, models) + // 将 modelStatuses 数组转换为 Map,实现 O(1) 查找 + const modelStatusMap = useMemo(() => { + return new Map(modelStatuses.map((status) => [status.model.id, status])) + }, [modelStatuses]) + const setSearchText = useCallback((text: string) => { startTransition(() => { _setSearchText(text) @@ -138,9 +146,9 @@ const ModelList: React.FC = ({ providerId }) => { key={group} groupName={group} models={displayedModelGroups[group]} - modelStatuses={modelStatuses} + modelStatusMap={modelStatusMap} defaultOpen={i <= 5} - onEditModel={(model) => EditModelPopup.show({ provider, model })} + onEditModel={handleEditModel} onRemoveModel={removeModel} onRemoveGroup={() => displayedModelGroups[group].forEach((model) => removeModel(model))} /> diff --git a/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelListGroup.tsx b/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelListGroup.tsx index 0185ef597d..190a49cebd 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelListGroup.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/ModelList/ModelListGroup.tsx @@ -15,7 +15,8 @@ const MAX_SCROLLER_HEIGHT = 390 interface ModelListGroupProps { groupName: string models: Model[] - modelStatuses: ModelWithStatus[] + /** 使用 Map 实现 O(1) 查找,替代原来的数组线性搜索 */ + modelStatusMap: Map defaultOpen: boolean disabled?: boolean onEditModel: (model: Model) => void @@ -26,7 +27,7 @@ interface ModelListGroupProps { const ModelListGroup: React.FC = ({ groupName, models, - modelStatuses, + modelStatusMap, defaultOpen, disabled, onEditModel, @@ -89,7 +90,7 @@ const ModelListGroup: React.FC = ({ {(model) => ( status.model.id === model.id)} + modelStatus={modelStatusMap.get(model.id)} onEdit={onEditModel} onRemove={onRemoveModel} disabled={disabled} From 2008d70707bd66ded6de1d86574dd47aacd35733 Mon Sep 17 00:00:00 2001 From: Shemol Date: Sat, 27 Dec 2025 18:00:20 +0800 Subject: [PATCH 06/11] fix(memory): fix global memory settings submit failure (#12147) --- .../MemorySettings/MemorySettingsModal.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/pages/settings/MemorySettings/MemorySettingsModal.tsx b/src/renderer/src/pages/settings/MemorySettings/MemorySettingsModal.tsx index 509e54e54a..680bfbec8e 100644 --- a/src/renderer/src/pages/settings/MemorySettings/MemorySettingsModal.tsx +++ b/src/renderer/src/pages/settings/MemorySettings/MemorySettingsModal.tsx @@ -3,7 +3,7 @@ import InputEmbeddingDimension from '@renderer/components/InputEmbeddingDimensio import ModelSelector from '@renderer/components/ModelSelector' import { InfoTooltip } from '@renderer/components/TooltipIcons' import { isEmbeddingModel, isRerankModel } from '@renderer/config/models' -import { getModel, useModel } from '@renderer/hooks/useModel' +import { useModel } from '@renderer/hooks/useModel' import { useProviders } from '@renderer/hooks/useProvider' import { getModelUniqId } from '@renderer/services/ModelService' import { selectMemoryConfig, updateMemoryConfig } from '@renderer/store/memory' @@ -55,8 +55,12 @@ const MemorySettingsModal: FC = ({ visible, onSubmit, const handleFormSubmit = async (values: formValue) => { try { // Convert model IDs back to Model objects - const llmModel = getModel(values.llmModel) - const embeddingModel = getModel(values.embeddingModel) + // values.llmModel and values.embeddingModel are JSON strings from getModelUniqId() + // e.g., '{"id":"gpt-4","provider":"openai"}' + // We need to find models by comparing with getModelUniqId() result + const allModels = providers.flatMap((p) => p.models) + const llmModel = allModels.find((m) => getModelUniqId(m) === values.llmModel) + const embeddingModel = allModels.find((m) => getModelUniqId(m) === values.embeddingModel) if (embeddingModel) { setLoading(true) @@ -141,7 +145,9 @@ const MemorySettingsModal: FC = ({ visible, onSubmit, shouldUpdate={(prevValues, currentValues) => prevValues.embeddingModel !== currentValues.embeddingModel}> {({ getFieldValue }) => { const embeddingModelId = getFieldValue('embeddingModel') - const embeddingModel = getModel(embeddingModelId) + // embeddingModelId is a JSON string from getModelUniqId(), find model by comparing + const allModels = providers.flatMap((p) => p.models) + const embeddingModel = allModels.find((m) => getModelUniqId(m) === embeddingModelId) return ( Date: Sat, 27 Dec 2025 20:04:51 +0800 Subject: [PATCH 07/11] fix: shortcut icons sorting disorder (#12151) --- src/renderer/src/pages/home/Inputbar/InputbarTools.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/Inputbar/InputbarTools.tsx b/src/renderer/src/pages/home/Inputbar/InputbarTools.tsx index 2dc5ee88a9..1b56b37eb4 100644 --- a/src/renderer/src/pages/home/Inputbar/InputbarTools.tsx +++ b/src/renderer/src/pages/home/Inputbar/InputbarTools.tsx @@ -261,9 +261,12 @@ const InputbarTools = ({ scope, assistantId, session }: InputbarToolsNewProps) = const sourceId = source.droppableId const destinationId = destination.droppableId + const visibleKeys = visibleTools.map((t) => t.key) + const hiddenKeys = hiddenTools.map((t) => t.key) + const newToolOrder: ToolOrderConfig = { - visible: [...toolOrder.visible], - hidden: [...toolOrder.hidden] + visible: [...visibleKeys], + hidden: [...hiddenKeys] } const sourceArray = sourceId === 'inputbar-tools-visible' ? 'visible' : 'hidden' From b78df05f288bf85ad6bd15cf448c2645a7bc9c57 Mon Sep 17 00:00:00 2001 From: Phantom Date: Sun, 28 Dec 2025 15:30:01 +0800 Subject: [PATCH 08/11] fix(AssistantsTab): prevent deleting last assistant and add error message (#12162) feat(AssistantsTab): prevent deleting last assistant and add error message Add validation to prevent deleting the last assistant and show an error message when attempted. Also simplify the active assistant assignment logic when deleting an assistant. --- src/renderer/src/i18n/locales/en-us.json | 3 +++ src/renderer/src/i18n/locales/zh-cn.json | 3 +++ src/renderer/src/i18n/locales/zh-tw.json | 7 +++++-- src/renderer/src/i18n/translate/de-de.json | 7 +++++-- src/renderer/src/i18n/translate/el-gr.json | 7 +++++-- src/renderer/src/i18n/translate/es-es.json | 7 +++++-- src/renderer/src/i18n/translate/fr-fr.json | 7 +++++-- src/renderer/src/i18n/translate/ja-jp.json | 7 +++++-- src/renderer/src/i18n/translate/pt-pt.json | 7 +++++-- src/renderer/src/i18n/translate/ru-ru.json | 7 +++++-- src/renderer/src/pages/home/Tabs/AssistantsTab.tsx | 11 +++++++++-- 11 files changed, 55 insertions(+), 18 deletions(-) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 9528b4cd6b..9e60f31f00 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Deleting an assistant will delete all topics and files under the assistant. Are you sure you want to delete it?", + "error": { + "remain_one": "Not allowed to delete the last one assistant" + }, "title": "Delete Assistant" }, "edit": { diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 524f32c338..b9b07a596c 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -420,6 +420,9 @@ }, "delete": { "content": "删除助手会删除所有该助手下的话题和文件,确定要继续吗?", + "error": { + "remain_one": "不允许删除最后一个助手" + }, "title": "删除助手" }, "edit": { diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index fe30018ac5..3d613f00f4 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -420,6 +420,9 @@ }, "delete": { "content": "刪除助手會刪除所有該助手下的話題和檔案,確定要繼續嗎?", + "error": { + "remain_one": "不允許刪除最後一個助手" + }, "title": "刪除助手" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "限制搜尋結果的內容長度;超過限制的內容將被截斷。", "default_provider": "預設搜尋引擎", "free": "免費", - "is_default": "[to be translated]:Default", + "is_default": "預設", "local_provider": { "hint": "登入網站以獲得更佳搜尋結果並個人化您的搜尋設定。", "open_settings": "開啟 {{provider}} 設定", @@ -4822,7 +4825,7 @@ "search_provider": "搜尋供應商", "search_provider_placeholder": "選擇一個搜尋供應商", "search_with_time": "搜尋包含日期", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "設為預設", "subscribe": "黑名單訂閱", "subscribe_add": "新增訂閱", "subscribe_add_failed": "訂閱來源新增失敗", diff --git a/src/renderer/src/i18n/translate/de-de.json b/src/renderer/src/i18n/translate/de-de.json index e77b9dede1..402437f1e8 100644 --- a/src/renderer/src/i18n/translate/de-de.json +++ b/src/renderer/src/i18n/translate/de-de.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Das Löschen des Assistenten löscht alle Themen und Dateien unter diesem Assistenten. Möchten Sie fortfahren?", + "error": { + "remain_one": "Man darf den letzten Assistenten nicht löschen." + }, "title": "Assistent löschen" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Begrenzen Sie die Länge der Suchergebnisse, überschreitende Inhalte werden abgeschnitten", "default_provider": "Standardanbieter", "free": "Kostenlos", - "is_default": "[to be translated]:Default", + "is_default": "Standard", "local_provider": { "hint": "Melden Sie sich auf der Website an, um bessere Suchergebnisse zu erhalten und Ihre Sucheinstellungen zu personalisieren.", "open_settings": "{{provider}}-Einstellungen öffnen", @@ -4822,7 +4825,7 @@ "search_provider": "Suchanbieter", "search_provider_placeholder": "Einen Suchanbieter auswählen", "search_with_time": "Suche mit Datum", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Als Standard festlegen", "subscribe": "Schwarze Liste-Abonnement", "subscribe_add": "Abonnement hinzufügen", "subscribe_add_failed": "Abonnement-Quelle hinzufügen fehlgeschlagen", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index 1593099707..1fb0b08abb 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Η διαγραφή του βοηθού θα διαγράψει όλα τα θέματα και τα αρχεία που είναι συνδεδεμένα με αυτόν. Είστε σίγουροι πως θέλετε να συνεχίσετε;", + "error": { + "remain_one": "Δεν επιτρέπεται η διαγραφή του τελευταίου βοηθού" + }, "title": "Διαγραφή βοηθού" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Περιορίζει το μήκος του περιεχομένου των αποτελεσμάτων αναζήτησης, το περιεχόμενο πέραν του ορίου θα περικοπεί", "default_provider": "Προεπιλεγμένος Πάροχος", "free": "Δωρεάν", - "is_default": "[to be translated]:Default", + "is_default": "Προεπιλογή", "local_provider": { "hint": "Συνδεθείτε στην ιστοσελίδα για να λάβετε καλύτερα αποτελέσματα αναζήτησης και να εξατομικεύσετε τις ρυθμίσεις αναζήτησής σας.", "open_settings": "Άνοιγμα Ρυθμίσεων {{provider}}", @@ -4822,7 +4825,7 @@ "search_provider": "Πάροχος αναζήτησης", "search_provider_placeholder": "Επιλέξτε έναν πάροχο αναζήτησης", "search_with_time": "Αναζήτηση με ημερομηνία", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Ορισμός ως προεπιλογή", "subscribe": "Εγγραφή σε μαύρη λίστα", "subscribe_add": "Προσθήκη εγγραφής", "subscribe_add_failed": "Η προσθήκη της ροής συνδρομής απέτυχε", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index 56f06b1b53..1aa78e82dd 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Eliminar el asistente borrará todos los temas y archivos asociados. ¿Está seguro de que desea continuar?", + "error": { + "remain_one": "No se puede eliminar el último asistente" + }, "title": "Eliminar Asistente" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Limita la longitud del contenido en los resultados de búsqueda; el contenido que exceda el límite será truncado", "default_provider": "Proveedor Predeterminado", "free": "Gratis", - "is_default": "[to be translated]:Default", + "is_default": "Por defecto", "local_provider": { "hint": "Inicia sesión en el sitio web para obtener mejores resultados de búsqueda y personalizar tu configuración de búsqueda.", "open_settings": "Abrir configuración de {{provider}}", @@ -4822,7 +4825,7 @@ "search_provider": "Proveedor de búsqueda", "search_provider_placeholder": "Seleccione un proveedor de búsqueda", "search_with_time": "Buscar con fecha", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Establecer como predeterminado", "subscribe": "Suscripción a lista negra", "subscribe_add": "Añadir suscripción", "subscribe_add_failed": "Error al agregar la fuente de suscripción", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 4e8f2ac8e6..4906109228 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -420,6 +420,9 @@ }, "delete": { "content": "La suppression de l'aide supprimera tous les sujets et fichiers sous l'aide. Êtes-vous sûr de vouloir la supprimer ?", + "error": { + "remain_one": "Interdiction de supprimer le dernier assistant" + }, "title": "Supprimer l'Aide" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Limiter la longueur du contenu des résultats de recherche ; le contenu dépassant cette limite sera tronqué", "default_provider": "Fournisseur par défaut", "free": "Gratuit", - "is_default": "[to be translated]:Default", + "is_default": "Défaut", "local_provider": { "hint": "Connectez-vous au site Web pour obtenir de meilleurs résultats de recherche et personnaliser vos paramètres de recherche.", "open_settings": "Ouvrir les paramètres de {{provider}}", @@ -4822,7 +4825,7 @@ "search_provider": "Fournisseur de recherche", "search_provider_placeholder": "Sélectionnez un fournisseur de recherche", "search_with_time": "Rechercher avec date", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Définir par défaut", "subscribe": "Abonnement à la liste noire", "subscribe_add": "Ajouter un abonnement", "subscribe_add_failed": "Échec de l'ajout de la source d'abonnement", diff --git a/src/renderer/src/i18n/translate/ja-jp.json b/src/renderer/src/i18n/translate/ja-jp.json index 58ee184061..950fef7130 100644 --- a/src/renderer/src/i18n/translate/ja-jp.json +++ b/src/renderer/src/i18n/translate/ja-jp.json @@ -420,6 +420,9 @@ }, "delete": { "content": "アシスタントを削除すると、そのアシスタントのすべてのトピックとファイルが削除されます。削除しますか?", + "error": { + "remain_one": "最後の1人のアシスタントは削除できません" + }, "title": "アシスタントを削除" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "検索結果のコンテンツの長さを制限します。制限を超えるコンテンツは切り捨てられます。", "default_provider": "デフォルトプロバイダー", "free": "無料", - "is_default": "[to be translated]:Default", + "is_default": "デフォルト", "local_provider": { "hint": "ウェブサイトにログインして、より良い検索結果を得て、検索設定をパーソナライズしてください。", "open_settings": "{{provider}}設定を開く", @@ -4822,7 +4825,7 @@ "search_provider": "検索サービスプロバイダー", "search_provider_placeholder": "検索サービスプロバイダーを選択する", "search_with_time": "日付を含む検索", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "既定として設定", "subscribe": "ブラックリスト購読", "subscribe_add": "購読を追加", "subscribe_add_failed": "購読ソースの追加に失敗しました", diff --git a/src/renderer/src/i18n/translate/pt-pt.json b/src/renderer/src/i18n/translate/pt-pt.json index 553795f6b3..73c8e28e4d 100644 --- a/src/renderer/src/i18n/translate/pt-pt.json +++ b/src/renderer/src/i18n/translate/pt-pt.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Excluir o assistente removerá todos os tópicos e arquivos sob esse assistente. Tem certeza de que deseja continuar?", + "error": { + "remain_one": "Não é permitido apagar o último assistente." + }, "title": "Excluir Assistente" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Limita o comprimento do conteúdo dos resultados de pesquisa; o conteúdo excedente será truncado", "default_provider": "Provedor Padrão", "free": "Grátis", - "is_default": "[to be translated]:Default", + "is_default": "Padrão", "local_provider": { "hint": "Faça login no site para obter melhores resultados de pesquisa e personalizar suas configurações de busca.", "open_settings": "Abrir Configurações do {{provider}}", @@ -4822,7 +4825,7 @@ "search_provider": "Provedor de pesquisa", "search_provider_placeholder": "Selecione um provedor de pesquisa", "search_with_time": "Pesquisar com data", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Definir como Padrão", "subscribe": "Assinatura de lista negra", "subscribe_add": "Adicionar assinatura", "subscribe_add_failed": "Falha ao adicionar a fonte de subscrição", diff --git a/src/renderer/src/i18n/translate/ru-ru.json b/src/renderer/src/i18n/translate/ru-ru.json index 489e8b4695..200b03e6c1 100644 --- a/src/renderer/src/i18n/translate/ru-ru.json +++ b/src/renderer/src/i18n/translate/ru-ru.json @@ -420,6 +420,9 @@ }, "delete": { "content": "Удаление ассистента удалит все топики и файлы под ассистентом. Вы уверены, что хотите удалить его?", + "error": { + "remain_one": "Нельзя удалить последнего помощника" + }, "title": "Удалить ассистента" }, "edit": { @@ -4805,7 +4808,7 @@ "content_limit_tooltip": "Ограничить длину контента в результатах поиска; контент, превышающий лимит, будет усечен.", "default_provider": "Поставщик по умолчанию", "free": "Бесплатно", - "is_default": "[to be translated]:Default", + "is_default": "По умолчанию", "local_provider": { "hint": "Войдите на сайт, чтобы получать более точные результаты поиска и настроить параметры поиска под себя.", "open_settings": "Открыть настройки {{provider}}", @@ -4822,7 +4825,7 @@ "search_provider": "поиск сервисного провайдера", "search_provider_placeholder": "Выберите поставщика поисковых услуг", "search_with_time": "Поиск, содержащий дату", - "set_as_default": "[to be translated]:Set as Default", + "set_as_default": "Установить по умолчанию", "subscribe": "Подписка на черный список", "subscribe_add": "Добавить подписку", "subscribe_add_failed": "Не удалось добавить источник подписки", diff --git a/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx b/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx index 3c0c9cf802..79d7f64d7a 100644 --- a/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx +++ b/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx @@ -9,6 +9,7 @@ import { useTags } from '@renderer/hooks/useTags' import type { Assistant, AssistantsSortType, Topic } from '@renderer/types' import type { FC } from 'react' import { useCallback, useRef, useState } from 'react' +import { useTranslation } from 'react-i18next' import styled from 'styled-components' import UnifiedAddButton from './components/UnifiedAddButton' @@ -32,6 +33,7 @@ const AssistantsTab: FC = (props) => { const { apiServerConfig } = useApiServer() const apiServerEnabled = apiServerConfig.enabled const { chat } = useRuntime() + const { t } = useTranslation() // Agent related hooks const { agents, deleteAgent, isLoading: agentsLoading, error: agentsError } = useAgents() @@ -75,13 +77,18 @@ const AssistantsTab: FC = (props) => { const onDeleteAssistant = useCallback( (assistant: Assistant) => { const remaining = assistants.filter((a) => a.id !== assistant.id) + if (remaining.length === 0) { + window.toast.error(t('assistants.delete.error.remain_one')) + return + } + if (assistant.id === activeAssistant?.id) { const newActive = remaining[remaining.length - 1] - newActive ? setActiveAssistant(newActive) : onCreateDefaultAssistant() + setActiveAssistant(newActive) } removeAssistant(assistant.id) }, - [activeAssistant, assistants, removeAssistant, setActiveAssistant, onCreateDefaultAssistant] + [assistants, activeAssistant?.id, removeAssistant, t, setActiveAssistant] ) const handleSortByChange = useCallback( From 5ff173fcc7ffa39f0c45b84fbdacefe55432320b Mon Sep 17 00:00:00 2001 From: SuYao Date: Sun, 28 Dec 2025 17:04:45 +0800 Subject: [PATCH 09/11] fix(ollama): improve reasoningEffort handling in providerOptions (#12089) * fix(ollama): improve reasoningEffort handling in providerOptions * fix(ollama): update reasoning effort handling and add support for gpt-oss models * fix(ollama): update think option to support 'low', 'medium', and 'high' values * fix(ollama): update comment to clarify accepted reasoning effort values for gpt-oss models --- ...-ai-provider-v2-npm-1.5.5-8bef249af9.patch | 12 +++++----- src/renderer/src/aiCore/utils/options.ts | 6 +++-- .../config/models/__tests__/reasoning.test.ts | 22 ++++++++++++++++++- src/renderer/src/config/models/reasoning.ts | 5 +++++ src/renderer/src/types/index.ts | 1 + yarn.lock | 4 ++-- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch b/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch index ea14381539..c306bef6e5 100644 --- a/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch +++ b/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch @@ -7,7 +7,7 @@ index 8dd9b498050dbecd8dd6b901acf1aa8ca38a49af..ed644349c9d38fe2a66b2fb44214f7c1 type OllamaChatModelId = "athene-v2" | "athene-v2:72b" | "aya-expanse" | "aya-expanse:8b" | "aya-expanse:32b" | "codegemma" | "codegemma:2b" | "codegemma:7b" | "codellama" | "codellama:7b" | "codellama:13b" | "codellama:34b" | "codellama:70b" | "codellama:code" | "codellama:python" | "command-r" | "command-r:35b" | "command-r-plus" | "command-r-plus:104b" | "command-r7b" | "command-r7b:7b" | "deepseek-r1" | "deepseek-r1:1.5b" | "deepseek-r1:7b" | "deepseek-r1:8b" | "deepseek-r1:14b" | "deepseek-r1:32b" | "deepseek-r1:70b" | "deepseek-r1:671b" | "deepseek-coder-v2" | "deepseek-coder-v2:16b" | "deepseek-coder-v2:236b" | "deepseek-v3" | "deepseek-v3:671b" | "devstral" | "devstral:24b" | "dolphin3" | "dolphin3:8b" | "exaone3.5" | "exaone3.5:2.4b" | "exaone3.5:7.8b" | "exaone3.5:32b" | "falcon2" | "falcon2:11b" | "falcon3" | "falcon3:1b" | "falcon3:3b" | "falcon3:7b" | "falcon3:10b" | "firefunction-v2" | "firefunction-v2:70b" | "gemma" | "gemma:2b" | "gemma:7b" | "gemma2" | "gemma2:2b" | "gemma2:9b" | "gemma2:27b" | "gemma3" | "gemma3:1b" | "gemma3:4b" | "gemma3:12b" | "gemma3:27b" | "granite3-dense" | "granite3-dense:2b" | "granite3-dense:8b" | "granite3-guardian" | "granite3-guardian:2b" | "granite3-guardian:8b" | "granite3-moe" | "granite3-moe:1b" | "granite3-moe:3b" | "granite3.1-dense" | "granite3.1-dense:2b" | "granite3.1-dense:8b" | "granite3.1-moe" | "granite3.1-moe:1b" | "granite3.1-moe:3b" | "llama2" | "llama2:7b" | "llama2:13b" | "llama2:70b" | "llama3" | "llama3:8b" | "llama3:70b" | "llama3-chatqa" | "llama3-chatqa:8b" | "llama3-chatqa:70b" | "llama3-gradient" | "llama3-gradient:8b" | "llama3-gradient:70b" | "llama3.1" | "llama3.1:8b" | "llama3.1:70b" | "llama3.1:405b" | "llama3.2" | "llama3.2:1b" | "llama3.2:3b" | "llama3.2-vision" | "llama3.2-vision:11b" | "llama3.2-vision:90b" | "llama3.3" | "llama3.3:70b" | "llama4" | "llama4:16x17b" | "llama4:128x17b" | "llama-guard3" | "llama-guard3:1b" | "llama-guard3:8b" | "llava" | "llava:7b" | "llava:13b" | "llava:34b" | "llava-llama3" | "llava-llama3:8b" | "llava-phi3" | "llava-phi3:3.8b" | "marco-o1" | "marco-o1:7b" | "mistral" | "mistral:7b" | "mistral-large" | "mistral-large:123b" | "mistral-nemo" | "mistral-nemo:12b" | "mistral-small" | "mistral-small:22b" | "mixtral" | "mixtral:8x7b" | "mixtral:8x22b" | "moondream" | "moondream:1.8b" | "openhermes" | "openhermes:v2.5" | "nemotron" | "nemotron:70b" | "nemotron-mini" | "nemotron-mini:4b" | "olmo" | "olmo:7b" | "olmo:13b" | "opencoder" | "opencoder:1.5b" | "opencoder:8b" | "phi3" | "phi3:3.8b" | "phi3:14b" | "phi3.5" | "phi3.5:3.8b" | "phi4" | "phi4:14b" | "qwen" | "qwen:7b" | "qwen:14b" | "qwen:32b" | "qwen:72b" | "qwen:110b" | "qwen2" | "qwen2:0.5b" | "qwen2:1.5b" | "qwen2:7b" | "qwen2:72b" | "qwen2.5" | "qwen2.5:0.5b" | "qwen2.5:1.5b" | "qwen2.5:3b" | "qwen2.5:7b" | "qwen2.5:14b" | "qwen2.5:32b" | "qwen2.5:72b" | "qwen2.5-coder" | "qwen2.5-coder:0.5b" | "qwen2.5-coder:1.5b" | "qwen2.5-coder:3b" | "qwen2.5-coder:7b" | "qwen2.5-coder:14b" | "qwen2.5-coder:32b" | "qwen3" | "qwen3:0.6b" | "qwen3:1.7b" | "qwen3:4b" | "qwen3:8b" | "qwen3:14b" | "qwen3:30b" | "qwen3:32b" | "qwen3:235b" | "qwq" | "qwq:32b" | "sailor2" | "sailor2:1b" | "sailor2:8b" | "sailor2:20b" | "shieldgemma" | "shieldgemma:2b" | "shieldgemma:9b" | "shieldgemma:27b" | "smallthinker" | "smallthinker:3b" | "smollm" | "smollm:135m" | "smollm:360m" | "smollm:1.7b" | "tinyllama" | "tinyllama:1.1b" | "tulu3" | "tulu3:8b" | "tulu3:70b" | (string & {}); declare const ollamaProviderOptions: z.ZodObject<{ - think: z.ZodOptional; -+ think: z.ZodOptional]>>; ++ think: z.ZodOptional, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>; options: z.ZodOptional; repeat_last_n: z.ZodOptional; @@ -29,7 +29,7 @@ index 8dd9b498050dbecd8dd6b901acf1aa8ca38a49af..ed644349c9d38fe2a66b2fb44214f7c1 declare const ollamaCompletionProviderOptions: z.ZodObject<{ - think: z.ZodOptional; -+ think: z.ZodOptional]>>; ++ think: z.ZodOptional, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>; user: z.ZodOptional; suffix: z.ZodOptional; echo: z.ZodOptional; @@ -42,7 +42,7 @@ index 35b5142ce8476ce2549ed7c2ec48e7d8c46c90d9..2ef64dc9a4c2be043e6af608241a6a83 // src/completion/ollama-completion-language-model.ts var ollamaCompletionProviderOptions = import_v42.z.object({ - think: import_v42.z.boolean().optional(), -+ think: import_v42.z.union([import_v42.z.boolean(), import_v42.z.enum(['low', 'medium', 'high'])]).optional(), ++ think: import_v42.z.union([import_v42.z.boolean(), import_v42.z.literal('low'), import_v42.z.literal('medium'), import_v42.z.literal('high')]).optional(), user: import_v42.z.string().optional(), suffix: import_v42.z.string().optional(), echo: import_v42.z.boolean().optional() @@ -64,7 +64,7 @@ index 35b5142ce8476ce2549ed7c2ec48e7d8c46c90d9..2ef64dc9a4c2be043e6af608241a6a83 * Only supported by certain models like DeepSeek R1 and Qwen 3. */ - think: import_v44.z.boolean().optional(), -+ think: import_v44.z.union([import_v44.z.boolean(), import_v44.z.enum(['low', 'medium', 'high'])]).optional(), ++ think: import_v44.z.union([import_v44.z.boolean(), import_v44.z.literal('low'), import_v44.z.literal('medium'), import_v44.z.literal('high')]).optional(), options: import_v44.z.object({ num_ctx: import_v44.z.number().optional(), repeat_last_n: import_v44.z.number().optional(), @@ -97,7 +97,7 @@ index e2a634a78d80ac9542f2cc4f96cf2291094b10cf..67b23efce3c1cf4f026693d3ff924698 // src/completion/ollama-completion-language-model.ts var ollamaCompletionProviderOptions = z2.object({ - think: z2.boolean().optional(), -+ think: z2.union([z2.boolean(), z2.enum(['low', 'medium', 'high'])]).optional(), ++ think: z2.union([z2.boolean(), z2.literal('low'), z2.literal('medium'), z2.literal('high')]).optional(), user: z2.string().optional(), suffix: z2.string().optional(), echo: z2.boolean().optional() @@ -119,7 +119,7 @@ index e2a634a78d80ac9542f2cc4f96cf2291094b10cf..67b23efce3c1cf4f026693d3ff924698 * Only supported by certain models like DeepSeek R1 and Qwen 3. */ - think: z4.boolean().optional(), -+ think: z4.union([z4.boolean(), z4.enum(['low', 'medium', 'high'])]).optional(), ++ think: z4.union([z4.boolean(), z4.literal('low'), z4.literal('medium'), z4.literal('high')]).optional(), options: z4.object({ num_ctx: z4.number().optional(), repeat_last_n: z4.number().optional(), diff --git a/src/renderer/src/aiCore/utils/options.ts b/src/renderer/src/aiCore/utils/options.ts index 36778b7570..8dc7a10af9 100644 --- a/src/renderer/src/aiCore/utils/options.ts +++ b/src/renderer/src/aiCore/utils/options.ts @@ -580,8 +580,10 @@ function buildOllamaProviderOptions( const reasoningEffort = assistant.settings?.reasoning_effort if (enableReasoning) { if (isOpenAIOpenWeightModel(model)) { - // @ts-ignore upstream type error - providerOptions.think = reasoningEffort as any + // For gpt-oss models, Ollama accepts: 'low' | 'medium' | 'high' + if (reasoningEffort === 'low' || reasoningEffort === 'medium' || reasoningEffort === 'high') { + providerOptions.think = reasoningEffort + } } else { providerOptions.think = !['none', undefined].includes(reasoningEffort) } diff --git a/src/renderer/src/config/models/__tests__/reasoning.test.ts b/src/renderer/src/config/models/__tests__/reasoning.test.ts index 6b00a8912b..56f9cd0b60 100644 --- a/src/renderer/src/config/models/__tests__/reasoning.test.ts +++ b/src/renderer/src/config/models/__tests__/reasoning.test.ts @@ -680,7 +680,12 @@ describe('getThinkModelType - Comprehensive Coverage', () => { expect(getThinkModelType(createModel({ id: 'o3' }))).toBe('o') expect(getThinkModelType(createModel({ id: 'o3-mini' }))).toBe('o') expect(getThinkModelType(createModel({ id: 'o4' }))).toBe('o') - expect(getThinkModelType(createModel({ id: 'gpt-oss-reasoning' }))).toBe('o') + }) + + it('should return gpt_oss for gpt-oss models', () => { + expect(getThinkModelType(createModel({ id: 'gpt-oss' }))).toBe('gpt_oss') + expect(getThinkModelType(createModel({ id: 'gpt-oss:20b' }))).toBe('gpt_oss') + expect(getThinkModelType(createModel({ id: 'gpt-oss-reasoning' }))).toBe('gpt_oss') }) }) @@ -1763,6 +1768,21 @@ describe('getModelSupportedReasoningEffortOptions', () => { 'medium', 'high' ]) + }) + + it('should return correct options for gpt-oss models', () => { + expect(getModelSupportedReasoningEffortOptions(createModel({ id: 'gpt-oss' }))).toEqual([ + 'default', + 'low', + 'medium', + 'high' + ]) + expect(getModelSupportedReasoningEffortOptions(createModel({ id: 'gpt-oss:20b' }))).toEqual([ + 'default', + 'low', + 'medium', + 'high' + ]) expect(getModelSupportedReasoningEffortOptions(createModel({ id: 'gpt-oss-reasoning' }))).toEqual([ 'default', 'low', diff --git a/src/renderer/src/config/models/reasoning.ts b/src/renderer/src/config/models/reasoning.ts index 5d48e9a122..b2b6119b76 100644 --- a/src/renderer/src/config/models/reasoning.ts +++ b/src/renderer/src/config/models/reasoning.ts @@ -17,6 +17,7 @@ import { isGPT52ProModel, isGPT52SeriesModel, isOpenAIDeepResearchModel, + isOpenAIOpenWeightModel, isOpenAIReasoningModel, isSupportedReasoningEffortOpenAIModel } from './openai' @@ -41,6 +42,7 @@ export const MODEL_SUPPORTED_REASONING_EFFORT = { gpt5_2: ['none', 'low', 'medium', 'high', 'xhigh'] as const, gpt5pro: ['high'] as const, gpt52pro: ['medium', 'high', 'xhigh'] as const, + gpt_oss: ['low', 'medium', 'high'] as const, grok: ['low', 'high'] as const, grok4_fast: ['auto'] as const, gemini2_flash: ['low', 'medium', 'high', 'auto'] as const, @@ -72,6 +74,7 @@ export const MODEL_SUPPORTED_OPTIONS: ThinkingOptionConfig = { gpt5_2: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.gpt5_2] as const, gpt5_1_codex_max: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.gpt5_1_codex_max] as const, gpt52pro: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.gpt52pro] as const, + gpt_oss: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.gpt_oss] as const, grok: ['default', ...MODEL_SUPPORTED_REASONING_EFFORT.grok] as const, grok4_fast: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.grok4_fast] as const, gemini2_flash: ['default', 'none', ...MODEL_SUPPORTED_REASONING_EFFORT.gemini2_flash] as const, @@ -127,6 +130,8 @@ const _getThinkModelType = (model: Model): ThinkingModelType => { thinkingModelType = 'gpt5pro' } } + } else if (isOpenAIOpenWeightModel(model)) { + thinkingModelType = 'gpt_oss' } else if (isSupportedReasoningEffortOpenAIModel(model)) { thinkingModelType = 'o' } else if (isGrok4FastReasoningModel(model)) { diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index a75fc1ed3e..b87271930b 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -92,6 +92,7 @@ const ThinkModelTypes = [ 'gpt5_2', 'gpt5pro', 'gpt52pro', + 'gpt_oss', 'grok', 'grok4_fast', 'gemini2_flash', diff --git a/yarn.lock b/yarn.lock index b6b87c568a..3fe6d2c151 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20209,13 +20209,13 @@ __metadata: "ollama-ai-provider-v2@patch:ollama-ai-provider-v2@npm%3A1.5.5#~/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch": version: 1.5.5 - resolution: "ollama-ai-provider-v2@patch:ollama-ai-provider-v2@npm%3A1.5.5#~/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch::version=1.5.5&hash=16c016" + resolution: "ollama-ai-provider-v2@patch:ollama-ai-provider-v2@npm%3A1.5.5#~/.yarn/patches/ollama-ai-provider-v2-npm-1.5.5-8bef249af9.patch::version=1.5.5&hash=0aef28" dependencies: "@ai-sdk/provider": "npm:^2.0.0" "@ai-sdk/provider-utils": "npm:^3.0.17" peerDependencies: zod: ^4.0.16 - checksum: 10c0/aa6bd3415d08f7bbd1a3051f45b1cd3a8fa8bb01413e98de45e8888f64e6b12bca6e340453a3e82e4193ca5354397f524c6c0f7b3e9996d70f53c81374c69180 + checksum: 10c0/32ca1f543ee791ac96061a5f6d8899c00644eeb774b3b951ca1e3e3810b60753acacf8229b2c1ba099b25a01732c54e51e0df44d11f4d90ae201f483d41aa149 languageName: node linkType: hard From cb93eee29d6a90f994687b2734bd9414d8b296e8 Mon Sep 17 00:00:00 2001 From: fullex <0xfullex@gmail.com> Date: Sun, 28 Dec 2025 17:38:37 +0800 Subject: [PATCH 10/11] chore: mark multiple services and components as 'will deprecated' for v2 refactor - Added deprecation notices to various services and components, indicating they are scheduled for removal in v2.0.0. - Noted that feature PRs affecting these files are currently blocked, and only critical bug fixes will be accepted during the migration phase. - Provided context and status links for ongoing v2 refactoring efforts. This change is part of the preparation for the upcoming major version update. --- src/main/services/BackupManager.ts | 16 ++++++++++++++++ src/main/services/CacheService.ts | 16 ++++++++++++++++ src/main/services/ConfigManager.ts | 16 ++++++++++++++++ src/main/services/ReduxService.ts | 16 ++++++++++++++++ src/main/services/ShortcutService.ts | 16 ++++++++++++++++ src/main/services/StoreSyncService.ts | 16 ++++++++++++++++ .../services/agents/database/DatabaseManager.ts | 16 ++++++++++++++++ src/main/services/agents/drizzle.config.ts | 16 ++++++++++++++++ src/renderer/src/databases/index.ts | 16 ++++++++++++++++ src/renderer/src/databases/upgrades.ts | 16 ++++++++++++++++ src/renderer/src/hooks/useSettings.ts | 16 ++++++++++++++++ src/renderer/src/hooks/useShortcuts.ts | 16 ++++++++++++++++ src/renderer/src/hooks/useStore.ts | 16 ++++++++++++++++ .../src/services/db/AgentMessageDataSource.ts | 16 ++++++++++++++++ src/renderer/src/services/db/DbService.ts | 16 ++++++++++++++++ .../src/services/db/DexieMessageDataSource.ts | 16 ++++++++++++++++ src/renderer/src/services/db/index.ts | 16 ++++++++++++++++ src/renderer/src/store/assistants.ts | 16 ++++++++++++++++ src/renderer/src/store/backup.ts | 16 ++++++++++++++++ src/renderer/src/store/codeTools.ts | 16 ++++++++++++++++ src/renderer/src/store/copilot.ts | 16 ++++++++++++++++ src/renderer/src/store/index.ts | 16 ++++++++++++++++ src/renderer/src/store/inputTools.ts | 16 ++++++++++++++++ src/renderer/src/store/knowledge.ts | 16 ++++++++++++++++ src/renderer/src/store/llm.ts | 16 ++++++++++++++++ src/renderer/src/store/mcp.ts | 16 ++++++++++++++++ src/renderer/src/store/memory.ts | 16 ++++++++++++++++ src/renderer/src/store/messageBlock.ts | 16 ++++++++++++++++ src/renderer/src/store/migrate.ts | 16 ++++++++++++++++ src/renderer/src/store/minapps.ts | 16 ++++++++++++++++ src/renderer/src/store/newMessage.ts | 16 ++++++++++++++++ src/renderer/src/store/note.ts | 16 ++++++++++++++++ src/renderer/src/store/nutstore.ts | 16 ++++++++++++++++ src/renderer/src/store/ocr.ts | 16 ++++++++++++++++ src/renderer/src/store/paintings.ts | 16 ++++++++++++++++ src/renderer/src/store/preprocess.ts | 16 ++++++++++++++++ src/renderer/src/store/runtime.ts | 16 ++++++++++++++++ src/renderer/src/store/selectionStore.ts | 16 ++++++++++++++++ src/renderer/src/store/settings.ts | 16 ++++++++++++++++ src/renderer/src/store/shortcuts.ts | 16 ++++++++++++++++ src/renderer/src/store/tabs.ts | 16 ++++++++++++++++ src/renderer/src/store/thunk/knowledgeThunk.ts | 16 ++++++++++++++++ src/renderer/src/store/thunk/messageThunk.ts | 16 ++++++++++++++++ src/renderer/src/store/thunk/messageThunk.v2.ts | 16 ++++++++++++++++ src/renderer/src/store/toolPermissions.ts | 16 ++++++++++++++++ src/renderer/src/store/translate.ts | 16 ++++++++++++++++ src/renderer/src/store/websearch.ts | 16 ++++++++++++++++ 47 files changed, 752 insertions(+) diff --git a/src/main/services/BackupManager.ts b/src/main/services/BackupManager.ts index 46b78ed5a9..e08bbd4d7b 100644 --- a/src/main/services/BackupManager.ts +++ b/src/main/services/BackupManager.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { IpcChannel } from '@shared/IpcChannel' import type { WebDavConfig } from '@types' diff --git a/src/main/services/CacheService.ts b/src/main/services/CacheService.ts index d2984a9984..4f2e2f8b20 100644 --- a/src/main/services/CacheService.ts +++ b/src/main/services/CacheService.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ interface CacheItem { data: T timestamp: number diff --git a/src/main/services/ConfigManager.ts b/src/main/services/ConfigManager.ts index 6f2bbd44a4..98537c85a1 100644 --- a/src/main/services/ConfigManager.ts +++ b/src/main/services/ConfigManager.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { UpgradeChannel } from '@shared/config/constant' import { defaultLanguage, ZOOM_SHORTCUTS } from '@shared/config/constant' import type { LanguageVarious, Shortcut } from '@types' diff --git a/src/main/services/ReduxService.ts b/src/main/services/ReduxService.ts index cdbaff42bf..8880691a24 100644 --- a/src/main/services/ReduxService.ts +++ b/src/main/services/ReduxService.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { IpcChannel } from '@shared/IpcChannel' import { ipcMain } from 'electron' diff --git a/src/main/services/ShortcutService.ts b/src/main/services/ShortcutService.ts index a84d8ac248..c99e0b5dc0 100644 --- a/src/main/services/ShortcutService.ts +++ b/src/main/services/ShortcutService.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { handleZoomFactor } from '@main/utils/zoom' import type { Shortcut } from '@types' diff --git a/src/main/services/StoreSyncService.ts b/src/main/services/StoreSyncService.ts index 57f07195b6..6013afdd57 100644 --- a/src/main/services/StoreSyncService.ts +++ b/src/main/services/StoreSyncService.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { IpcChannel } from '@shared/IpcChannel' import type { StoreSyncAction } from '@types' import { BrowserWindow, ipcMain } from 'electron' diff --git a/src/main/services/agents/database/DatabaseManager.ts b/src/main/services/agents/database/DatabaseManager.ts index f4b13971c7..913f9e4a66 100644 --- a/src/main/services/agents/database/DatabaseManager.ts +++ b/src/main/services/agents/database/DatabaseManager.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { type Client, createClient } from '@libsql/client' import { loggerService } from '@logger' import type { LibSQLDatabase } from 'drizzle-orm/libsql' diff --git a/src/main/services/agents/drizzle.config.ts b/src/main/services/agents/drizzle.config.ts index e12518c069..7278883c11 100644 --- a/src/main/services/agents/drizzle.config.ts +++ b/src/main/services/agents/drizzle.config.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ /** * Drizzle Kit configuration for agents database */ diff --git a/src/renderer/src/databases/index.ts b/src/renderer/src/databases/index.ts index fc47e37cb7..f70b81673f 100644 --- a/src/renderer/src/databases/index.ts +++ b/src/renderer/src/databases/index.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { CustomTranslateLanguage, FileMetadata, diff --git a/src/renderer/src/databases/upgrades.ts b/src/renderer/src/databases/upgrades.ts index 8f952e245b..83e77e7c42 100644 --- a/src/renderer/src/databases/upgrades.ts +++ b/src/renderer/src/databases/upgrades.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { LanguagesEnum } from '@renderer/config/translate' import type { LegacyMessage as OldMessage, Topic, TranslateLanguageCode } from '@renderer/types' diff --git a/src/renderer/src/hooks/useSettings.ts b/src/renderer/src/hooks/useSettings.ts index 55d40e435d..3a3de7f89a 100644 --- a/src/renderer/src/hooks/useSettings.ts +++ b/src/renderer/src/hooks/useSettings.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import store, { useAppDispatch, useAppSelector } from '@renderer/store' import type { AssistantIconType, SendMessageShortcut, SettingsState } from '@renderer/store/settings' import { diff --git a/src/renderer/src/hooks/useShortcuts.ts b/src/renderer/src/hooks/useShortcuts.ts index ef92a5f970..ea1c0cab67 100644 --- a/src/renderer/src/hooks/useShortcuts.ts +++ b/src/renderer/src/hooks/useShortcuts.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { isMac, isWin } from '@renderer/config/constant' import { useAppSelector } from '@renderer/store' import { orderBy } from 'lodash' diff --git a/src/renderer/src/hooks/useStore.ts b/src/renderer/src/hooks/useStore.ts index bb77e1f0da..55720b60e6 100644 --- a/src/renderer/src/hooks/useStore.ts +++ b/src/renderer/src/hooks/useStore.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { CHERRYAI_PROVIDER } from '@renderer/config/providers' import store, { useAppDispatch, useAppSelector } from '@renderer/store' import { diff --git a/src/renderer/src/services/db/AgentMessageDataSource.ts b/src/renderer/src/services/db/AgentMessageDataSource.ts index 4ba93d2cd5..7af7a257f8 100644 --- a/src/renderer/src/services/db/AgentMessageDataSource.ts +++ b/src/renderer/src/services/db/AgentMessageDataSource.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import store from '@renderer/store' import type { AgentPersistedMessage } from '@renderer/types/agent' diff --git a/src/renderer/src/services/db/DbService.ts b/src/renderer/src/services/db/DbService.ts index cff7cb1a45..64ff945958 100644 --- a/src/renderer/src/services/db/DbService.ts +++ b/src/renderer/src/services/db/DbService.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import store from '@renderer/store' import type { Message, MessageBlock } from '@renderer/types/newMessage' diff --git a/src/renderer/src/services/db/DexieMessageDataSource.ts b/src/renderer/src/services/db/DexieMessageDataSource.ts index cbc015984a..f8bad4476f 100644 --- a/src/renderer/src/services/db/DexieMessageDataSource.ts +++ b/src/renderer/src/services/db/DexieMessageDataSource.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import db from '@renderer/databases' import FileManager from '@renderer/services/FileManager' diff --git a/src/renderer/src/services/db/index.ts b/src/renderer/src/services/db/index.ts index 9b681dc6c6..a29eeb6c04 100644 --- a/src/renderer/src/services/db/index.ts +++ b/src/renderer/src/services/db/index.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ /** * Unified data access layer for messages * Provides a consistent API for accessing messages from different sources diff --git a/src/renderer/src/store/assistants.ts b/src/renderer/src/store/assistants.ts index 51638be9f6..aaac1810ab 100644 --- a/src/renderer/src/store/assistants.ts +++ b/src/renderer/src/store/assistants.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ // @ts-nocheck import type { PayloadAction } from '@reduxjs/toolkit' import { createSelector, createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/backup.ts b/src/renderer/src/store/backup.ts index fbb3853a12..d2986b11bf 100644 --- a/src/renderer/src/store/backup.ts +++ b/src/renderer/src/store/backup.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/codeTools.ts b/src/renderer/src/store/codeTools.ts index 44070a76e4..dc3889abb1 100644 --- a/src/renderer/src/store/codeTools.ts +++ b/src/renderer/src/store/codeTools.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { Model } from '@renderer/types' diff --git a/src/renderer/src/store/copilot.ts b/src/renderer/src/store/copilot.ts index ab7e50ee84..88f9523e65 100644 --- a/src/renderer/src/store/copilot.ts +++ b/src/renderer/src/store/copilot.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 8d8c793c21..e962a52431 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { combineReducers, configureStore } from '@reduxjs/toolkit' import { useDispatch, useSelector, useStore } from 'react-redux' diff --git a/src/renderer/src/store/inputTools.ts b/src/renderer/src/store/inputTools.ts index aad87dba9f..b9d2506523 100644 --- a/src/renderer/src/store/inputTools.ts +++ b/src/renderer/src/store/inputTools.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { InputbarScope } from '@renderer/pages/home/Inputbar/types' diff --git a/src/renderer/src/store/knowledge.ts b/src/renderer/src/store/knowledge.ts index 6280a99e8d..a6a5026952 100644 --- a/src/renderer/src/store/knowledge.ts +++ b/src/renderer/src/store/knowledge.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/llm.ts b/src/renderer/src/store/llm.ts index 15f256382e..7e53f081bd 100644 --- a/src/renderer/src/store/llm.ts +++ b/src/renderer/src/store/llm.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { isLocalAi } from '@renderer/config/env' diff --git a/src/renderer/src/store/mcp.ts b/src/renderer/src/store/mcp.ts index 5b8d5bcdcf..3b94248401 100644 --- a/src/renderer/src/store/mcp.ts +++ b/src/renderer/src/store/mcp.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { createSlice, nanoid, type PayloadAction } from '@reduxjs/toolkit' import { type BuiltinMCPServer, BuiltinMCPServerNames, type MCPConfig, type MCPServer } from '@renderer/types' diff --git a/src/renderer/src/store/memory.ts b/src/renderer/src/store/memory.ts index e28b291c19..c4976d874a 100644 --- a/src/renderer/src/store/memory.ts +++ b/src/renderer/src/store/memory.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { createSlice, type PayloadAction } from '@reduxjs/toolkit' import { factExtractionPrompt, updateMemorySystemPrompt } from '@renderer/utils/memory-prompts' import type { MemoryConfig } from '@types' diff --git a/src/renderer/src/store/messageBlock.ts b/src/renderer/src/store/messageBlock.ts index ba0e11be0a..c2719cdb13 100644 --- a/src/renderer/src/store/messageBlock.ts +++ b/src/renderer/src/store/messageBlock.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { WebSearchResultBlock } from '@anthropic-ai/sdk/resources' import type OpenAI from '@cherrystudio/openai' import type { GroundingMetadata } from '@google/genai' diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index e0d3524f68..fdb6b0db14 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { nanoid } from '@reduxjs/toolkit' import { diff --git a/src/renderer/src/store/minapps.ts b/src/renderer/src/store/minapps.ts index 8ca59a5bd2..ac2a83440b 100644 --- a/src/renderer/src/store/minapps.ts +++ b/src/renderer/src/store/minapps.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { DEFAULT_MIN_APPS } from '@renderer/config/minapps' diff --git a/src/renderer/src/store/newMessage.ts b/src/renderer/src/store/newMessage.ts index cd8c0dde83..918ae3dc5b 100644 --- a/src/renderer/src/store/newMessage.ts +++ b/src/renderer/src/store/newMessage.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import type { EntityState, PayloadAction } from '@reduxjs/toolkit' import { createEntityAdapter, createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/note.ts b/src/renderer/src/store/note.ts index 25347a8764..d571552831 100644 --- a/src/renderer/src/store/note.ts +++ b/src/renderer/src/store/note.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { RootState } from '@renderer/store/index' diff --git a/src/renderer/src/store/nutstore.ts b/src/renderer/src/store/nutstore.ts index d494ec269f..bb9d426d8e 100644 --- a/src/renderer/src/store/nutstore.ts +++ b/src/renderer/src/store/nutstore.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/ocr.ts b/src/renderer/src/store/ocr.ts index 8e997bd6d5..29ee4085b7 100644 --- a/src/renderer/src/store/ocr.ts +++ b/src/renderer/src/store/ocr.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { BUILTIN_OCR_PROVIDERS, DEFAULT_OCR_PROVIDER } from '@renderer/config/ocr' diff --git a/src/renderer/src/store/paintings.ts b/src/renderer/src/store/paintings.ts index e5fc6f59e2..a7b509f531 100644 --- a/src/renderer/src/store/paintings.ts +++ b/src/renderer/src/store/paintings.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/preprocess.ts b/src/renderer/src/store/preprocess.ts index 29fc2993b7..8fee31b0ef 100644 --- a/src/renderer/src/store/preprocess.ts +++ b/src/renderer/src/store/preprocess.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { PreprocessProvider } from '@renderer/types' diff --git a/src/renderer/src/store/runtime.ts b/src/renderer/src/store/runtime.ts index 2ee7719469..66fd161dcd 100644 --- a/src/renderer/src/store/runtime.ts +++ b/src/renderer/src/store/runtime.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { AppLogo, UserAvatar } from '@renderer/config/env' diff --git a/src/renderer/src/store/selectionStore.ts b/src/renderer/src/store/selectionStore.ts index fe63ae230e..89f44dd07a 100644 --- a/src/renderer/src/store/selectionStore.ts +++ b/src/renderer/src/store/selectionStore.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { ActionItem, FilterMode, SelectionState, TriggerMode } from '@renderer/types/selectionTypes' diff --git a/src/renderer/src/store/settings.ts b/src/renderer/src/store/settings.ts index 572f722746..3ba3cc4da8 100644 --- a/src/renderer/src/store/settings.ts +++ b/src/renderer/src/store/settings.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { DEFAULT_STREAM_OPTIONS_INCLUDE_USAGE, isMac } from '@renderer/config/constant' diff --git a/src/renderer/src/store/shortcuts.ts b/src/renderer/src/store/shortcuts.ts index 9b4cc1341a..c8fabf8b04 100644 --- a/src/renderer/src/store/shortcuts.ts +++ b/src/renderer/src/store/shortcuts.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import type { Shortcut } from '@renderer/types' diff --git a/src/renderer/src/store/tabs.ts b/src/renderer/src/store/tabs.ts index 87d7342779..c539cf20a0 100644 --- a/src/renderer/src/store/tabs.ts +++ b/src/renderer/src/store/tabs.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/thunk/knowledgeThunk.ts b/src/renderer/src/store/thunk/knowledgeThunk.ts index 97c435d169..b353e0af51 100644 --- a/src/renderer/src/store/thunk/knowledgeThunk.ts +++ b/src/renderer/src/store/thunk/knowledgeThunk.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { db } from '@renderer/databases' import { addFiles as addFilesAction, addItem, updateNotes } from '@renderer/store/knowledge' diff --git a/src/renderer/src/store/thunk/messageThunk.ts b/src/renderer/src/store/thunk/messageThunk.ts index 8219fa0cce..45d7fd760a 100644 --- a/src/renderer/src/store/thunk/messageThunk.ts +++ b/src/renderer/src/store/thunk/messageThunk.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import { loggerService } from '@logger' import { AiSdkToChunkAdapter } from '@renderer/aiCore/chunk/AiSdkToChunkAdapter' import { AgentApiClient } from '@renderer/api/agent' diff --git a/src/renderer/src/store/thunk/messageThunk.v2.ts b/src/renderer/src/store/thunk/messageThunk.v2.ts index ec0aed947b..587a9baf68 100644 --- a/src/renderer/src/store/thunk/messageThunk.v2.ts +++ b/src/renderer/src/store/thunk/messageThunk.v2.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ /** * V2 implementations of message thunk functions using the unified DbService * These implementations will be gradually rolled out using feature flags diff --git a/src/renderer/src/store/toolPermissions.ts b/src/renderer/src/store/toolPermissions.ts index cd31b16af8..a283956daa 100644 --- a/src/renderer/src/store/toolPermissions.ts +++ b/src/renderer/src/store/toolPermissions.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PermissionUpdate } from '@anthropic-ai/claude-agent-sdk' import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/translate.ts b/src/renderer/src/store/translate.ts index 0e4c56e731..752a067739 100644 --- a/src/renderer/src/store/translate.ts +++ b/src/renderer/src/store/translate.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' diff --git a/src/renderer/src/store/websearch.ts b/src/renderer/src/store/websearch.ts index f166bb1949..a43db4947b 100644 --- a/src/renderer/src/store/websearch.ts +++ b/src/renderer/src/store/websearch.ts @@ -1,3 +1,19 @@ +/** + * @deprecated Scheduled for removal in v2.0.0 + * -------------------------------------------------------------------------- + * ⚠️ NOTICE: V2 DATA&UI REFACTORING (by 0xfullex) + * -------------------------------------------------------------------------- + * STOP: Feature PRs affecting this file are currently BLOCKED. + * Only critical bug fixes are accepted during this migration phase. + * + * This file is being refactored to v2 standards. + * Any non-critical changes will conflict with the ongoing work. + * + * 🔗 Context & Status: + * - Contribution Hold: https://github.com/CherryHQ/cherry-studio/issues/10954 + * - v2 Refactor PR : https://github.com/CherryHQ/cherry-studio/pull/10162 + * -------------------------------------------------------------------------- + */ import type { PayloadAction } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit' import { WEB_SEARCH_PROVIDERS } from '@renderer/config/webSearchProviders' From c242860abcfefcf61d397a0350a14998b757e55e Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 28 Dec 2025 17:39:57 +0800 Subject: [PATCH 11/11] chore(release): v1.7.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- electron-builder.yml | 78 ++++++++++++++------------------------------ package.json | 2 +- 2 files changed, 25 insertions(+), 55 deletions(-) diff --git a/electron-builder.yml b/electron-builder.yml index 11dce735c5..8af4642f05 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -134,68 +134,38 @@ artifactBuildCompleted: scripts/artifact-build-completed.js releaseInfo: releaseNotes: | - Cherry Studio 1.7.7 - New Models & UI Improvements + Cherry Studio 1.7.8 - Bug Fixes & Performance Improvements - This release adds new AI model support, OpenRouter integration, and UI redesigns. + This release focuses on bug fixes and performance optimizations. - ✨ New Features - - [Models] Add GLM-4.7 and MiniMax-M2.1 model support - - [Provider] Add OpenRouter provider support - - [OVMS] Upgrade to 2025.4 with Qwen3-4B-int4-ov preset model - - [OVMS] Close OVMS process when app quits - - [Search] Show keyword-adjacent snippets in history search - - [Painting] Add extend_params support for DMX painting - - [UI] Add MCP logo and replace Hammer icon - - 🎨 UI Improvements - - [Notes] Move notes settings to popup in NotesPage for quick access - - [WebSearch] Redesign settings with two-column layout and "Set as Default" button - - [Display] Improve font selector for long font names - - [Transfer] Rename LanDrop to LanTransfer + ⚡ Performance + - [ModelList] Improve model list loading performance 🐛 Bug Fixes - - [API] Correct aihubmix Anthropic API path - - [OpenRouter] Support GPT-5.1/5.2 reasoning effort 'none' and improve error handling - - [Thinking] Fix interleaved thinking support - - [Memory] Fix retrieval issues and enable database backup - - [Settings] Update default assistant settings to disable temperature - - [OpenAI] Add persistent server configuration support - - [Azure] Normalize Azure endpoint - - [MCP] Check system npx/uvx before falling back to bundled binaries - - [Prompt] Improve language instruction clarity - - [Models] Include GPT5.2 series in verbosity check - - [URL] Enhance urlContext validation for supported providers and models + - [Ollama] Fix new users unable to use Ollama models + - [Ollama] Improve reasoningEffort handling + - [Assistants] Prevent deleting last assistant and add error message + - [Shortcut] Fix shortcut icons sorting disorder + - [Memory] Fix global memory settings submit failure + - [Windows] Fix remember size not working for SelectionAction window + - [Anthropic] Fix API base URL handling + - [Files] Allow more file extensions - Cherry Studio 1.7.7 - 新模型与界面改进 + Cherry Studio 1.7.8 - 问题修复与性能优化 - 本次更新添加了新 AI 模型支持、OpenRouter 集成以及界面重新设计。 + 本次更新专注于问题修复和性能优化。 - ✨ 新功能 - - [模型] 添加 GLM-4.7 和 MiniMax-M2.1 模型支持 - - [服务商] 添加 OpenRouter 服务商支持 - - [OVMS] 升级至 2025.4,新增 Qwen3-4B-int4-ov 预设模型 - - [OVMS] 应用退出时关闭 OVMS 进程 - - [搜索] 历史搜索显示关键词上下文片段 - - [绘图] DMX 绘图添加扩展参数支持 - - [界面] 添加 MCP 图标并替换锤子图标 - - 🎨 界面改进 - - [笔记] 将笔记设置移至笔记页弹窗,快速访问无需离开当前页面 - - [网页搜索] 采用两栏布局重新设计设置界面,添加"设为默认"按钮 - - [显示] 改进长字体名称的字体选择器 - - [传输] LanDrop 重命名为 LanTransfer + ⚡ 性能优化 + - [模型列表] 提升模型列表加载性能 🐛 问题修复 - - [API] 修复 aihubmix Anthropic API 路径 - - [OpenRouter] 支持 GPT-5.1/5.2 reasoning effort 'none' 并改进错误处理 - - [思考] 修复交错思考支持 - - [记忆] 修复检索问题并启用数据库备份 - - [设置] 更新默认助手设置禁用温度 - - [OpenAI] 添加持久化服务器配置支持 - - [Azure] 规范化 Azure 端点 - - [MCP] 优先检查系统 npx/uvx 再回退到内置二进制文件 - - [提示词] 改进语言指令清晰度 - - [模型] GPT5.2 系列添加到 verbosity 检查 - - [URL] 增强 urlContext 对支持的服务商和模型的验证 + - [Ollama] 修复新用户无法使用 Ollama 模型的问题 + - [Ollama] 改进推理参数处理 + - [助手] 防止删除最后一个助手并添加错误提示 + - [快捷方式] 修复快捷方式图标排序混乱 + - [记忆] 修复全局记忆设置提交失败 + - [窗口] 修复 SelectionAction 窗口记住尺寸不生效 + - [Anthropic] 修复 API 地址处理 + - [文件] 允许更多文件扩展名 diff --git a/package.json b/package.json index 2c3c05daf2..250abf1b9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CherryStudio", - "version": "1.7.7", + "version": "1.7.8", "private": true, "description": "A powerful AI assistant for producer.", "main": "./out/main/index.js",