Public Access
Change English profile hotkey
This commit is contained in:
@@ -42,7 +42,7 @@ public sealed class AsrDiagnosticEndpointTests
|
|||||||
configuration.AddInMemoryCollection(new Dictionary<string, string?>
|
configuration.AddInMemoryCollection(new Dictionary<string, string?>
|
||||||
{
|
{
|
||||||
["MeetingAssistant:FunAsr:Backend:Enabled"] = "false",
|
["MeetingAssistant:FunAsr:Backend:Enabled"] = "false",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+E",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+L",
|
||||||
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:Language"] = "en-US"
|
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:Language"] = "en-US"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public sealed class ConfiguredSpeechRecognitionPipelineFactoryTests
|
|||||||
{
|
{
|
||||||
["MeetingAssistant:Recording:TranscriptionProvider"] = "capturing",
|
["MeetingAssistant:Recording:TranscriptionProvider"] = "capturing",
|
||||||
["MeetingAssistant:Agent:Model"] = "default-model",
|
["MeetingAssistant:Agent:Model"] = "default-model",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+E",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+L",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Recording:TranscriptionProvider"] = "capturing",
|
["MeetingAssistant:LaunchProfiles:english:Recording:TranscriptionProvider"] = "capturing",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Agent:Model"] = "english-model"
|
["MeetingAssistant:LaunchProfiles:english:Agent:Model"] = "english-model"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public sealed class LaunchProfileOptionsProviderTests
|
|||||||
["MeetingAssistant:AzureSpeech:Region"] = "germanywestcentral",
|
["MeetingAssistant:AzureSpeech:Region"] = "germanywestcentral",
|
||||||
["MeetingAssistant:AzureSpeech:Language"] = "de-DE",
|
["MeetingAssistant:AzureSpeech:Language"] = "de-DE",
|
||||||
["MeetingAssistant:AzureSpeech:AutoDetectLanguages:0"] = "de-DE",
|
["MeetingAssistant:AzureSpeech:AutoDetectLanguages:0"] = "de-DE",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+E",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+L",
|
||||||
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:Language"] = "en-US",
|
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:Language"] = "en-US",
|
||||||
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:AutoDetectLanguages:0"] = "en-US"
|
["MeetingAssistant:LaunchProfiles:english:AzureSpeech:AutoDetectLanguages:0"] = "en-US"
|
||||||
});
|
});
|
||||||
@@ -41,13 +41,23 @@ public sealed class LaunchProfileOptionsProviderTests
|
|||||||
var profile = provider.GetRequiredProfile("english");
|
var profile = provider.GetRequiredProfile("english");
|
||||||
|
|
||||||
Assert.Equal("english", profile.Name);
|
Assert.Equal("english", profile.Name);
|
||||||
Assert.Equal("Ctrl+Alt+E", profile.Options.Hotkey.Toggle);
|
Assert.Equal("Ctrl+Alt+L", profile.Options.Hotkey.Toggle);
|
||||||
Assert.Equal("azure-speech", profile.Options.Recording.TranscriptionProvider);
|
Assert.Equal("azure-speech", profile.Options.Recording.TranscriptionProvider);
|
||||||
Assert.Equal("germanywestcentral", profile.Options.AzureSpeech.Region);
|
Assert.Equal("germanywestcentral", profile.Options.AzureSpeech.Region);
|
||||||
Assert.Equal("en-US", profile.Options.AzureSpeech.Language);
|
Assert.Equal("en-US", profile.Options.AzureSpeech.Language);
|
||||||
Assert.Equal(["en-US"], profile.Options.AzureSpeech.AutoDetectLanguages);
|
Assert.Equal(["en-US"], profile.Options.AzureSpeech.AutoDetectLanguages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void CheckedInEnglishProfileUsesLanguageHotkey()
|
||||||
|
{
|
||||||
|
var provider = CreateProviderFromAppsettings();
|
||||||
|
|
||||||
|
var profile = provider.GetRequiredProfile("english");
|
||||||
|
|
||||||
|
Assert.Equal("Ctrl+Alt+L", profile.Options.Hotkey.Toggle);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void DuplicateProfileHotkeysAreRejected()
|
public void DuplicateProfileHotkeysAreRejected()
|
||||||
{
|
{
|
||||||
@@ -69,7 +79,7 @@ public sealed class LaunchProfileOptionsProviderTests
|
|||||||
["MeetingAssistant:Hotkey:Toggle"] = "Ctrl+Alt+M",
|
["MeetingAssistant:Hotkey:Toggle"] = "Ctrl+Alt+M",
|
||||||
["MeetingAssistant:Hotkey:Abort"] = "Ctrl+Alt+Z",
|
["MeetingAssistant:Hotkey:Abort"] = "Ctrl+Alt+Z",
|
||||||
["MeetingAssistant:Screenshots:Hotkey"] = "Ctrl+Alt+S",
|
["MeetingAssistant:Screenshots:Hotkey"] = "Ctrl+Alt+S",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+E",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+L",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Abort"] = "Ctrl+Alt+Shift+D",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Abort"] = "Ctrl+Alt+Shift+D",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Screenshots:Hotkey"] = "Ctrl+Alt+Shift+S"
|
["MeetingAssistant:LaunchProfiles:english:Screenshots:Hotkey"] = "Ctrl+Alt+Shift+S"
|
||||||
});
|
});
|
||||||
@@ -136,4 +146,28 @@ public sealed class LaunchProfileOptionsProviderTests
|
|||||||
.Build();
|
.Build();
|
||||||
return new ConfigurationLaunchProfileOptionsProvider(configuration);
|
return new ConfigurationLaunchProfileOptionsProvider(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static ConfigurationLaunchProfileOptionsProvider CreateProviderFromAppsettings()
|
||||||
|
{
|
||||||
|
var root = FindRepositoryRoot();
|
||||||
|
var configuration = new ConfigurationBuilder()
|
||||||
|
.AddJsonFile(Path.Combine(root, "MeetingAssistant", "appsettings.json"), optional: false)
|
||||||
|
.Build();
|
||||||
|
return new ConfigurationLaunchProfileOptionsProvider(configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string FindRepositoryRoot()
|
||||||
|
{
|
||||||
|
for (var directory = new DirectoryInfo(AppContext.BaseDirectory);
|
||||||
|
directory is not null;
|
||||||
|
directory = directory.Parent)
|
||||||
|
{
|
||||||
|
if (File.Exists(Path.Combine(directory.FullName, "MeetingAssistant.slnx")))
|
||||||
|
{
|
||||||
|
return directory.FullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new InvalidOperationException("Could not locate MeetingAssistant.slnx from the test output folder.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1987,7 +1987,7 @@ public sealed class RecordingCoordinatorTests
|
|||||||
["MeetingAssistant:Vault:SummariesFolder"] = "Summaries",
|
["MeetingAssistant:Vault:SummariesFolder"] = "Summaries",
|
||||||
["MeetingAssistant:Recording:TemporaryRecordingsFolder"] = Path.Combine(defaultRoot, "Recordings"),
|
["MeetingAssistant:Recording:TemporaryRecordingsFolder"] = Path.Combine(defaultRoot, "Recordings"),
|
||||||
["MeetingAssistant:Agent:Model"] = "default-summary-model",
|
["MeetingAssistant:Agent:Model"] = "default-summary-model",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+E",
|
["MeetingAssistant:LaunchProfiles:english:Hotkey:Toggle"] = "Ctrl+Alt+L",
|
||||||
["MeetingAssistant:LaunchProfiles:english:Vault:BaseFolder"] = englishRoot,
|
["MeetingAssistant:LaunchProfiles:english:Vault:BaseFolder"] = englishRoot,
|
||||||
["MeetingAssistant:LaunchProfiles:english:Recording:TemporaryRecordingsFolder"] = Path.Combine(englishRoot, "Recordings"),
|
["MeetingAssistant:LaunchProfiles:english:Recording:TemporaryRecordingsFolder"] = Path.Combine(englishRoot, "Recordings"),
|
||||||
["MeetingAssistant:LaunchProfiles:english:Agent:Model"] = "english-summary-model"
|
["MeetingAssistant:LaunchProfiles:english:Agent:Model"] = "english-summary-model"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public sealed class TaskbarIconTests
|
|||||||
{
|
{
|
||||||
var menu = MeetingTaskbarMenuBuilder.Build(
|
var menu = MeetingTaskbarMenuBuilder.Build(
|
||||||
Status(),
|
Status(),
|
||||||
[Profile("default", "Ctrl+Alt+M"), Profile("english", "Ctrl+Alt+E")]);
|
[Profile("default", "Ctrl+Alt+M"), Profile("english", "Ctrl+Alt+L")]);
|
||||||
|
|
||||||
Assert.Equal(RecordingProcessState.Idle, menu.State);
|
Assert.Equal(RecordingProcessState.Idle, menu.State);
|
||||||
Assert.Contains(menu.Items, item =>
|
Assert.Contains(menu.Items, item =>
|
||||||
@@ -26,7 +26,7 @@ public sealed class TaskbarIconTests
|
|||||||
Assert.Contains(menu.Items, item =>
|
Assert.Contains(menu.Items, item =>
|
||||||
item.Action == MeetingTaskbarAction.StartRecording &&
|
item.Action == MeetingTaskbarAction.StartRecording &&
|
||||||
item.ProfileName == "english" &&
|
item.ProfileName == "english" &&
|
||||||
item.Text == "Start meeting recording (english)\tCtrl+Alt+E");
|
item.Text == "Start meeting recording (english)\tCtrl+Alt+L");
|
||||||
Assert.DoesNotContain(menu.Items, item => item.Action == MeetingTaskbarAction.StopRecording);
|
Assert.DoesNotContain(menu.Items, item => item.Action == MeetingTaskbarAction.StopRecording);
|
||||||
Assert.DoesNotContain(menu.Items, item => item.Action == MeetingTaskbarAction.AbortRecording);
|
Assert.DoesNotContain(menu.Items, item => item.Action == MeetingTaskbarAction.AbortRecording);
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ public sealed class TaskbarIconTests
|
|||||||
{
|
{
|
||||||
var menu = MeetingTaskbarMenuBuilder.Build(
|
var menu = MeetingTaskbarMenuBuilder.Build(
|
||||||
Status(isRecording: true, state: RecordingProcessState.Recording, profile: "default"),
|
Status(isRecording: true, state: RecordingProcessState.Recording, profile: "default"),
|
||||||
[Profile("default", "Ctrl+Alt+M"), Profile("english", "Ctrl+Alt+E"), Profile("french", "Ctrl+Alt+F")]);
|
[Profile("default", "Ctrl+Alt+M"), Profile("english", "Ctrl+Alt+L"), Profile("french", "Ctrl+Alt+F")]);
|
||||||
|
|
||||||
Assert.Equal(RecordingProcessState.Recording, menu.State);
|
Assert.Equal(RecordingProcessState.Recording, menu.State);
|
||||||
Assert.Contains(menu.Items, item => item.Action == MeetingTaskbarAction.StopRecording);
|
Assert.Contains(menu.Items, item => item.Action == MeetingTaskbarAction.StopRecording);
|
||||||
@@ -44,7 +44,7 @@ public sealed class TaskbarIconTests
|
|||||||
Assert.Contains(menu.Items, item =>
|
Assert.Contains(menu.Items, item =>
|
||||||
item.Action == MeetingTaskbarAction.SwitchProfile &&
|
item.Action == MeetingTaskbarAction.SwitchProfile &&
|
||||||
item.ProfileName == "english" &&
|
item.ProfileName == "english" &&
|
||||||
item.Text == "Switch to english\tCtrl+Alt+E");
|
item.Text == "Switch to english\tCtrl+Alt+L");
|
||||||
Assert.Contains(menu.Items, item =>
|
Assert.Contains(menu.Items, item =>
|
||||||
item.Action == MeetingTaskbarAction.SwitchProfile &&
|
item.Action == MeetingTaskbarAction.SwitchProfile &&
|
||||||
item.ProfileName == "french" &&
|
item.ProfileName == "french" &&
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
"LaunchProfiles": {
|
"LaunchProfiles": {
|
||||||
"english": {
|
"english": {
|
||||||
"Hotkey": {
|
"Hotkey": {
|
||||||
"Toggle": "Ctrl+Alt+E"
|
"Toggle": "Ctrl+Alt+L"
|
||||||
},
|
},
|
||||||
"AzureSpeech": {
|
"AzureSpeech": {
|
||||||
"Language": "en-US",
|
"Language": "en-US",
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ This example is abbreviated so the most common shape is readable. The checked-in
|
|||||||
"LaunchProfiles": {
|
"LaunchProfiles": {
|
||||||
"english": {
|
"english": {
|
||||||
"Hotkey": {
|
"Hotkey": {
|
||||||
"Toggle": "Ctrl+Alt+E"
|
"Toggle": "Ctrl+Alt+L"
|
||||||
},
|
},
|
||||||
"AzureSpeech": {
|
"AzureSpeech": {
|
||||||
"Language": "en-US",
|
"Language": "en-US",
|
||||||
|
|||||||
@@ -228,10 +228,10 @@ Meeting Assistant SHALL provide a diagnostic endpoint that opens the workflow ru
|
|||||||
|
|
||||||
#### Scenario: Tray menu shows configured profile hotkeys
|
#### Scenario: Tray menu shows configured profile hotkeys
|
||||||
- **GIVEN** the `default` launch profile uses `Ctrl+Alt+M`
|
- **GIVEN** the `default` launch profile uses `Ctrl+Alt+M`
|
||||||
- **AND** the `english` launch profile uses `Ctrl+Alt+E`
|
- **AND** the `english` launch profile uses `Ctrl+Alt+L`
|
||||||
- **WHEN** the user opens the tray icon menu while Meeting Assistant is idle
|
- **WHEN** the user opens the tray icon menu while Meeting Assistant is idle
|
||||||
- **THEN** the menu includes a start item for `default` showing `Ctrl+Alt+M`
|
- **THEN** the menu includes a start item for `default` showing `Ctrl+Alt+M`
|
||||||
- **AND** the menu includes a start item for `english` showing `Ctrl+Alt+E`
|
- **AND** the menu includes a start item for `english` showing `Ctrl+Alt+L`
|
||||||
|
|
||||||
#### Scenario: Rules editor can be opened diagnostically
|
#### Scenario: Rules editor can be opened diagnostically
|
||||||
- **WHEN** a diagnostic caller requests the workflow rules editor to open
|
- **WHEN** a diagnostic caller requests the workflow rules editor to open
|
||||||
|
|||||||
Reference in New Issue
Block a user