| 556 | } |
| 557 | |
| 558 | function printElectronDataError(): void { |
| 559 | console.error('\n' + '='.repeat(68)) |
| 560 | console.error(' ChatLab: Electron desktop data not found') |
| 561 | console.error('='.repeat(68)) |
| 562 | console.error('') |
| 563 | console.error(' Detected that ChatLab desktop app was installed on this machine,') |
| 564 | console.error(' but could not locate your chat databases.') |
| 565 | console.error('') |
| 566 | console.error(' This usually means you changed the data directory in desktop settings.') |
| 567 | console.error('') |
| 568 | console.error(' To fix this, choose one of:') |
| 569 | console.error('') |
| 570 | console.error(' 1. Open ChatLab desktop app — it will auto-migrate your data') |
| 571 | console.error(' 2. Set the data directory manually:') |
| 572 | console.error(' export CHATLAB_DATA_DIR="/path/to/your/data"') |
| 573 | console.error(' 3. Edit ~/.chatlab/config.toml:') |
| 574 | console.error(' [data]') |
| 575 | console.error(' user_data_dir = "/path/to/your/data"') |
| 576 | console.error('') |
| 577 | console.error('='.repeat(68) + '\n') |
| 578 | } |
| 579 | |
| 580 | function formatTimeRange(first: number | null, last: number | null): string { |
| 581 | if (!first || !last) return 'Unknown' |