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

Function discover

packages/tui/src/context/theme.tsx:38–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37const themeSource: ThemeSource = {
38 async discover() {
39 const directories = [Global.Path.config]
40 for (let current = process.cwd(); ; current = path.dirname(current)) {
41 directories.push(path.join(current, ".opencode"))
42 if (path.dirname(current) === current) break
43 }
44 return discoverThemes(directories)
45 },
46 subscribeRefresh(refresh) {
47 process.on("SIGUSR2", refresh)
48 return () => process.off("SIGUSR2", refresh)

Callers 2

resolveEditorConnectionFunction · 0.70
project.tsFile · 0.50

Calls 3

discoverThemesFunction · 0.85
pushMethod · 0.80
cwdMethod · 0.65

Tested by

no test coverage detected