MCPcopy Create free account
hub / github.com/altic-dev/Pilot / handleClick

Method handleClick

public/picker/react-component-picker.js:129–147  ·  view source on GitHub ↗

* Handle click events

(event)

Source from the content-addressed store, hash-verified

127 * Handle click events
128 */
129 handleClick(event) {
130 if (!this.isActive) return;
131
132 event.preventDefault();
133 event.stopPropagation();
134
135 const element = event.target;
136 if (!element) return;
137
138 try {
139 const componentInfo = this.extractComponentInfo(element);
140 this.sendToParent(componentInfo);
141 this.deactivate();
142 } catch (error) {
143 console.error('[Pilot Picker] Error extracting component info:', error);
144 this.sendError('Failed to extract component information');
145 this.deactivate();
146 }
147 }
148
149 /**
150 * Handle keyboard events

Callers

nothing calls this directly

Calls 4

extractComponentInfoMethod · 0.95
sendToParentMethod · 0.95
deactivateMethod · 0.95
sendErrorMethod · 0.95

Tested by

no test coverage detected