* feat(options): implement deep merging for provider options Add deep merge functionality to preserve nested properties when combining provider options. The new implementation handles object merging recursively while maintaining type safety. * refactor(tsconfig): reorganize include paths in tsconfig files Clean up and reorder include paths for better maintainability and consistency between tsconfig.node.json and tsconfig.web.json * test: add aiCore test configuration and script Add new test configuration for aiCore package and corresponding test script in package.json to enable running tests specifically for the aiCore module. * fix: format * fix(aiCore): resolve test failures and update test infrastructure - Add vitest setup file with global mocks for @cherrystudio/ai-sdk-provider - Fix context assertions: use 'model' instead of 'modelId' in plugin tests - Fix error handling tests: update expected error messages to match actual behavior - Fix streamText tests: use 'maxOutputTokens' instead of 'maxTokens' - Fix schemas test: update expected provider list to match actual implementation - Fix mock-responses: use AI SDK v5 format (inputTokens/outputTokens) - Update vi.mock to use importOriginal for preserving jsonSchema export 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): add alias mock for @cherrystudio/ai-sdk-provider in tests The vi.mock in setup file doesn't work for source code imports. Use vitest resolve.alias to mock the external package properly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): disable unused-vars warnings in mock file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): use import.meta.url for ESM compatibility in vitest config __dirname is not available in ESM modules, use fileURLToPath instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): use absolute paths in vitest config for workspace compatibility - Use path.resolve for setupFiles and all alias paths - Extend aiCore vitest.config.ts from root workspace config - Change aiCore test environment to 'node' instead of 'jsdom' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * docs(factory): improve mergeProviderOptions documentation Add detailed explanation of merge behavior with examples * test(factory): add tests for mergeProviderOptions behavior Add test cases to verify mergeProviderOptions correctly handles primitive values, arrays, and nested objects during merging * refactor(tests): clean up mock responses test fixtures Remove unused mock streaming chunks and error responses to simplify test fixtures Update warning details structure in mock complete responses * docs(test): clarify comment in generateImage test Update comment to use consistent 'model id' terminology instead of 'modelId' * test(factory): verify array replacement in mergeProviderOptions --------- Co-authored-by: suyao <sy20010504@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
36 lines
1.0 KiB
JSON
36 lines
1.0 KiB
JSON
{
|
|
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
|
|
"include": [
|
|
"electron.vite.config.*",
|
|
"scripts",
|
|
"src/main/**/*",
|
|
"src/main/env.d.ts",
|
|
"src/preload/**/*",
|
|
"src/renderer/src/services/traceApi.ts",
|
|
"src/renderer/src/types/*",
|
|
"packages/mcp-trace/**/*",
|
|
"packages/shared/**/*",
|
|
],
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"incremental": true,
|
|
"moduleResolution": "bundler",
|
|
"tsBuildInfoFile": ".tsbuildinfo/tsconfig.node.tsbuildinfo",
|
|
"types": [
|
|
"electron-vite/node",
|
|
"vitest/globals"
|
|
],
|
|
"paths": {
|
|
"@logger": ["./src/main/services/LoggerService"],
|
|
"@main/*": ["./src/main/*"],
|
|
"@types": ["./src/renderer/src/types/index.ts"],
|
|
"@shared/*": ["./packages/shared/*"],
|
|
"@mcp-trace/*": ["./packages/mcp-trace/*"],
|
|
"@modelcontextprotocol/sdk/*": ["./node_modules/@modelcontextprotocol/sdk/dist/esm/*"]
|
|
},
|
|
"experimentalDecorators": true,
|
|
"emitDecoratorMetadata": true,
|
|
"useDefineForClassFields": true
|
|
}
|
|
}
|