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

Function buildVoicePrompt

packages/@react-spectrum/ai/src/PromptField.tsx:1086–1091  ·  view source on GitHub ↗
(base: TokenFieldValue, voiceText: string)

Source from the content-addressed store, hash-verified

1084}
1085
1086function buildVoicePrompt(base: TokenFieldValue, voiceText: string): PromptFieldValue {
1087 if (!voiceText) {
1088 return base as PromptFieldValue;
1089 }
1090 return base.replaceRange(base.caretPosition, base.caretPosition, voiceText) as PromptFieldValue;
1091}
1092
1093export interface InsertMenuItemProps extends Pick<MenuTriggerProps, 'onOpenChange'> {
1094 children: React.ReactNode;

Callers 1

PromptFieldVoiceButtonFunction · 0.85

Calls 1

replaceRangeMethod · 0.80

Tested by

no test coverage detected