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

Function getConfigYamlPath

core/util/paths.ts:119–130  ·  view source on GitHub ↗
(ideType?: IdeType)

Source from the content-addressed store, hash-verified

117}
118
119export function getConfigYamlPath(ideType?: IdeType): string {
120 const p = path.join(getContinueGlobalPath(), "config.yaml");
121 const exists = fs.existsSync(p);
122 const isEmpty = exists && fs.readFileSync(p, "utf8").trim() === "";
123 const needsCreation = !exists && !fs.existsSync(getConfigJsonPath());
124
125 if (needsCreation || isEmpty) {
126 fs.writeFileSync(p, YAML.stringify(defaultConfig));
127 setConfigFilePermissions(p);
128 }
129 return p;
130}
131
132export function getPrimaryConfigFilePath(): string {
133 const configYamlPath = getConfigYamlPath();

Callers 8

doLoadConfigFunction · 0.90
getCommandsMapFunction · 0.90
provideCodeLensesMethod · 0.90
constructorMethod · 0.90
getPrimaryConfigFilePathFunction · 0.85
editConfigYamlFunction · 0.85
editConfigFileFunction · 0.85
openConfigProfileMethod · 0.85

Calls 3

getContinueGlobalPathFunction · 0.85
getConfigJsonPathFunction · 0.85
setConfigFilePermissionsFunction · 0.85

Tested by

no test coverage detected