(props: InsertTokenMenuItemProps)
| 1295 | * InsertMenuButton. |
| 1296 | */ |
| 1297 | export function InsertTokenMenuItem(props: InsertTokenMenuItemProps) { |
| 1298 | let insert = useInsertPromptSegment([props.token]); |
| 1299 | |
| 1300 | return ( |
| 1301 | <MenuItem |
| 1302 | {...props} |
| 1303 | onAction={() => { |
| 1304 | insert(); |
| 1305 | props.onAction?.(); |
| 1306 | }} |
| 1307 | /> |
| 1308 | ); |
| 1309 | } |
| 1310 | |
| 1311 | export interface InsertTextMenuItemProps extends Omit< |
| 1312 | MenuItemProps, |
nothing calls this directly
no test coverage detected