(options: LoadAssistantFilesOptions)
| 159 | } |
| 160 | |
| 161 | async getLocalProfiles(options: LoadAssistantFilesOptions) { |
| 162 | /** |
| 163 | * Users can define as many local agents as they want in a `.continue/agents` (or previous .continue/assistants) folder |
| 164 | */ |
| 165 | const localProfiles: ProfileLifecycleManager[] = []; |
| 166 | |
| 167 | if (options.includeGlobal) { |
| 168 | localProfiles.push(this.globalLocalProfileManager); |
| 169 | } |
| 170 | |
| 171 | if (options.includeWorkspace) { |
| 172 | const yamlOptions = { ...options, fileExtType: "yaml" } as const; |
| 173 | const allFiles = ( |
| 174 | await Promise.all([ |
| 175 | getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "assistants"), |
| 176 | getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "agents"), |
| 177 | getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "configs"), |
| 178 | ]) |
| 179 | ).flat(); |
| 180 | const profiles = allFiles.map((assistant) => { |
| 181 | return new LocalProfileLoader(this.ide, this.llmLogger, assistant); |
| 182 | }); |
| 183 | const localAssistantProfiles = profiles.map( |
| 184 | (profile) => new ProfileLifecycleManager(profile, this.ide), |
| 185 | ); |
| 186 | localProfiles.push(...localAssistantProfiles); |
| 187 | } |
| 188 | |
| 189 | return localProfiles; |
| 190 | } |
| 191 | |
| 192 | ////////////////// |
| 193 | // External actions that can cause a cascading config refresh |
no test coverage detected