MCPcopy
hub / github.com/codeaashu/claude-code / Login

Function Login

src/commands/login/login.tsx:60–100  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

58 }} />;
59}
60export function Login(props) {
61 const $ = _c(12);
62 const mainLoopModel = useMainLoopModel();
63 let t0;
64 if ($[0] !== mainLoopModel || $[1] !== props) {
65 t0 = () => props.onDone(false, mainLoopModel);
66 $[0] = mainLoopModel;
67 $[1] = props;
68 $[2] = t0;
69 } else {
70 t0 = $[2];
71 }
72 let t1;
73 if ($[3] !== mainLoopModel || $[4] !== props) {
74 t1 = () => props.onDone(true, mainLoopModel);
75 $[3] = mainLoopModel;
76 $[4] = props;
77 $[5] = t1;
78 } else {
79 t1 = $[5];
80 }
81 let t2;
82 if ($[6] !== props.startingMessage || $[7] !== t1) {
83 t2 = <ConsoleOAuthFlow onDone={t1} startingMessage={props.startingMessage} />;
84 $[6] = props.startingMessage;
85 $[7] = t1;
86 $[8] = t2;
87 } else {
88 t2 = $[8];
89 }
90 let t3;
91 if ($[9] !== t0 || $[10] !== t2) {
92 t3 = <Dialog title="Login" onCancel={t0} color="permission" inputGuide={_temp}>{t2}</Dialog>;
93 $[9] = t0;
94 $[10] = t2;
95 $[11] = t3;
96 } else {
97 t3 = $[11];
98 }
99 return t3;
100}
101function _temp(exitState) {
102 return exitState.pending ? <Text>Press {exitState.keyName} again to exit</Text> : <ConfigurableShortcutHint action="confirm:no" context="Confirmation" fallback="Esc" description="cancel" />;
103}

Callers

nothing calls this directly

Calls 1

useMainLoopModelFunction · 0.85

Tested by

no test coverage detected