mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-08 16:10:09 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -20,6 +20,14 @@ export type ListFilesToolArgs = {
|
||||
recursive?: boolean;
|
||||
}
|
||||
|
||||
export type MatchSearchFilesToolArgs = {
|
||||
type: 'match_search_files';
|
||||
filepath?: string;
|
||||
query?: string;
|
||||
file_pattern?: string;
|
||||
finish?: boolean;
|
||||
}
|
||||
|
||||
export type RegexSearchFilesToolArgs = {
|
||||
type: 'regex_search_files';
|
||||
filepath?: string;
|
||||
@@ -97,4 +105,4 @@ export type UseMcpToolArgs = {
|
||||
parameters: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs | UseMcpToolArgs;
|
||||
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | MatchSearchFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs | UseMcpToolArgs;
|
||||
|
||||
@@ -12,7 +12,12 @@ describe('parseSmartCopilotSettings', () => {
|
||||
infioApiKey: '',
|
||||
openAIApiKey: '',
|
||||
anthropicApiKey: '',
|
||||
filesSearchMethod: 'auto',
|
||||
filesSearchSettings: {
|
||||
method: 'auto',
|
||||
regexBackend: 'ripgrep',
|
||||
matchBackend: 'coreplugin',
|
||||
ripgrepPath: '',
|
||||
},
|
||||
fuzzyMatchThreshold: 0.85,
|
||||
geminiApiKey: '',
|
||||
groqApiKey: '',
|
||||
@@ -98,7 +103,6 @@ describe('parseSmartCopilotSettings', () => {
|
||||
defaultMention: 'none',
|
||||
removeDuplicateMathBlockIndicator: true,
|
||||
removeDuplicateCodeBlockIndicator: true,
|
||||
ripgrepPath: '',
|
||||
serperApiKey: '',
|
||||
serperSearchEngine: 'google',
|
||||
ignoredFilePatterns: '**/secret/**\n',
|
||||
@@ -195,7 +199,12 @@ describe('settings migration', () => {
|
||||
infioApiKey: '',
|
||||
openAIApiKey: '',
|
||||
anthropicApiKey: '',
|
||||
filesSearchMethod: 'auto',
|
||||
filesSearchSettings: {
|
||||
method: 'auto',
|
||||
regexBackend: 'ripgrep',
|
||||
matchBackend: 'coreplugin',
|
||||
ripgrepPath: '',
|
||||
},
|
||||
fuzzyMatchThreshold: 0.85,
|
||||
geminiApiKey: '',
|
||||
groqApiKey: '',
|
||||
@@ -281,7 +290,6 @@ describe('settings migration', () => {
|
||||
defaultMention: 'none',
|
||||
removeDuplicateMathBlockIndicator: true,
|
||||
removeDuplicateCodeBlockIndicator: true,
|
||||
ripgrepPath: '',
|
||||
serperApiKey: '',
|
||||
serperSearchEngine: 'google',
|
||||
ignoredFilePatterns: '**/secret/**\n',
|
||||
|
||||
@@ -201,6 +201,18 @@ 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'),
|
||||
matchBackend: z.enum(['omnisearch', 'coreplugin']).catch('coreplugin'),
|
||||
ripgrepPath: z.string().catch(''),
|
||||
}).catch({
|
||||
method: 'auto',
|
||||
regexBackend: 'ripgrep',
|
||||
matchBackend: 'coreplugin',
|
||||
ripgrepPath: '',
|
||||
});
|
||||
|
||||
export const InfioSettingsSchema = z.object({
|
||||
// Version
|
||||
version: z.literal(SETTINGS_SCHEMA_VERSION).catch(SETTINGS_SCHEMA_VERSION),
|
||||
@@ -260,8 +272,7 @@ export const InfioSettingsSchema = z.object({
|
||||
jinaApiKey: z.string().catch(''),
|
||||
|
||||
// Files Search
|
||||
filesSearchMethod: z.enum(['regex', 'semantic', 'auto']).catch('auto'),
|
||||
ripgrepPath: z.string().catch(''),
|
||||
filesSearchSettings: FilesSearchSettingsSchema,
|
||||
|
||||
/// [compatible]
|
||||
// activeModels [compatible]
|
||||
@@ -363,6 +374,7 @@ export const InfioSettingsSchema = z.object({
|
||||
})
|
||||
|
||||
export type InfioSettings = z.infer<typeof InfioSettingsSchema>
|
||||
export type FilesSearchSettings = z.infer<typeof FilesSearchSettingsSchema>
|
||||
|
||||
type Migration = {
|
||||
fromVersion: number
|
||||
|
||||
Reference in New Issue
Block a user