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

Function handleSinglePluginInstall

src/commands/plugin/DiscoverPlugins.tsx:280–311  ·  view source on GitHub ↗
(plugin_1: InstallablePlugin, scope: 'user' | 'project' | 'local' = 'user')

Source from the content-addressed store, hash-verified

278
279 // Install single plugin from details view
280 const handleSinglePluginInstall = async (plugin_1: InstallablePlugin, scope: 'user' | 'project' | 'local' = 'user') => {
281 setIsInstalling(true);
282 setInstallError(null);
283 const result_0 = await installPluginFromMarketplace({
284 pluginId: plugin_1.pluginId,
285 entry: plugin_1.entry,
286 marketplaceName: plugin_1.marketplaceName,
287 scope
288 });
289 if (result_0.success) {
290 const loaded = await findPluginOptionsTarget(plugin_1.pluginId);
291 if (loaded) {
292 setIsInstalling(false);
293 setViewState({
294 type: 'plugin-options',
295 plugin: loaded,
296 pluginId: plugin_1.pluginId
297 });
298 return;
299 }
300 setResult(result_0.message);
301 if (onInstallComplete) {
302 await onInstallComplete();
303 }
304 setParentViewState({
305 type: 'menu'
306 });
307 } else {
308 setIsInstalling(false);
309 setInstallError(result_0.error);
310 }
311 };
312
313 // Handle error state
314 useEffect(() => {

Callers 1

DiscoverPluginsFunction · 0.70

Calls 2

findPluginOptionsTargetFunction · 0.85

Tested by

no test coverage detected