Code Configuration
To allow added flexibility and eventually support an entire plugin ecosystem, Continue can be configured programmatically in a TypeScript file, ~/.continue/config.ts
.
Whenever Continue loads, it carries out the following steps:
- Load
~/.continue/config.json
- Convert this into a
Config
object - If
~/.continue/config.ts
exists and has definedmodifyConfig
correctly, callmodifyConfig
with theConfig
object to generate the final configuration
Defining a modifyConfig
function allows you to make any final modifications to your initial config.json
. Here's an example that sets the temperature to a random number and maxTokens to 1024:
~/.continue/config.ts
export function modifyConfig(config: Config): Config {
config.completionOptions = {
...config.completionOptions,
temperature: Math.random(),
maxTokens: 1024,
};
return config;
}