MCPcopy Create free account
hub / github.com/adobe/react-spectrum / CommandMenuItem

Function CommandMenuItem

packages/@react-spectrum/ai/src/PromptField.tsx:1364–1375  ·  view source on GitHub ↗
(props: CommandMenuItemProps)

Source from the content-addressed store, hash-verified

1362 * CommandMenuItem performs an immediate action from within an InsertMenuButton.
1363 */
1364export function CommandMenuItem(props: CommandMenuItemProps) {
1365 let insert = useInsertPromptSegment([]);
1366 return (
1367 <MenuItem
1368 {...props}
1369 onAction={() => {
1370 insert();
1371 props.onAction?.();
1372 }}
1373 />
1374 );
1375}

Callers

nothing calls this directly

Calls 2

useInsertPromptSegmentFunction · 0.85
insertFunction · 0.50

Tested by

no test coverage detected