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

Function ChooseRepoStep

src/commands/install-github-app/ChooseRepoStep.tsx:15–210  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

13 onSubmit: () => void;
14}
15export function ChooseRepoStep(t0) {
16 const $ = _c(49);
17 const {
18 currentRepo,
19 useCurrentRepo,
20 repoUrl,
21 onRepoUrlChange,
22 onSubmit,
23 onToggleUseCurrentRepo
24 } = t0;
25 const [cursorOffset, setCursorOffset] = useState(0);
26 const [showEmptyError, setShowEmptyError] = useState(false);
27 const terminalSize = useTerminalSize();
28 const textInputColumns = terminalSize.columns;
29 let t1;
30 if ($[0] !== currentRepo || $[1] !== onSubmit || $[2] !== repoUrl || $[3] !== useCurrentRepo) {
31 t1 = () => {
32 const repoName = useCurrentRepo ? currentRepo : repoUrl;
33 if (!repoName?.trim()) {
34 setShowEmptyError(true);
35 return;
36 }
37 onSubmit();
38 };
39 $[0] = currentRepo;
40 $[1] = onSubmit;
41 $[2] = repoUrl;
42 $[3] = useCurrentRepo;
43 $[4] = t1;
44 } else {
45 t1 = $[4];
46 }
47 const handleSubmit = t1;
48 const isTextInputVisible = !useCurrentRepo || !currentRepo;
49 let t2;
50 if ($[5] !== onToggleUseCurrentRepo) {
51 t2 = () => {
52 onToggleUseCurrentRepo(true);
53 setShowEmptyError(false);
54 };
55 $[5] = onToggleUseCurrentRepo;
56 $[6] = t2;
57 } else {
58 t2 = $[6];
59 }
60 const handlePrevious = t2;
61 let t3;
62 if ($[7] !== onToggleUseCurrentRepo) {
63 t3 = () => {
64 onToggleUseCurrentRepo(false);
65 setShowEmptyError(false);
66 };
67 $[7] = onToggleUseCurrentRepo;
68 $[8] = t3;
69 } else {
70 t3 = $[8];
71 }
72 const handleNext = t3;

Callers

nothing calls this directly

Calls 3

useTerminalSizeFunction · 0.85
onSubmitFunction · 0.85
useKeybindingsFunction · 0.85

Tested by

no test coverage detected