()
| 439 | } |
| 440 | |
| 441 | export function migrateV1DevDataFiles() { |
| 442 | const devDataPath = getDevDataPath(); |
| 443 | function moveToV1FolderIfExists( |
| 444 | oldFileName: string, |
| 445 | newFileName: DevEventName, |
| 446 | ) { |
| 447 | const oldFilePath = path.join(devDataPath, `${oldFileName}.jsonl`); |
| 448 | if (fs.existsSync(oldFilePath)) { |
| 449 | const newFilePath = getDevDataFilePath(newFileName, "0.1.0"); |
| 450 | if (!fs.existsSync(newFilePath)) { |
| 451 | fs.copyFileSync(oldFilePath, newFilePath); |
| 452 | fs.unlinkSync(oldFilePath); |
| 453 | } |
| 454 | } |
| 455 | } |
| 456 | moveToV1FolderIfExists("tokens_generated", "tokensGenerated"); |
| 457 | moveToV1FolderIfExists("chat", "chatFeedback"); |
| 458 | moveToV1FolderIfExists("quickEdit", "quickEdit"); |
| 459 | moveToV1FolderIfExists("autocomplete", "autocomplete"); |
| 460 | } |
| 461 | |
| 462 | export function getLocalEnvironmentDotFilePath(): string { |
| 463 | return path.join(getContinueGlobalPath(), ".local"); |
no test coverage detected