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

Function handleSelect

src/commands/plugin/PluginSettings.tsx:429–487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

427 }
428 useKeybinding("confirm:no", t4, t5);
429 const handleSelect = () => {
430 const row = rows[selectedIndex];
431 if (!row) {
432 return;
433 }
434 const {
435 action
436 } = row;
437 bb77: switch (action.kind) {
438 case "navigate":
439 {
440 setActiveTab(action.tab);
441 setViewState(action.viewState);
442 break bb77;
443 }
444 case "remove-extra-marketplace":
445 {
446 const scopes = action.sources.map(_temp8).join(", ");
447 removeExtraMarketplace(action.name, action.sources);
448 clearAllCaches();
449 setAppState(prev_0 => ({
450 ...prev_0,
451 plugins: {
452 ...prev_0.plugins,
453 errors: prev_0.plugins.errors.filter(e_2 => !("marketplace" in e_2 && e_2.marketplace === action.name)),
454 installationStatus: {
455 ...prev_0.plugins.installationStatus,
456 marketplaces: prev_0.plugins.installationStatus.marketplaces.filter(m_1 => m_1.name !== action.name)
457 }
458 }
459 }));
460 setActionMessage(`${figures.tick} Removed "${action.name}" from ${scopes} settings`);
461 markPluginsChanged();
462 break bb77;
463 }
464 case "remove-installed-marketplace":
465 {
466 (async () => {
467 ;
468 try {
469 await removeMarketplaceSource(action.name);
470 clearAllCaches();
471 setMarketplaceLoadFailures(prev => prev.filter(f => f.name !== action.name));
472 setActionMessage(`${figures.tick} Removed marketplace "${action.name}"`);
473 markPluginsChanged();
474 } catch (t6) {
475 const err = t6;
476 setActionMessage(`Failed to remove "${action.name}": ${err instanceof Error ? err.message : String(err)}`);
477 }
478 })();
479 break bb77;
480 }
481 case "managed-only":
482 {
483 break bb77;
484 }
485 case "none":
486 }

Callers

nothing calls this directly

Calls 3

removeExtraMarketplaceFunction · 0.85
clearAllCachesFunction · 0.85
removeMarketplaceSourceFunction · 0.85

Tested by

no test coverage detected