MCPcopy Create free account
hub / github.com/arctic-cli/interface / input

Function input

packages/arctic/src/cli/ui.ts:150–163  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

148 }
149
150 export async function input(prompt: string): Promise<string> {
151 const readline = require("readline")
152 const rl = readline.createInterface({
153 input: process.stdin,
154 output: process.stdout,
155 })
156
157 return new Promise((resolve) => {
158 rl.question(prompt, (answer: string) => {
159 rl.close()
160 resolve(answer.trim())
161 })
162 })
163 }
164
165 export function error(message: string) {
166 println(Style.TEXT_DANGER_BOLD + "Error: " + Style.TEXT_NORMAL + message)

Callers 1

runFunction · 0.50

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected