mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 17:59:09 +08:00
- Implemented mergeObjects function to smartly merge objects, preserving existing values and allowing for configurable overwrite options. - Added mergeModelsList and mergeProvidersList functions to handle merging of model and provider lists, respectively, with case-insensitive ID matching. - Introduced preset merge strategies for common use cases. - Created a new API route for syncing provider models, handling data import and merge operations. - Developed ModelEditForm and ProviderEditForm components for editing model and provider details, respectively, with form validation and state management. - Added UI components for labels, selects, and notifications to enhance user experience.
31 lines
682 B
TypeScript
31 lines
682 B
TypeScript
import type { NextConfig } from 'next'
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Add custom headers for static files
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/data/:path*',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'public, max-age=3600, must-revalidate'
|
|
},
|
|
{
|
|
key: 'Access-Control-Allow-Origin',
|
|
value: '*'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
// Configure serving static files from outside public directory
|
|
outputFileTracingExcludes: {
|
|
'*': ['./**/__tests__/**/*']
|
|
},
|
|
// Basic Turbopack configuration to silence warning
|
|
turbopack: {}
|
|
}
|
|
|
|
export default nextConfig
|