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

Function input

packages/opencode/src/cli/cmd/tui.ts:59–64  ·  view source on GitHub ↗
(value?: string)

Source from the content-addressed store, hash-verified

57}
58
59async function input(value?: string) {
60 const piped = process.stdin.isTTY ? undefined : await Bun.stdin.text()
61 if (!value) return piped
62 if (!piped) return value
63 return piped + "\n" + value
64}
65
66export function resolveThreadDirectory(project?: string, envPWD = process.env.PWD, cwd = process.cwd()) {
67 const root = Filesystem.resolve(envPWD ?? cwd)

Callers 2

tui.tsFile · 0.70
RunQuestionBodyFunction · 0.50

Calls 1

textMethod · 0.65

Tested by

no test coverage detected