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

Function onSubmit

src/components/MCPServerDesktopImportDialog.tsx:72–90  ·  view source on GitHub ↗
(selectedServers)

Source from the content-addressed store, hash-verified

70 }
71 const collisions = t5;
72 const onSubmit = async function onSubmit(selectedServers) {
73 let importedCount = 0;
74 for (const serverName of selectedServers) {
75 const serverConfig = servers[serverName];
76 if (serverConfig) {
77 let finalName = serverName;
78 if (existingServers[finalName] !== undefined) {
79 let counter = 1;
80 while (existingServers[`${serverName}_${counter}`] !== undefined) {
81 counter++;
82 }
83 finalName = `${serverName}_${counter}`;
84 }
85 await addMcpConfig(finalName, serverConfig, scope);
86 importedCount++;
87 }
88 }
89 done(importedCount);
90 };
91 const [theme] = useTheme();
92 let t6;
93 if ($[8] !== onDone || $[9] !== scope || $[10] !== theme) {

Callers 13

PermissionRuleInputFunction · 0.85
useMultiSelectStateFunction · 0.85
PromptInputFunction · 0.85
applyCommandSuggestionFunction · 0.85
ChooseRepoStepFunction · 0.85
ApiKeyStepFunction · 0.85
processInitialMessageFunction · 0.85
REPLFunction · 0.85
handleEnterFunction · 0.85
onInputFunction · 0.85

Calls 2

addMcpConfigFunction · 0.85
doneFunction · 0.50

Tested by

no test coverage detected