MCPcopy Create free account
hub / github.com/claude-code-internals/claude-code-runnable / readPromptFromStdin

Function readPromptFromStdin

src/localRecoveryCli.ts:91–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91async function readPromptFromStdin(): Promise<string> {
92 if (process.stdin.isTTY) return ''
93 const chunks: Buffer[] = []
94 for await (const chunk of process.stdin) {
95 chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)))
96 }
97 return Buffer.concat(chunks).toString('utf8').trim()
98}
99
100function getSystemPrompt(
101 systemPrompt: string | undefined,

Callers 1

runFunction · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected