()
| 185 | } |
| 186 | |
| 187 | export function resolveZedDbPath() { |
| 188 | const candidates = [ |
| 189 | process.env.OPENCODE_ZED_DB, |
| 190 | path.join(os.homedir(), "Library", "Application Support", "Zed", "db", "0-stable", "db.sqlite"), |
| 191 | path.join(os.homedir(), ".local", "share", "zed", "db", "0-stable", "db.sqlite"), |
| 192 | ].filter((item): item is string => Boolean(item)) |
| 193 | |
| 194 | return candidates.find((item) => isFile(item)) |
| 195 | } |
| 196 | |
| 197 | export function isZedTerminal() { |
| 198 | return process.env.ZED_TERM === "true" || process.env.TERM_PROGRAM?.toLowerCase() === "zed" |
no test coverage detected