()
| 78 | const READ_TOOLS = new Set(['read', 'glob', 'grep', 'ls', 'find']); |
| 79 | |
| 80 | export function findOpenCodeDirs(): string[] { |
| 81 | const home = process.env.HOME || process.env.USERPROFILE || ''; |
| 82 | const dirs: string[] = []; |
| 83 | |
| 84 | // macOS / Linux |
| 85 | const linuxPath = path.join(home, '.local', 'share', 'opencode', 'storage'); |
| 86 | if (fs.existsSync(linuxPath)) dirs.push(linuxPath); |
| 87 | |
| 88 | return dirs; |
| 89 | } |
| 90 | |
| 91 | function readJsonSafe<T>(filePath: string): T | null { |
| 92 | try { |
no outgoing calls
no test coverage detected