mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
* feat: add @cherrystudio/ai-sdk-provider package and integrate with CherryIN - Introduced the @cherrystudio/ai-sdk-provider package, providing a CherryIN routing solution for AI SDKs. - Updated configuration files to include the new provider. - Enhanced provider initialization to support CherryIN as a new AI provider. - Added README and documentation for usage instructions. * chore: remove deprecated @ai-sdk/google dependency and clean up package files - Removed the @ai-sdk/google dependency from package.json and yarn.lock as it is no longer needed. - Simplified the createGeminiModel function in index.ts for better readability and maintainability. * feat: update CherryIN provider integration and dependencies - Updated @ai-sdk/anthropic and @ai-sdk/google dependencies to their latest versions in package.json and yarn.lock. - Introduced a new CherryInProvider implementation in cherryin-provider.ts, enhancing support for CherryIN API. - Refactored provider initialization to include CherryIN as a supported provider in schemas.ts and options.ts. - Updated web search plugin to utilize the new CherryIN provider capabilities. - Cleaned up and organized imports across various files for better maintainability. * chore: clean up tsconfig and remove unnecessary nullish coalescing in CherryIn provider - Simplified tsconfig.json by consolidating exclude and include arrays. - Removed nullish coalescing in cherryin-provider.ts for cleaner header handling in model initialization. * fix: remove console.log from webSearchPlugin to clean up code - Eliminated unnecessary console.log statement in the webSearchPlugin to enhance code clarity and maintainability. * fix(i18n): Auto update translations for PR #10715 * chore: update yarn.lock with new package versions and dependencies - Added new versions for @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/provider-utils, and eventsource-parser. - Updated dependencies and peerDependencies for the newly added packages. * feat: enhance CherryIn provider with chat model support and custom fetch logic - Introduced CherryInOpenAIChatLanguageModel to handle chat-specific configurations. - Updated createChatModel to support CherryIn chat models. - Modified webSearchPlugin to accommodate both 'cherryin' and 'cherryin-chat' provider IDs. - Added 'cherryin-chat' provider ID to schemas and provider configurations. - Adjusted provider factory to correctly set provider ID for chat mode. - Enhanced web search utility to handle CherryIn chat models. * 🐛 fix: resolve cherryin provider lint errors and web search config - Add fetch global variable declaration for ai-sdk-provider in oxlintrc - Fix endpoint_type mapping fallback logic in cherryin provider - Add error handling comment for better code readability * chore(dependencies): update AI SDK packages and patches - Added new versions for @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/provider-utils in yarn.lock. - Updated @ai-sdk/openai dependency to use a patch version in package.json. - Included @cherrystudio/ai-sdk-provider as a new dependency in the workspace. * chore(dependencies): update peer dependencies and installation instructions - Removed specific versions of @ai-sdk/anthropic and @ai-sdk/google from package.json and yarn.lock. - Updated peer dependencies in package.json to include @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/openai. - Revised installation instructions in README.md to reflect the new dependencies. --------- Co-authored-by: GitHub Action <action@github.com>
158 lines
4.9 KiB
JSON
158 lines
4.9 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"categories": {},
|
|
"env": {
|
|
"es2022": true
|
|
},
|
|
"globals": {},
|
|
"ignorePatterns": [
|
|
"node_modules/**",
|
|
"build/**",
|
|
"dist/**",
|
|
"out/**",
|
|
"local/**",
|
|
".yarn/**",
|
|
".gitignore",
|
|
"scripts/cloudflare-worker.js",
|
|
"src/main/integration/nutstore/sso/lib/**",
|
|
"src/main/integration/cherryai/index.js",
|
|
"src/main/integration/nutstore/sso/lib/**",
|
|
"src/renderer/src/ui/**",
|
|
"packages/**/dist",
|
|
"eslint.config.mjs"
|
|
],
|
|
"overrides": [
|
|
{
|
|
"env": {
|
|
"node": true
|
|
},
|
|
"files": ["src/main/**", "resources/scripts/**", "scripts/**", "playwright.config.ts", "electron.vite.config.ts"]
|
|
},
|
|
{
|
|
"env": {
|
|
"browser": true
|
|
},
|
|
"files": [
|
|
"src/renderer/**/*.{ts,tsx}",
|
|
"packages/aiCore/**",
|
|
"packages/extension-table-plus/**"
|
|
]
|
|
},
|
|
{
|
|
"env": {
|
|
"node": true,
|
|
"vitest": true
|
|
},
|
|
"files": ["**/__tests__/*.test.{ts,tsx}", "tests/**"]
|
|
},
|
|
{
|
|
"env": {
|
|
"browser": true,
|
|
"node": true
|
|
},
|
|
"files": ["src/preload/**"]
|
|
},
|
|
{
|
|
"files": ["packages/ai-sdk-provider/**"],
|
|
"globals": {
|
|
"fetch": "readonly"
|
|
}
|
|
}
|
|
],
|
|
"plugins": ["unicorn", "typescript", "oxc", "import"],
|
|
"rules": {
|
|
"no-array-constructor": "off",
|
|
"no-caller": "warn",
|
|
"no-eval": "warn",
|
|
"no-fallthrough": "warn",
|
|
"no-unassigned-vars": "warn",
|
|
"no-unused-expressions": "off",
|
|
"no-unused-vars": ["warn", { "caughtErrors": "none" }],
|
|
"no-useless-rename": "warn",
|
|
"oxc/bad-array-method-on-arguments": "warn",
|
|
"oxc/bad-char-at-comparison": "warn",
|
|
"oxc/bad-comparison-sequence": "warn",
|
|
"oxc/bad-min-max-func": "warn",
|
|
"oxc/bad-object-literal-comparison": "warn",
|
|
"oxc/bad-replace-all-arg": "warn",
|
|
"oxc/const-comparisons": "warn",
|
|
"oxc/double-comparisons": "warn",
|
|
"oxc/erasing-op": "warn",
|
|
"oxc/missing-throw": "warn",
|
|
"oxc/number-arg-out-of-range": "warn",
|
|
"oxc/only-used-in-recursion": "off",
|
|
"oxc/uninvoked-array-callback": "warn",
|
|
"typescript/await-thenable": "warn",
|
|
"typescript/consistent-type-imports": "error",
|
|
"typescript/no-array-constructor": "error",
|
|
"typescript/no-array-delete": "warn",
|
|
"typescript/no-base-to-string": "warn",
|
|
"typescript/no-duplicate-enum-values": "error",
|
|
"typescript/no-duplicate-type-constituents": "warn",
|
|
"typescript/no-empty-object-type": "off",
|
|
"typescript/no-explicit-any": "off",
|
|
"typescript/no-extra-non-null-assertion": "error",
|
|
"typescript/no-floating-promises": "warn",
|
|
"typescript/no-for-in-array": "warn",
|
|
"typescript/no-implied-eval": "warn",
|
|
"typescript/no-meaningless-void-operator": "warn",
|
|
"typescript/no-misused-new": "error",
|
|
"typescript/no-misused-spread": "warn",
|
|
"typescript/no-namespace": "error",
|
|
"typescript/no-non-null-asserted-optional-chain": "off",
|
|
"typescript/no-redundant-type-constituents": "warn",
|
|
"typescript/no-require-imports": "off",
|
|
"typescript/no-this-alias": "error",
|
|
"typescript/no-unnecessary-parameter-property-assignment": "warn",
|
|
"typescript/no-unnecessary-type-constraint": "error",
|
|
"typescript/no-unsafe-declaration-merging": "error",
|
|
"typescript/no-unsafe-function-type": "error",
|
|
"typescript/no-unsafe-unary-minus": "warn",
|
|
"typescript/no-useless-empty-export": "warn",
|
|
"typescript/no-wrapper-object-types": "error",
|
|
"typescript/prefer-as-const": "error",
|
|
"typescript/prefer-namespace-keyword": "error",
|
|
"typescript/require-array-sort-compare": "warn",
|
|
"typescript/restrict-template-expressions": "warn",
|
|
"typescript/triple-slash-reference": "error",
|
|
"typescript/unbound-method": "warn",
|
|
"unicorn/no-await-in-promise-methods": "warn",
|
|
"unicorn/no-empty-file": "off",
|
|
"unicorn/no-invalid-fetch-options": "warn",
|
|
"unicorn/no-invalid-remove-event-listener": "warn",
|
|
"unicorn/no-new-array": "off",
|
|
"unicorn/no-single-promise-in-promise-methods": "warn",
|
|
"unicorn/no-thenable": "off",
|
|
"unicorn/no-unnecessary-await": "warn",
|
|
"unicorn/no-useless-fallback-in-spread": "warn",
|
|
"unicorn/no-useless-length-check": "warn",
|
|
"unicorn/no-useless-spread": "off",
|
|
"unicorn/prefer-set-size": "warn",
|
|
"unicorn/prefer-string-starts-ends-with": "warn"
|
|
},
|
|
"settings": {
|
|
"jsdoc": {
|
|
"augmentsExtendsReplacesDocs": false,
|
|
"exemptDestructuredRootsFromChecks": false,
|
|
"ignoreInternal": false,
|
|
"ignorePrivate": false,
|
|
"ignoreReplacesDocs": true,
|
|
"implementsReplacesDocs": false,
|
|
"overrideReplacesDocs": true,
|
|
"tagNamePreference": {}
|
|
},
|
|
"jsx-a11y": {
|
|
"attributes": {},
|
|
"components": {},
|
|
"polymorphicPropName": null
|
|
},
|
|
"next": {
|
|
"rootDir": []
|
|
},
|
|
"react": {
|
|
"formComponents": [],
|
|
"linkComponents": []
|
|
}
|
|
}
|
|
}
|