MCPcopy Index your code
hub / github.com/codeaashu/claude-code / ThemePickerCommand

Function ThemePickerCommand

src/commands/theme/theme.tsx:13–53  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

11 }) => void;
12};
13function ThemePickerCommand(t0) {
14 const $ = _c(8);
15 const {
16 onDone
17 } = t0;
18 const [, setTheme] = useTheme();
19 let t1;
20 if ($[0] !== onDone || $[1] !== setTheme) {
21 t1 = setting => {
22 setTheme(setting);
23 onDone(`Theme set to ${setting}`);
24 };
25 $[0] = onDone;
26 $[1] = setTheme;
27 $[2] = t1;
28 } else {
29 t1 = $[2];
30 }
31 let t2;
32 if ($[3] !== onDone) {
33 t2 = () => {
34 onDone("Theme picker dismissed", {
35 display: "system"
36 });
37 };
38 $[3] = onDone;
39 $[4] = t2;
40 } else {
41 t2 = $[4];
42 }
43 let t3;
44 if ($[5] !== t1 || $[6] !== t2) {
45 t3 = <Pane color="permission"><ThemePicker onThemeSelect={t1} onCancel={t2} skipExitHandling={true} /></Pane>;
46 $[5] = t1;
47 $[6] = t2;
48 $[7] = t3;
49 } else {
50 t3 = $[7];
51 }
52 return t3;
53}
54export const call: LocalJSXCommandCall = async (onDone, _context) => {
55 return <ThemePickerCommand onDone={onDone} />;
56};

Callers

nothing calls this directly

Calls 3

useThemeFunction · 0.50
setThemeFunction · 0.50
onDoneFunction · 0.50

Tested by

no test coverage detected