mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-06 05:14:41 +01:00
@@ -311,7 +311,6 @@ export class Sound {
|
||||
public static readonly diffLineDeleted = Sound.register({ fileName: 'diffLineDeleted.mp3' });
|
||||
public static readonly diffLineModified = Sound.register({ fileName: 'diffLineModified.mp3' });
|
||||
public static readonly chatRequestSent = Sound.register({ fileName: 'chatRequestSent.mp3' });
|
||||
public static readonly chatResponsePending = Sound.register({ fileName: 'chatResponsePending.mp3' });
|
||||
public static readonly chatResponseReceived1 = Sound.register({ fileName: 'chatResponseReceived1.mp3' });
|
||||
public static readonly chatResponseReceived2 = Sound.register({ fileName: 'chatResponseReceived2.mp3' });
|
||||
public static readonly chatResponseReceived3 = Sound.register({ fileName: 'chatResponseReceived3.mp3' });
|
||||
@@ -321,6 +320,7 @@ export class Sound {
|
||||
public static readonly format = Sound.register({ fileName: 'format.mp3' });
|
||||
public static readonly voiceRecordingStarted = Sound.register({ fileName: 'voiceRecordingStarted.mp3' });
|
||||
public static readonly voiceRecordingStopped = Sound.register({ fileName: 'voiceRecordingStopped.mp3' });
|
||||
public static readonly progress = Sound.register({ fileName: 'progress.mp3' });
|
||||
|
||||
private constructor(public readonly fileName: string) { }
|
||||
}
|
||||
@@ -359,7 +359,7 @@ export const enum AccessibilityAlertSettingId {
|
||||
OnDebugBreak = 'accessibility.alert.onDebugBreak',
|
||||
NoInlayHints = 'accessibility.alert.noInlayHints',
|
||||
LineHasBreakpoint = 'accessibility.alert.lineHasBreakpoint',
|
||||
ChatResponsePending = 'accessibility.alert.chatResponsePending'
|
||||
Progress = 'accessibility.alert.chatResponseProgress'
|
||||
}
|
||||
|
||||
|
||||
@@ -553,13 +553,13 @@ export class AccessibilitySignal {
|
||||
settingsKey: 'accessibility.signals.chatResponseReceived'
|
||||
});
|
||||
|
||||
public static readonly chatResponsePending = AccessibilitySignal.register({
|
||||
name: localize('accessibilitySignals.chatResponsePending', 'Chat Response Pending'),
|
||||
sound: Sound.chatResponsePending,
|
||||
public static readonly progress = AccessibilitySignal.register({
|
||||
name: localize('accessibilitySignals.progress', 'Progress'),
|
||||
sound: Sound.progress,
|
||||
legacySoundSettingsKey: 'audioCues.chatResponsePending',
|
||||
legacyAnnouncementSettingsKey: AccessibilityAlertSettingId.ChatResponsePending,
|
||||
announcementMessage: localize('accessibility.signals.chatResponsePending', 'Chat Response Pending'),
|
||||
settingsKey: 'accessibility.signals.chatResponsePending'
|
||||
legacyAnnouncementSettingsKey: AccessibilityAlertSettingId.Progress,
|
||||
announcementMessage: localize('accessibility.signals.progress', 'Progress'),
|
||||
settingsKey: 'accessibility.signals.progress'
|
||||
});
|
||||
|
||||
public static readonly clear = AccessibilitySignal.register({
|
||||
|
||||
@@ -18,7 +18,7 @@ export class AccessibilityProgressSignalScheduler extends Disposable {
|
||||
constructor(msDelayTime: number, msLoopTime: number | undefined, @IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService) {
|
||||
super();
|
||||
this._scheduler = new RunOnceScheduler(() => {
|
||||
this._signalLoop = this._accessibilitySignalService.playSignalLoop(AccessibilitySignal.chatResponsePending, msLoopTime ?? PROGRESS_SIGNAL_LOOP_DELAY);
|
||||
this._signalLoop = this._accessibilitySignalService.playSignalLoop(AccessibilitySignal.progress, msLoopTime ?? PROGRESS_SIGNAL_LOOP_DELAY);
|
||||
}, msDelayTime);
|
||||
this._scheduler.schedule();
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ const configuration: IConfigurationNode = {
|
||||
'markdownDescription': localize('announcement.chatRequestSent', "Indicates when a chat request is sent. Also see {0}.", '`#audioCues.chatRequestSent#`'),
|
||||
...baseAlertProperty
|
||||
},
|
||||
[AccessibilityAlertSettingId.ChatResponsePending]: {
|
||||
'markdownDescription': localize('announcement.chatResponsePending', "Indicates when a chat response is pending. Also see {0}.", '`#audioCues.chatResponsePending#`'),
|
||||
[AccessibilityAlertSettingId.Progress]: {
|
||||
'markdownDescription': localize('announcement.progress', "Indicates when a chat response is pending. Also see {0}.", '`#audioCues.chatResponsePending#`'),
|
||||
...baseAlertProperty
|
||||
},
|
||||
[AccessibilityAlertSettingId.NoInlayHints]: {
|
||||
@@ -540,16 +540,16 @@ const configuration: IConfigurationNode = {
|
||||
},
|
||||
}
|
||||
},
|
||||
'accessibility.signals.chatResponsePending': {
|
||||
'accessibility.signals.progress': {
|
||||
...signalFeatureBase,
|
||||
'description': localize('accessibility.signals.chatResponsePending', "Plays a signal on loop while the response is pending."),
|
||||
'description': localize('accessibility.signals.progress', "Plays a signal on loop while progress is occurring."),
|
||||
'properties': {
|
||||
'sound': {
|
||||
'description': localize('accessibility.signals.chatResponsePending.sound', "Plays a sound on loop while the response is pending."),
|
||||
'description': localize('accessibility.signals.progress.sound', "Plays a sound on loop while progress is occurring."),
|
||||
...soundFeatureBase
|
||||
},
|
||||
'announcement': {
|
||||
'description': localize('accessibility.signals.chatResponsePending.announcement', "Alerts on loop while the response is pending."),
|
||||
'description': localize('accessibility.signals.progress.announcement', "Alerts on loop while progress is occurring."),
|
||||
...announcementFeatureBase
|
||||
},
|
||||
},
|
||||
@@ -790,6 +790,18 @@ Registry.as<IConfigurationMigrationRegistry>(WorkbenchExtensions.ConfigurationMi
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
Registry.as<IConfigurationMigrationRegistry>(WorkbenchExtensions.ConfigurationMigration)
|
||||
.registerConfigurationMigrations([{
|
||||
key: 'accessibility.signals.chatResponsePending',
|
||||
migrateFn: (value, accessor) => {
|
||||
return [
|
||||
['accessibility.signals.progress', { value }],
|
||||
['accessibility.signals.chatResponsePending', { value: undefined }],
|
||||
];
|
||||
}
|
||||
}]);
|
||||
|
||||
Registry.as<IConfigurationMigrationRegistry>(WorkbenchExtensions.ConfigurationMigration)
|
||||
.registerConfigurationMigrations(AccessibilitySignal.allAccessibilitySignals.map(item => ({
|
||||
key: item.legacySoundSettingsKey,
|
||||
|
||||
Reference in New Issue
Block a user