Skip to content

Commit 3c102f8

Browse files
authored
acct for udf setting (microsoft#250663)
1 parent f3d66ce commit 3c102f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/chat/browser/languageModelToolsService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ export class LanguageModelToolsService extends Disposable implements ILanguageMo
380380
if (autoApproved) {
381381
return;
382382
}
383-
const setting: { sound: 'auto' | 'on' | 'off'; announcement: 'auto' | 'off' } = this._configurationService.getValue(AccessibilitySignal.chatUserActionRequired.settingsKey);
383+
const setting: { sound?: 'auto' | 'on' | 'off'; announcement?: 'auto' | 'off' } | undefined = this._configurationService.getValue(AccessibilitySignal.chatUserActionRequired.settingsKey);
384+
if (!setting) {
385+
return;
386+
}
384387
const soundEnabled = setting.sound === 'on' || (setting.sound === 'auto' && (this._accessibilityService.isScreenReaderOptimized() || !hasFocusedWindow));
385388
const announcementEnabled = this._accessibilityService.isScreenReaderOptimized() && setting.announcement === 'auto';
386389
if (soundEnabled || announcementEnabled) {

0 commit comments

Comments
 (0)