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

Function buildVoicePrompt

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

Source from the content-addressed store, hash-verified

1138}
1139
1140function buildVoicePrompt(base: TokenFieldValue, voiceText: string): PromptFieldValue {
1141 if (!voiceText) {
1142 return base as PromptFieldValue;
1143 }
1144 return base.replaceRange(base.caretPosition, base.caretPosition, voiceText) as PromptFieldValue;
1145}
1146
1147export interface InsertMenuItemProps extends Pick<MenuTriggerProps, 'onOpenChange'> {
1148 children: React.ReactNode;

Callers 1

PromptFieldVoiceButtonFunction · 0.85

Calls 1

replaceRangeMethod · 0.80

Tested by

no test coverage detected