MCPcopy Index your code
hub / github.com/continuedev/continue / getConfigTsPath

Function getConfigTsPath

core/util/paths.ts:140–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138}
139
140export function getConfigTsPath(): string {
141 const p = path.join(getContinueGlobalPath(), "config.ts");
142 if (!fs.existsSync(p)) {
143 fs.writeFileSync(p, DEFAULT_CONFIG_TS_CONTENTS);
144 }
145
146 const typesPath = path.join(getContinueGlobalPath(), "types");
147 if (!fs.existsSync(typesPath)) {
148 fs.mkdirSync(typesPath);
149 }
150 const corePath = path.join(typesPath, "core");
151 if (!fs.existsSync(corePath)) {
152 fs.mkdirSync(corePath);
153 }
154 const packageJsonPath = path.join(getContinueGlobalPath(), "package.json");
155 if (!fs.existsSync(packageJsonPath)) {
156 fs.writeFileSync(
157 packageJsonPath,
158 JSON.stringify({
159 name: "continue-config",
160 version: "1.0.0",
161 description: "My Continue Configuration",
162 main: "config.js",
163 }),
164 );
165 }
166
167 fs.writeFileSync(path.join(corePath, "index.d.ts"), Types);
168 return p;
169}
170
171export function getConfigJsPath(): string {
172 // Do not create automatically

Callers 5

buildConfigTsWithBinaryFunction · 0.90
constructorMethod · 0.90

Calls 1

getContinueGlobalPathFunction · 0.85

Tested by

no test coverage detected