MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / text

Function text

src/setup/prompt.ts:243–252  ·  view source on GitHub ↗
(
  question: string,
  defaultValue: string,
  opts: PromptOptions,
)

Source from the content-addressed store, hash-verified

241
242/** Free-text prompt with default. */
243export async function text(
244 question: string,
245 defaultValue: string,
246 opts: PromptOptions,
247): Promise<string> {
248 if (!opts.interactive) return defaultValue;
249 const hint = defaultValue ? ` (default: ${defaultValue})` : '';
250 const ans = (await readLine(`${question}${hint}: `)).trim();
251 return ans || defaultValue;
252}
253
254/** Render a section header. Output-only — no I/O wait. */
255export function section(title: string): void {

Callers 1

interactiveAddProviderFunction · 0.85

Calls 1

readLineFunction · 0.85

Tested by

no test coverage detected