Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions packages/devextreme-angular/src/ui/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { DataSourceOptions } from 'devextreme/data/data_source';
import { Store } from 'devextreme/data/store';
import { Format } from 'devextreme/common/core/localization';
import { dxFileUploaderOptions } from 'devextreme/ui/file_uploader';
import { dxSpeechToTextOptions } from 'devextreme/ui/speech_to_text';
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Angular wrapper imports dxSpeechToTextOptions from devextreme/ui/speech_to_text, but that module's typings do not export a dxSpeechToTextOptions symbol (it exports Properties). This will break TypeScript builds. Please import Properties (aliased) instead, or add a dxSpeechToTextOptions export in the core speech_to_text.d.ts.

Suggested change
import { dxSpeechToTextOptions } from 'devextreme/ui/speech_to_text';
import { Properties as dxSpeechToTextOptions } from 'devextreme/ui/speech_to_text';

Copilot uses AI. Check for mistakes.

import DxChat from 'devextreme/ui/chat';

Expand Down Expand Up @@ -56,11 +57,14 @@ import { DxoUserModule } from 'devextreme-angular/ui/nested';
import { DxiChatAlertModule } from 'devextreme-angular/ui/chat/nested';
import { DxiChatAttachmentModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatAuthorModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatCustomSpeechRecognizerModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatDayHeaderFormatModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatEditingModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatFileUploaderOptionsModule } from 'devextreme-angular/ui/chat/nested';
import { DxiChatItemModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatMessageTimestampFormatModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatSpeechRecognitionConfigModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatSpeechToTextOptionsModule } from 'devextreme-angular/ui/chat/nested';
import { DxiChatTypingUserModule } from 'devextreme-angular/ui/chat/nested';
import { DxoChatUserModule } from 'devextreme-angular/ui/chat/nested';
import {
Expand Down Expand Up @@ -291,6 +295,16 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
}



@Input()
get inputFieldText(): string | undefined {
return this._getOption('inputFieldText');
}
set inputFieldText(value: string | undefined) {
this._setOption('inputFieldText', value);
}


/**
* [descr:dxChatOptions.items]

Expand Down Expand Up @@ -408,6 +422,16 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
}



@Input()
get speechToTextOptions(): dxSpeechToTextOptions {
return this._getOption('speechToTextOptions');
}
set speechToTextOptions(value: dxSpeechToTextOptions) {
this._setOption('speechToTextOptions', value);
}
Comment on lines 424 to +432
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new @Input() speechToTextOptions block is missing the standard JSDoc/[descr:...] comment that other Chat inputs in this file include. Add the [descr:dxChatOptions.speechToTextOptions] comment block to keep Angular API docs/intellisense consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +425 to +432
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Angular wrapper types speechToTextOptions as dxSpeechToTextOptions, but the core dxChatOptions.speechToTextOptions is Omit<SpeechToTextOptions, 'stylingMode' | 'type'>. Please align the wrapper type with the core widget option (and also update speechToTextOptionsChange) so consumers can’t set options that the Chat widget omits.

Copilot uses AI. Check for mistakes.


/**
* [descr:dxChatOptions.typingUsers]

Expand Down Expand Up @@ -661,6 +685,13 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
*/
@Output() hoverStateEnabledChange: EventEmitter<boolean>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() inputFieldTextChange: EventEmitter<string | undefined>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.
Expand Down Expand Up @@ -724,6 +755,13 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
*/
@Output() showUserNameChange: EventEmitter<boolean>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() speechToTextOptionsChange: EventEmitter<dxSpeechToTextOptions>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.
Expand Down Expand Up @@ -792,6 +830,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
{ emit: 'heightChange' },
{ emit: 'hintChange' },
{ emit: 'hoverStateEnabledChange' },
{ emit: 'inputFieldTextChange' },
{ emit: 'itemsChange' },
{ emit: 'messageTemplateChange' },
{ emit: 'messageTimestampFormatChange' },
Expand All @@ -801,6 +840,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
{ emit: 'showDayHeadersChange' },
{ emit: 'showMessageTimestampChange' },
{ emit: 'showUserNameChange' },
{ emit: 'speechToTextOptionsChange' },
{ emit: 'typingUsersChange' },
{ emit: 'userChange' },
{ emit: 'visibleChange' },
Expand Down Expand Up @@ -869,11 +909,14 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
DxiChatAlertModule,
DxiChatAttachmentModule,
DxoChatAuthorModule,
DxoChatCustomSpeechRecognizerModule,
DxoChatDayHeaderFormatModule,
DxoChatEditingModule,
DxoChatFileUploaderOptionsModule,
DxiChatItemModule,
DxoChatMessageTimestampFormatModule,
DxoChatSpeechRecognitionConfigModule,
DxoChatSpeechToTextOptionsModule,
DxiChatTypingUserModule,
DxoChatUserModule,
DxIntegrationModule,
Expand All @@ -892,11 +935,14 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
DxiChatAlertModule,
DxiChatAttachmentModule,
DxoChatAuthorModule,
DxoChatCustomSpeechRecognizerModule,
DxoChatDayHeaderFormatModule,
DxoChatEditingModule,
DxoChatFileUploaderOptionsModule,
DxiChatItemModule,
DxoChatMessageTimestampFormatModule,
DxoChatSpeechRecognitionConfigModule,
DxoChatSpeechToTextOptionsModule,
DxiChatTypingUserModule,
DxoChatUserModule,
DxTemplateModule
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* tslint:disable:max-line-length */


import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';





import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';


@Component({
selector: 'dxo-chat-custom-speech-recognizer',
standalone: true,
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [NestedOptionHost]
})
export class DxoChatCustomSpeechRecognizerComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get enabled(): boolean {
return this._getOption('enabled');
}
set enabled(value: boolean) {
this._setOption('enabled', value);
}

@Input()
get isListening(): boolean {
return this._getOption('isListening');
}
set isListening(value: boolean) {
this._setOption('isListening', value);
}


protected get _optionPath() {
return 'customSpeechRecognizer';
}


constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}


ngOnInit() {
this._addRecreatedComponent();
}

ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}


}

@NgModule({
imports: [
DxoChatCustomSpeechRecognizerComponent
],
exports: [
DxoChatCustomSpeechRecognizerComponent
],
})
export class DxoChatCustomSpeechRecognizerModule { }
3 changes: 3 additions & 0 deletions packages/devextreme-angular/src/ui/chat/nested/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
export * from './alert-dxi';
export * from './attachment-dxi';
export * from './author';
export * from './custom-speech-recognizer';
export * from './day-header-format';
export * from './editing';
export * from './file-uploader-options';
export * from './item-dxi';
export * from './message-timestamp-format';
export * from './speech-recognition-config';
export * from './speech-to-text-options';
export * from './typing-user-dxi';
export * from './user';

Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/* tslint:disable:max-line-length */


import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';





import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';


@Component({
selector: 'dxo-chat-speech-recognition-config',
standalone: true,
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [NestedOptionHost]
})
export class DxoChatSpeechRecognitionConfigComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get continuous(): boolean {
return this._getOption('continuous');
}
set continuous(value: boolean) {
this._setOption('continuous', value);
}

@Input()
get grammars(): Array<string> {
return this._getOption('grammars');
}
set grammars(value: Array<string>) {
this._setOption('grammars', value);
}

@Input()
get interimResults(): boolean {
return this._getOption('interimResults');
}
set interimResults(value: boolean) {
this._setOption('interimResults', value);
}

@Input()
get lang(): string {
return this._getOption('lang');
}
set lang(value: string) {
this._setOption('lang', value);
}

@Input()
get maxAlternatives(): number {
return this._getOption('maxAlternatives');
}
set maxAlternatives(value: number) {
this._setOption('maxAlternatives', value);
}


protected get _optionPath() {
return 'speechRecognitionConfig';
}


constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}


ngOnInit() {
this._addRecreatedComponent();
}

ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}


}

@NgModule({
imports: [
DxoChatSpeechRecognitionConfigComponent
],
exports: [
DxoChatSpeechRecognitionConfigComponent
],
})
export class DxoChatSpeechRecognitionConfigModule { }
Loading
Loading