-
Notifications
You must be signed in to change notification settings - Fork 667
Chat: Add STT / SpeechToText Integration (d.ts) #32517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Chat: Add STT / SpeechToText Integration (d.ts) #32517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds new Chat API surface for controlling the message input text and configuring speech-to-text (STT), and wires these options through the wrapper packages/types so consumers can use the feature across frameworks.
Changes:
- Added
dxChatOptions.inputFieldTextanddxChatOptions.speechToTextOptionsto DevExtreme typings. - Refactored
dxSpeechToTextoption typings to exposedxSpeechToTextOptions(deprecated) and aliasPropertiesto it. - Updated Angular/Vue/React Chat wrappers to expose
speechToTextOptionsand add nested configuration components for STT.
Reviewed changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/ts/dx.all.d.ts | Adds inputFieldText/speechToTextOptions to dxChatOptions; refactors dxSpeechToText properties typing. |
| packages/devextreme/js/ui/speech_to_text_types.d.ts | Re-exports dxSpeechToTextOptions from speech_to_text. |
| packages/devextreme/js/ui/speech_to_text.d.ts | Introduces dxSpeechToTextOptions interface (deprecated) and aliases Properties to it. |
| packages/devextreme/js/ui/chat.d.ts | Adds Chat inputFieldText and speechToTextOptions typings. |
| packages/devextreme-vue/src/chat.ts | Exposes inputFieldText/speechToTextOptions and adds STT nested config components. |
| packages/devextreme-react/src/chat.ts | Adds STT nested config components for Chat. |
| packages/devextreme-metadata/make-angular-metadata.ts | Adjusts Angular metadata filtering for Chat members. |
| packages/devextreme-angular/src/ui/chat/nested/speech-to-text-options.ts | Adds Angular nested option component for Chat STT options. |
| packages/devextreme-angular/src/ui/chat/nested/speech-recognition-config.ts | Adds Angular nested option component for STT recognition config. |
| packages/devextreme-angular/src/ui/chat/nested/custom-speech-recognizer.ts | Adds Angular nested option component for custom recognizer config. |
| packages/devextreme-angular/src/ui/chat/nested/index.ts | Exports the new nested option components. |
| packages/devextreme-angular/src/ui/chat/index.ts | Exposes inputFieldText and speechToTextOptions on the Angular Chat component and wires change emitters/modules. |
| speechToTextOptions: Object as PropType<dxSpeechToTextOptions | Record<string, any>>, | ||
| typingUsers: Array as PropType<Array<User>>, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Vue wrapper types speechToTextOptions as dxSpeechToTextOptions, but dxChatOptions.speechToTextOptions is Omit<SpeechToTextProperties, 'stylingMode' | 'type'>. Please align the Vue prop type with the core Chat typings (and avoid accepting stylingMode/type here).
| stylingMode: String as PropType<ButtonStyle>, | ||
| tabIndex: Number, | ||
| type: String as PropType<ButtonType | string>, | ||
| visible: Boolean, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DxSpeechToTextOptions currently exposes stylingMode and type, but dxChatOptions.speechToTextOptions omits these fields. Please remove these props from the nested option config (and drop the related ButtonStyle/ButtonType imports if they become unused) to keep wrapper API consistent with core typings.
| stylingMode?: ButtonStyle; | ||
| tabIndex?: number; | ||
| type?: ButtonType | string; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ISpeechToTextOptionsProps includes stylingMode and type, but core dxChatOptions.speechToTextOptions is Omit<SpeechToTextProperties, 'stylingMode' | 'type'>. Please remove these props (and the ButtonStyle/ButtonType imports if they become unused) so the React nested option can’t set fields that Chat’s public API intentionally excludes.
| stylingMode?: ButtonStyle; | |
| tabIndex?: number; | |
| type?: ButtonType | string; | |
| tabIndex?: number; |
| get speechToTextOptions(): dxSpeechToTextOptions { | ||
| return this._getOption('speechToTextOptions'); | ||
| } | ||
| set speechToTextOptions(value: dxSpeechToTextOptions) { | ||
| this._setOption('speechToTextOptions', value); |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
speechToTextOptions is typed as dxSpeechToTextOptions, but the core dxChatOptions.speechToTextOptions type is Omit<SpeechToTextProperties, 'stylingMode' | 'type'>. The Angular wrapper should use the same omitted type (and update the corresponding speechToTextOptionsChange output type as well) so consumers can’t pass unsupported stylingMode/type values.
| @Input() | ||
| get stylingMode(): ButtonStyle { | ||
| return this._getOption('stylingMode'); | ||
| } | ||
| set stylingMode(value: ButtonStyle) { | ||
| this._setOption('stylingMode', value); | ||
| } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylingMode is exposed on the dxo-chat-speech-to-text-options nested option, but dxChatOptions.speechToTextOptions intentionally omits stylingMode (and type). Please remove these inputs from the nested option (or otherwise prevent them from being set) to match the Chat public API typings.
| @Input() | ||
| get type(): ButtonType | string { | ||
| return this._getOption('type'); | ||
| } | ||
| set type(value: ButtonType | string) { | ||
| this._setOption('type', value); | ||
| } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type is exposed on the dxo-chat-speech-to-text-options nested option, but dxChatOptions.speechToTextOptions omits type (and stylingMode) in the core typings. Please remove this input (or block it from being set) so Angular wrapper matches the supported Chat option surface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 13 changed files in this pull request and generated 3 comments.
| "update:stopIcon": null, | ||
| "update:stopText": null, | ||
| "update:stylingMode": null, | ||
| "update:tabIndex": null, | ||
| "update:type": null, | ||
| "update:visible": null, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DxSpeechToTextOptions exposes stylingMode/type updates, but dxChatOptions.speechToTextOptions omits these fields. Remove these emits (and related props) so the nested configuration surface matches the underlying Chat option type.
| get speechToTextOptions(): dxSpeechToTextOptions { | ||
| return this._getOption('speechToTextOptions'); | ||
| } | ||
| set speechToTextOptions(value: dxSpeechToTextOptions) { |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dxChatOptions.speechToTextOptions is typed in core as Omit<dxSpeechToTextOptions, 'stylingMode' | 'type'> (see packages/devextreme/js/ui/chat.d.ts). The Angular wrapper exposes it as full dxSpeechToTextOptions, which allows unsupported options to be passed in and diverges from the runtime API. Align the type here with the core option (omit stylingMode and type).
| get speechToTextOptions(): dxSpeechToTextOptions { | |
| return this._getOption('speechToTextOptions'); | |
| } | |
| set speechToTextOptions(value: dxSpeechToTextOptions) { | |
| get speechToTextOptions(): Omit<dxSpeechToTextOptions, 'stylingMode' | 'type'> { | |
| return this._getOption('speechToTextOptions'); | |
| } | |
| set speechToTextOptions(value: Omit<dxSpeechToTextOptions, 'stylingMode' | 'type'>) { |
| * This member supports the internal infrastructure and is not intended to be used directly from your code. | ||
|
|
||
| */ | ||
| @Output() speechToTextOptionsChange: EventEmitter<dxSpeechToTextOptions>; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
speechToTextOptionsChange should match the actual option type exposed by the component (Omit<dxSpeechToTextOptions, 'stylingMode' | 'type'>). Using dxSpeechToTextOptions here makes the event type broader than the supported option surface.
| @Output() speechToTextOptionsChange: EventEmitter<dxSpeechToTextOptions>; | |
| @Output() speechToTextOptionsChange: EventEmitter<Omit<dxSpeechToTextOptions, 'stylingMode' | 'type'>>; |
No description provided.