()
| 138 | } |
| 139 | |
| 140 | export 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 | |
| 171 | export function getConfigJsPath(): string { |
| 172 | // Do not create automatically |
no test coverage detected