( initial: SerializedContinueConfig, ide: IDE, )
| 167 | } |
| 168 | |
| 169 | async 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 |
| 210 | function applyRequestOptionsToModels( |
no test coverage detected