MCPcopy
hub / github.com/continuedev/continue / serializedToIntermediateConfig

Function serializedToIntermediateConfig

core/config/load.ts:169–207  ·  view source on GitHub ↗
(
  initial: SerializedContinueConfig,
  ide: IDE,
)

Source from the content-addressed store, hash-verified

167}
168
169async function serializedToIntermediateConfig(
170 initial: SerializedContinueConfig,
171 ide: IDE,
172): Promise<Config> {
173 // DEPRECATED - load custom slash commands
174 const slashCommands: SlashCommandWithSource[] = [];
175 for (const command of initial.slashCommands || []) {
176 const newCommand = getLegacyBuiltInSlashCommandFromDescription(command);
177 if (newCommand) {
178 slashCommands.push(newCommand);
179 }
180 }
181 for (const command of initial.customCommands || []) {
182 slashCommands.push(convertCustomCommandToSlashCommand(command));
183 }
184
185 // DEPRECATED - load slash commands from v1 prompt files
186 // NOTE: still checking the v1 default .prompts folder for slash commands
187 const promptFiles = await getAllPromptFiles(
188 ide,
189 initial.experimental?.promptPath,
190 true,
191 );
192
193 for (const file of promptFiles) {
194 const slashCommand = slashCommandFromPromptFile(file.path, file.content);
195 if (slashCommand) {
196 slashCommands.push(slashCommand);
197 }
198 }
199
200 const config: Config = {
201 ...initial,
202 slashCommands,
203 contextProviders: initial.contextProviders || [],
204 };
205
206 return config;
207}
208
209// Merge request options set for entire config with model specific options
210function applyRequestOptionsToModels(

Callers 1

Calls 5

getAllPromptFilesFunction · 0.90
pushMethod · 0.65

Tested by

no test coverage detected