MCPcopy Create free account
hub / github.com/Noumena-Network/code / showDialog

Function showDialog

src/interactiveHelpers.tsx:43–48  ·  view source on GitHub ↗
(root: Root, renderer: (done: (result: T) => void) => React.ReactNode)

Source from the content-addressed store, hash-verified

41 }));
42}
43export function showDialog<T = void>(root: Root, renderer: (done: (result: T) => void) => React.ReactNode): Promise<T> {
44 return new Promise<T>(resolve => {
45 const done = (result: T): void => void resolve(result);
46 root.render(renderer(done));
47 });
48}
49
50/**
51 * Render an error message through Ink, then unmount and exit.

Callers 1

showSetupDialogFunction · 0.85

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected