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

Function shellWorkdir

packages/opencode/src/acp/tool.ts:279–282  ·  view source on GitHub ↗
(input: ToolInput, cwd?: string)

Source from the content-addressed store, hash-verified

277}
278
279function shellWorkdir(input: ToolInput, cwd?: string) {
280 const explicit = stringValue(input.workdir) ?? stringValue(input.cwd)
281 return resolvePath(explicit, cwd) ?? cwd
282}
283
284function resolvePath(value: string | undefined, cwd?: string) {
285 if (!value) return undefined

Callers 2

toLocationsFunction · 0.85
rawInputFunction · 0.85

Calls 2

stringValueFunction · 0.70
resolvePathFunction · 0.70

Tested by

no test coverage detected