Open samuelint opened 10 months ago
@samuelint It was a small experiment at first so I just haven't added to the docs, but you can use a file titled .continuerc.json
in the root of your VS Code workspace, and it will be merged with your main config.json
(code here). Currently it will look at the root of all workspace directories in VS Code.
Something similar for config.ts
doesn't yet exist, but I like your suggestion and can definitely make it happen.
When you suggest module.exports
, do you mean that it should return a partial version of the configuration object, and then any manipulation logic just lives above at the top level of the file?
By module.exports
, I mean to have a single config file which contains content of config.json
& config.ts
.
Something like
module.exports = {
models: [
{
model: "gpt-4-1106-preview",
title: "GPT-4 Turbo",
promptTemplate: {
edit: () => {
return `My own context {{language}}{{code}}.....`
}
}
// etc...
}
],
};
or
module.exports = (config:Config) => ({ ...config, myCustomStuff})
In both cases, content override the one set in ~/.continue
Btw I would be honoured to contribute for this.
@samuelint sorry for taking 3 weeks to get back : / For the main config file we want to allow for something fully serializable so that we can write back to it, but we don't need to write back to .continuerc.json so it may actually make sense to do what you're describing in its place
One thing we would have to make sure to do is get types in the file. Possibly there's a way to do this through VS Code? We currently get types in config.ts by using a tsconfig.json and node_modules/@types, but I wouldn't want to deposit this in everybody's repo. If you were willing to look into this, it seems like a direction worth considering
Validations
Problem
Solution
.continuerc.js
(or.continuerc.ts
) or.continue.json
located at the root of a project. Merge the config with~/.continue/config.json
and prioritize the project config..continuerc.js
could usemodule.exports = {}
instead of exportingmodifyConfig
. It would be more mainstream with other libraries of the community. Example of community project using module exportseslint
(eslintrc.js)jest
(jest.config.js).continuerc.js
in the workspace of the current opened file.