MCPcopy Create free account
hub / github.com/anomalyco/opencode / resolveZedDbPath

Function resolveZedDbPath

packages/tui/src/editor-zed.ts:187–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185}
186
187export 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
197export function isZedTerminal() {
198 return process.env.ZED_TERM === "true" || process.env.TERM_PROGRAM?.toLowerCase() === "zed"

Callers 2

editor.tsFile · 0.90

Calls 2

isFileFunction · 0.70
findMethod · 0.65

Tested by

no test coverage detected