MCPcopy Index your code
hub / github.com/anomalyco/opencode / directoryLabel

Function directoryLabel

packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts:140–149  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

138}
139
140function directoryLabel(directory: string) {
141 const resolved = path.resolve(directory)
142 const display =
143 resolved === Global.Path.home
144 ? "~"
145 : resolved.startsWith(`${Global.Path.home}${path.sep}`)
146 ? resolved.replace(Global.Path.home, "~")
147 : resolved
148 return display.replaceAll("\\", "/")
149}
150
151function queueSplash(
152 renderer: Pick<CliRenderer, "writeToScrollback" | "requestRender">,

Callers 2

createRuntimeLifecycleFunction · 0.85
resetForReplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected