MCPcopy
hub / github.com/qawolf/cli / createUI

Function createUI

src/shell/ui/createUi.ts:10–26  ·  view source on GitHub ↗
(
  mode: OutputMode,
  opts: {
    clack?: StyledClack;
    verboseTarget?: { write: ((msg: string) => void) | undefined };
  } = {},
)

Source from the content-addressed store, hash-verified

8import type { UI } from "./types.js";
9
10export function createUI(
11 mode: OutputMode,
12 opts: {
13 clack?: StyledClack;
14 verboseTarget?: { write: ((msg: string) => void) | undefined };
15 } = {},
16): UI {
17 const clack = opts.clack ?? createStyledClack();
18
19 return {
20 mode,
21 ...pickRenderers(mode, clack, opts.verboseTarget),
22 confirm: createConfirm({ mode, clack }),
23 password: createPassword({ mode, clack }),
24 json: createJson(),
25 };
26}

Callers 1

buildBaseContextFunction · 0.85

Calls 5

createJsonFunction · 0.90
createStyledClackFunction · 0.85
pickRenderersFunction · 0.85
createConfirmFunction · 0.85
createPasswordFunction · 0.85

Tested by

no test coverage detected