MCPcopy
hub / github.com/claude-code-best/claude-code / showSetupDialog

Function showSetupDialog

src/interactiveHelpers.tsx:103–118  ·  view source on GitHub ↗
(
  root: Root,
  renderer: (done: (result: T) => void) => React.ReactNode,
  options?: { onChangeAppState?: typeof onChangeAppState },
)

Source from the content-addressed store, hash-verified

101 * Reduces boilerplate in showSetupScreens() where every dialog needs these wrappers.
102 */
103export function showSetupDialog<T = void>(
104 root: Root,
105 renderer: (done: (result: T) => void) => React.ReactNode,
106 options?: { onChangeAppState?: typeof onChangeAppState },
107): Promise<T> {
108 return showDialog<T>(root, done => (
109 <ThemeProvider
110 initialState={getGlobalConfig().theme}
111 onThemeSave={setting => saveGlobalConfig(current => ({ ...current, theme: setting }))}
112 >
113 <AppStateProvider onChangeAppState={options?.onChangeAppState}>
114 <KeybindingSetup>{renderer(done)}</KeybindingSetup>
115 </AppStateProvider>
116 </ThemeProvider>
117 ));
118}
119
120/**
121 * Render the main UI into the root and wait for it to exit.

Calls 3

showDialogFunction · 0.85
getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85

Tested by

no test coverage detected