Hi! Thanks for Cody. I am using it from VS Code and it rocks!
I tried to add general preInstructions in my User settings, and project specific instructions in the Workspace settings. This failed because the Workspace setting override the User ditto.
I think it makes sense that Cody uses both instructions from User and Workspace settings, supporting the use case I have. That’s what CoPilot does, and generally I think users often expect this. I say the last thing as a VS Code extension developer.
Ideally instructions would be either a string or an array. An array because it makes it easier to write paragraphs and see what has been mentioned and not. And then the User and Workspace instructions get concatenated.
Workspace settings always override global user settings in Visual Studio Code, but you already know. I don’t know if it is possible to take them all in one pre-instruction prompt.
What if you want the override behavior? Would it make sense to have a configuration switch in Cody settings?
It’s up to Cody if the configuration should be overridden. If you use the .get() method on the configuration option it will be the overridden one (at least for strings). But if you use the inspect() method you can get at the User/Global value and a surprising lot of other value types (including workspace folder value and language specific value). And then you can concatenate these strings to get the behaviour I was hoping for.
I think it could make sense to be able to say “in this workspace, never mind my global instructions”. And since the decision how to deal with the different configuration value types is Cody code, this could be solved with another setting for if the user wants the overriding. This could be a boolean and get() on it will see the “closest” value.