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

Function handleConfirm

src/commands/remote-setup/remote-setup.tsx:127–151  ·  view source on GitHub ↗
(token: RedactedGithubToken)

Source from the content-addressed store, hash-verified

125 onDone();
126 };
127 const handleConfirm = async (token: RedactedGithubToken) => {
128 setStep({
129 name: 'uploading'
130 });
131 const result = await importGithubToken(token);
132 if (!result.ok) {
133 logEvent('tengu_remote_setup_result', {
134 result: 'import_failed' as SafeString,
135 error_kind: result.error.kind as SafeString
136 });
137 onDone(errorMessage(result.error, getCodeWebUrl()));
138 return;
139 }
140
141 // Token import succeeded. Environment creation is best-effort — if it
142 // fails, the web state machine routes to env-setup on landing, which is
143 // one extra click but still better than the OAuth dance.
144 await createDefaultEnvironment();
145 const url = getCodeWebUrl();
146 await openBrowser(url);
147 logEvent('tengu_remote_setup_result', {
148 result: 'success' as SafeString
149 });
150 onDone(`Connected as ${result.result.github_username}. Opened ${url}`);
151 };
152 if (step.name === 'checking') {
153 return <LoadingState message="Checking login status…" />;
154 }

Callers 1

WebFunction · 0.85

Calls 8

setStepFunction · 0.85
importGithubTokenFunction · 0.85
logEventFunction · 0.85
getCodeWebUrlFunction · 0.85
createDefaultEnvironmentFunction · 0.85
openBrowserFunction · 0.85
errorMessageFunction · 0.70
onDoneFunction · 0.50

Tested by

no test coverage detected