fix: test & build error

This commit is contained in:
duanfuxiang
2025-06-12 16:20:08 +08:00
parent d16207e3c5
commit 896acd09e0
5 changed files with 18 additions and 14 deletions

View File

@@ -9,6 +9,7 @@ describe('parseSmartCopilotSettings', () => {
expect(result).toEqual({
version: 0.4,
activeModels: DEFAULT_MODELS,
activeProviderTab: 'Infio',
infioApiKey: '',
openAIApiKey: '',
anthropicApiKey: '',
@@ -25,13 +26,13 @@ describe('parseSmartCopilotSettings', () => {
chatModelId: '',
mcpEnabled: false,
collectedChatModels: [],
chatModelProvider: 'OpenRouter',
chatModelProvider: 'Infio',
applyModelId: '',
applyModelProvider: 'OpenRouter',
applyModelProvider: 'Infio',
embeddingModelId: '',
embeddingModelProvider: 'Google',
embeddingModelProvider: 'Infio',
experimentalDiffStrategy: false,
defaultProvider: 'OpenRouter',
defaultProvider: 'Infio',
alibabaQwenProvider: {
name: 'AlibabaQwen',
apiKey: '',
@@ -196,6 +197,7 @@ describe('settings migration', () => {
expect(result).toEqual({
version: 0.4,
activeModels: DEFAULT_MODELS,
activeProviderTab: 'Infio',
infioApiKey: '',
openAIApiKey: '',
anthropicApiKey: '',
@@ -212,13 +214,13 @@ describe('settings migration', () => {
collectedChatModels: [],
chatModelId: '',
mcpEnabled: false,
chatModelProvider: 'OpenRouter',
chatModelProvider: 'Infio',
applyModelId: '',
applyModelProvider: 'OpenRouter',
applyModelProvider: 'Infio',
embeddingModelId: '',
embeddingModelProvider: 'Google',
embeddingModelProvider: 'Infio',
experimentalDiffStrategy: false,
defaultProvider: 'OpenRouter',
defaultProvider: 'Infio',
alibabaQwenProvider: {
name: 'AlibabaQwen',
apiKey: '',

View File

@@ -203,12 +203,12 @@ export const triggerSchema = z.object({
const FilesSearchSettingsSchema = z.object({
method: z.enum(['match', 'regex', 'semantic', 'auto']).catch('auto'),
regexBackend: z.enum(['coreplugin', 'ripgrep']).catch('ripgrep'),
regexBackend: z.enum(['coreplugin', 'ripgrep']).catch('coreplugin'),
matchBackend: z.enum(['omnisearch', 'coreplugin']).catch('coreplugin'),
ripgrepPath: z.string().catch(''),
}).catch({
method: 'auto',
regexBackend: 'ripgrep',
regexBackend: 'coreplugin',
matchBackend: 'coreplugin',
ripgrepPath: '',
});