MCPcopy
hub / github.com/Kilo-Org/kilocode / input

Function input

packages/opencode/src/cli/ui.ts:104–117  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

102}
103
104export async function input(prompt: string): Promise<string> {
105 const readline = require("readline")
106 const rl = readline.createInterface({
107 input: process.stdin,
108 output: process.stdout,
109 })
110
111 return new Promise((resolve) => {
112 rl.question(prompt, (answer: string) => {
113 rl.close()
114 resolve(answer.trim())
115 })
116 })
117}
118
119export function error(message: string) {
120 if (message.startsWith("Error: ")) {

Callers

nothing calls this directly

Calls 3

closeMethod · 0.65
resolveFunction · 0.50
questionMethod · 0.45

Tested by

no test coverage detected