From de25059de0f0ba5c4eb5d9be930c9e60f2d47dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Thu, 19 Feb 2026 19:33:28 +0100 Subject: [PATCH 01/13] CmdPal: Fix starting new web URI for default browser that doesn't support exe arguments (#45614) ## Summary of the Pull Request This PR changes the way the Web Search built-in extension handles full URIs: it bypasses default browser discovery and asks the shell to open the URI directly. The original execution path remains as a fallback and for simple queries (when a custom search engine is not set). ## PR Checklist - [x] Closes: #45610 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .../Browser/BrowserInfoServiceExtensions.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/Browser/BrowserInfoServiceExtensions.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/Browser/BrowserInfoServiceExtensions.cs index 1614273d83..40777dd391 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/Browser/BrowserInfoServiceExtensions.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/Browser/BrowserInfoServiceExtensions.cs @@ -2,6 +2,8 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using ManagedCommon; using Microsoft.CommandPalette.Extensions.Toolkit; namespace Microsoft.CmdPal.Ext.WebSearch.Helpers.Browser; @@ -26,6 +28,22 @@ internal static class BrowserInfoServiceExtensions /// public static bool Open(this IBrowserInfoService browserInfoService, string url) { + // If the URL is a valid URI, attempt to open it with the default browser by invoking it through the shell. + if (Uri.TryCreate(url, UriKind.Absolute, out _)) + { + try + { + ShellHelpers.OpenInShell(url); + return true; + } + catch (Exception ex) + { + Logger.LogDebug($"Failed to launch the URI {url}: {ex}"); + } + } + + // Use legacy method to open the URL if it's not a well-formed URI or if the shell launch fails. + // This may handle cases where the URL is a search query or a custom URI scheme. var defaultBrowser = browserInfoService.GetDefaultBrowser(); return defaultBrowser != null && ShellHelpers.OpenCommandInShell(defaultBrowser.Path, defaultBrowser.ArgumentsPattern, url); } From dcf4c4d16def720e09fc5937031e80080efab5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Thu, 19 Feb 2026 19:39:18 +0100 Subject: [PATCH 02/13] CmdPal: Calm down sanitizer and adjust unit tests (#45613) ## Summary of the Pull Request This PR chills down the report sanitizer, because it's overly active. ## PR Checklist - [x] Closes: #45612 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .../Sanitizer/FilenameMaskRuleProvider.cs | 32 +++++ .../Services/Sanitizer/NetworkRuleProvider.cs | 4 +- .../Services/Sanitizer/PiiRuleProvider.cs | 84 ++++++------ .../ErrorReportSanitizerTests.TestData.cs | 120 +++++++++++++----- .../Sanitizer/ErrorReportSanitizerTests.cs | 14 ++ .../FilenameMaskRuleProviderTests.cs | 62 +++++++++ .../Sanitizer/PiiRuleProviderTests.cs | 4 + 7 files changed, 244 insertions(+), 76 deletions(-) create mode 100644 src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/FilenameMaskRuleProviderTests.cs diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs index 5356ddd90d..fecd6ec580 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs @@ -25,6 +25,7 @@ internal sealed class FilenameMaskRuleProvider : ISanitizationRuleProvider "env", "environment", "manifest", + "log", }.ToFrozenSet(StringComparer.OrdinalIgnoreCase); public IEnumerable GetRules() @@ -61,6 +62,11 @@ internal sealed class FilenameMaskRuleProvider : ISanitizationRuleProvider return full; } + if (IsVersionSegment(file)) + { + return full; + } + string stem, ext; if (dot > 0 && dot < file.Length - 1) { @@ -106,4 +112,30 @@ internal sealed class FilenameMaskRuleProvider : ISanitizationRuleProvider var maskedCount = Math.Max(1, stem.Length - keep); return stem[..keep] + new string('*', maskedCount); } + + private static bool IsVersionSegment(string file) + { + var dotIndex = file.IndexOf('.'); + if (dotIndex <= 0 || dotIndex == file.Length - 1) + { + return false; + } + + var hasDot = false; + foreach (var ch in file) + { + if (ch == '.') + { + hasDot = true; + continue; + } + + if (!char.IsDigit(ch)) + { + return false; + } + } + + return hasDot; + } } diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs index 4c352ff892..6be99b6ff6 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs @@ -11,7 +11,9 @@ internal sealed partial class NetworkRuleProvider : ISanitizationRuleProvider { public IEnumerable GetRules() { - yield return new(Ipv4Rx(), "[IP4_REDACTED]", "IP addresses"); + // Disabled for now as these rules can be too aggressive and cause over-sanitization, especially in scenarios like + // error report sanitization where we want to preserve as much useful information as possible while still protecting sensitive data. + // yield return new(Ipv4Rx(), "[IP4_REDACTED]", "IP addresses"); yield return new(Ipv6BracketedRx(), "[IP6_REDACTED]", "IPv6 addresses (bracketed/with port)"); yield return new(Ipv6Rx(), "[IP6_REDACTED]", "IPv6 addresses"); yield return new(MacAddressRx(), "[MAC_ADDRESS_REDACTED]", "MAC addresses"); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs index 964c6d83df..ae8f167f7c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs @@ -25,52 +25,56 @@ internal sealed partial class PiiRuleProvider : ISanitizationRuleProvider private static partial Regex EmailRx(); [GeneratedRegex(""" - (?xi) - # ---------- boundaries ---------- - (? require separators between blocks (avoid plain big ints) - (?:\(\d{1,4}\)|\d{1,4}) - (?:[\p{Zs}.\-\/]+(?:\(\d{2,4}\)|\d{2,4})){1,6} - ) + (?:\(\d{1,4}\)|\d{1,4}) + (?:[\p{Zs}.\-\/]+(?:\(\d{2,4}\)|\d{2,4})){1,6} + ) - # ---------- optional extension ---------- - (?:[\p{Zs}.\-,:;]* (?:ext\.?|x) [\p{Zs}]* (?\d{1,6}))? + # ---------- optional extension ---------- + (?:[\p{Zs}.\-,:;]* (?:ext\.?|x) [\p{Zs}]* (?\d{1,6}))? - (?!-\w) # don't end just before '-letter'/'-digit' - """, - SanitizerDefaults.DefaultOptions | RegexOptions.IgnorePatternWhitespace, SanitizerDefaults.DefaultMatchTimeoutMs)] + # ---------- end boundary (allow whitespace/newlines at edges) ---------- + (?!-\w) # don't end just before '-letter'/'-digit' + (?!\w) # don't be immediately followed by a word char + """, + SanitizerDefaults.DefaultOptions | RegexOptions.IgnorePatternWhitespace, + SanitizerDefaults.DefaultMatchTimeoutMs)] private static partial Regex PhoneRx(); [GeneratedRegex(@"\b\d{3}-\d{2}-\d{4}\b", diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.TestData.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.TestData.cs index 6d27172fa2..54c7ba92d7 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.TestData.cs +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.TestData.cs @@ -6,42 +6,42 @@ namespace Microsoft.CmdPal.Common.UnitTests.Services.Sanitizer; public partial class ErrorReportSanitizerTests { - private static class TestData + internal static class TestData { internal static string Input => - $""" - HRESULT: 0x80004005 - HRESULT: -2147467259 + $""" + HRESULT: 0x80004005 + HRESULT: -2147467259 - Here is e-mail address - IPv4 address: 192.168.100.1 - IPv4 loopback address: 127.0.0.1 - MAC address: 00-14-22-01-23-45 - IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - IPv6 loopback address: ::1 - Password: P@ssw0rd123! - Password=secret - Api key: 1234567890abcdef - PostgreSQL connection string: Host=localhost;Username=postgres;Password=secret;Database=mydb - InstrumentationKey=00000000-0000-0000-0000-000000000000;EndpointSuffix=ai.contoso.com; - X-API-key: 1234567890abcdef - Pet-Shop-Subscription-Key: 1234567890abcdef - Here is a user name {Environment.UserName} - And here is a profile path {Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\RandomFolder - Here is a local app data path {Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\PowerToys\CmdPal - Here is machine name {Environment.MachineName} - JWT token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30 - User email john.doe@company.com failed validation - File not found: {Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}\\secret.txt - Connection string: Server=localhost;User ID=admin;Password=secret123;Database=test - Phone number 555-123-4567 is invalid - API key abc123def456ghi789jkl012mno345pqr678 expired - Failed to connect to https://api.internal-company.com/users/12345?token=secret_abc123 - Error accessing file://C:/Users/john.doe/Documents/confidential.pdf - JDBC connection failed: jdbc://database-server:5432/userdb?user=admin&password=secret - FTP upload error: ftp://internal-server.company.com/uploads/user_data.csv - Email service error: mailto:admin@internal-company.com?subject=Alert - """; + Here is e-mail address + IPv4 address: 192.168.100.1 + IPv4 loopback address: 127.0.0.1 + MAC address: 00-14-22-01-23-45 + IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 + IPv6 loopback address: ::1 + Password: P@ssw0rd123! + Password=secret + Api key: 1234567890abcdef + PostgreSQL connection string: Host=localhost;Username=postgres;Password=secret;Database=mydb + InstrumentationKey=00000000-0000-0000-0000-000000000000;EndpointSuffix=ai.contoso.com; + X-API-key: 1234567890abcdef + Pet-Shop-Subscription-Key: 1234567890abcdef + Here is a user name {Environment.UserName} + And here is a profile path {Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\RandomFolder + Here is a local app data path {Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\PowerToys\CmdPal + Here is machine name {Environment.MachineName} + JWT token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30 + User email john.doe@company.com failed validation + File not found: {Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}\\secret.txt + Connection string: Server=localhost;User ID=admin;Password=secret123;Database=test + Phone number 555-123-4567 is invalid + API key abc123def456ghi789jkl012mno345pqr678 expired + Failed to connect to https://api.internal-company.com/users/12345?token=secret_abc123 + Error accessing file://C:/Users/john.doe/Documents/confidential.pdf + JDBC connection failed: jdbc://database-server:5432/userdb?user=admin&password=secret + FTP upload error: ftp://internal-server.company.com/uploads/user_data.csv + Email service error: mailto:admin@internal-company.com?subject=Alert + """; public const string Expected = $""" @@ -49,8 +49,8 @@ public partial class ErrorReportSanitizerTests HRESULT: -2147467259 Here is e-mail address <[EMAIL_REDACTED]> - IPv4 address: [IP4_REDACTED] - IPv4 loopback address: [IP4_REDACTED] + IPv4 address: 192.168.100.1 + IPv4 loopback address: 127.0.0.1 MAC address: [MAC_ADDRESS_REDACTED] IPv6 address: [IP6_REDACTED] IPv6 loopback address: [IP6_REDACTED] @@ -77,5 +77,55 @@ public partial class ErrorReportSanitizerTests FTP upload error: [URL_REDACTED] Email service error: mailto:[EMAIL_REDACTED]?subject=Alert """; + + internal static string Input2 => + $""" + ============================================================ + Hello World! Command Palette is starting. + + Application: + App version: 0.0.1.0 + Packaging flavor: Packaged + Is elevated: no + + Environment: + OS version: Microsoft Windows 10.0.26220 + OS architecture: X64 + Runtime identifier: win-x64 + Framework: .NET 9.0.13 + Process architecture: X64 + Culture: cs-CZ + UI culture: en-US + + Paths: + Log directory: {Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\PowerToys\CmdPal\Logs\0.0.1.0 + Config directory: {Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Packages\Microsoft.CommandPalette.Dev_8wekyb3d8bbwe\LocalState + ============================================================ + """; + + public const string Expected2 = + """ + ============================================================ + Hello World! Command Palette is starting. + + Application: + App version: 0.0.1.0 + Packaging flavor: Packaged + Is elevated: no + + Environment: + OS version: Microsoft Windows 10.0.26220 + OS architecture: X64 + Runtime identifier: win-x64 + Framework: .NET 9.0.13 + Process architecture: X64 + Culture: cs-CZ + UI culture: en-US + + Paths: + Log directory: [LOCALAPPLICATIONDATA_DIR]Microsoft\PowerToys\CmdPal\Logs\0.0.1.0 + Config directory: [LOCALAPPLICATIONDATA_DIR]Packages\Microsoft.CommandPalette.Dev_8wekyb3d8bbwe\LocalState + ============================================================ + """; } } diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.cs index 1ab57acd2e..294279b5fc 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.cs +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/ErrorReportSanitizerTests.cs @@ -22,4 +22,18 @@ public partial class ErrorReportSanitizerTests // Assert Assert.AreEqual(TestData.Expected, result); } + + [TestMethod] + public void Sanitize_ShouldNotMaskTooMuchPiiInErrorReport() + { + // Arrange + var reportSanitizer = new ErrorReportSanitizer(); + var input = TestData.Input2; + + // Act + var result = reportSanitizer.Sanitize(input); + + // Assert + Assert.AreEqual(TestData.Expected2, result); + } } diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/FilenameMaskRuleProviderTests.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/FilenameMaskRuleProviderTests.cs new file mode 100644 index 0000000000..6c5875fd60 --- /dev/null +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/FilenameMaskRuleProviderTests.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.CmdPal.Common.UnitTests.TestUtils; +using Microsoft.CmdPal.Core.Common.Services.Sanitizer; +using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; + +namespace Microsoft.CmdPal.Common.UnitTests.Services.Sanitizer; + +[TestClass] +public class FilenameMaskRuleProviderTests +{ + [TestMethod] + public void GetRules_ShouldReturnExpectedRules() + { + // Arrange + var provider = new FilenameMaskRuleProvider(); + + // Act + var rules = provider.GetRules(); + + // Assert + var ruleList = new List(rules); + Assert.AreEqual(1, ruleList.Count); + Assert.AreEqual("Mask filename in any path", ruleList[0].Description); + } + + [DataTestMethod] + [DataRow(@"C:\Users\Alice\Documents\secret.txt", @"C:\Users\Alice\Documents\se****.txt")] + [DataRow(@"logs\error-report.log", @"logs\er**********.log")] + [DataRow(@"/var/logs/trace.json", @"/var/logs/tr***.json")] + public void FilenameRules_ShouldMaskFileNamesInPaths(string input, string expected) + { + // Arrange + var provider = new FilenameMaskRuleProvider(); + + // Act + var result = SanitizerTestHelper.ApplyRules(input, provider.GetRules()); + + // Assert + Assert.AreEqual(expected, result); + } + + [DataTestMethod] + [DataRow("C:\\Users\\Alice\\Documents\\", "C:\\Users\\Alice\\Documents\\")] + [DataRow(@"C:\Users\Alice\PowerToys\CmdPal\Logs\1.2.3.4", @"C:\Users\Alice\PowerToys\CmdPal\Logs\1.2.3.4")] + [DataRow(@"C:\Users\Alice\appsettings.json", @"C:\Users\Alice\appsettings.json")] + [DataRow(@"C:\Users\Alice\.env", @"C:\Users\Alice\.env")] + [DataRow(@"logs\readme", @"logs\readme")] + public void FilenameRules_ShouldNotMaskNonSensitivePatterns(string input, string expected) + { + // Arrange + var provider = new FilenameMaskRuleProvider(); + + // Act + var result = SanitizerTestHelper.ApplyRules(input, provider.GetRules()); + + // Assert + Assert.AreEqual(expected, result); + } +} diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/PiiRuleProviderTests.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/PiiRuleProviderTests.cs index ac490f5a6b..3f2d3c92e7 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/PiiRuleProviderTests.cs +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Core.Common.UnitTests/Services/Sanitizer/PiiRuleProviderTests.cs @@ -54,6 +54,8 @@ public class PiiRuleProviderTests [DataRow("Two numbers: 123-456-7890 and +420 777123456", "Two numbers: [PHONE_REDACTED] and [PHONE_REDACTED]")] [DataRow("Czech phone +420 777 123 456", "Czech phone [PHONE_REDACTED]")] [DataRow("Slovak phone +421 777 12 34 56", "Slovak phone [PHONE_REDACTED]")] + [DataRow("Version 1.2.3.4", "Version 1.2.3.4")] + [DataRow("OS version: Microsoft Windows 10.0.26220", "OS version: Microsoft Windows 10.0.26220")] [DataRow("No phone number here", "No phone number here")] public void PhoneRules_ShouldMaskPhoneNumbers(string input, string expected) { @@ -104,6 +106,8 @@ public class PiiRuleProviderTests [DataRow("GUID: 123e4567-e89b-12d3-a456-426614174000", "GUID: 123e4567-e89b-12d3-a456-426614174000")] [DataRow("Timestamp: 2023-10-05T14:32:10Z", "Timestamp: 2023-10-05T14:32:10Z")] [DataRow("Version: 1.2.3", "Version: 1.2.3")] + [DataRow("Version: 1.2.3.4", "Version: 1.2.3.4")] + [DataRow("Version: 0.2.3.4", "Version: 0.2.3.4")] [DataRow("Version: 10.0.22631.3448", "Version: 10.0.22631.3448")] [DataRow("MAC: 00:1A:2B:3C:4D:5E", "MAC: 00:1A:2B:3C:4D:5E")] [DataRow("Date: 2023-10-05", "Date: 2023-10-05")] From 39bfa863354698370a60a70531d4966227e3a4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Thu, 19 Feb 2026 19:43:32 +0100 Subject: [PATCH 03/13] CmdPal: Fixes and improve main window positioning (#45585) ## Summary of the Pull Request This PR improves main window positioning: - Fixes cases where an invalid window size or position was saved. - `UpdateWindowPositionInMemory` failed to capture correct values when the window was minimized or maximized (for example, a minimized window reports coordinates like `(-32000, -32000)`). - Improves repositioning logic to use relative anchors (corners and center). When switching displays, the window should reappear in the expected position. This also reduces cases that trigger the failsafe recentering. - Fixes the dragging rectangle size after switching DPIs - the rectangle was not adapting, so it when switching from 100 % to 200 % it covered only left half of the window and had teeny-tiny height. - Suppresses system DPI handling during summon to prevent double scaling. - Makes `WindowPosition` class immutable. - Adds light-weight failsafe preventing overwriting position with invalid data. - Hotfixes a min/max state conflict with the WinUIEx window manager. ## PR Checklist - [x] Closes: #45576 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .../WindowPosition.cs | 19 ++- .../Helpers/WindowPositionHelper.cs | 120 ++++++++++++++---- .../Microsoft.CmdPal.UI/MainWindow.xaml.cs | 108 +++++++++++----- .../Microsoft.CmdPal.UI/NativeMethods.txt | 6 +- 4 files changed, 185 insertions(+), 68 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/WindowPosition.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/WindowPosition.cs index 7963aec154..ac0dfddf58 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/WindowPosition.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/WindowPosition.cs @@ -11,37 +11,42 @@ public sealed class WindowPosition /// /// Gets or sets left position in device pixels. /// - public int X { get; set; } + public int X { get; init; } /// /// Gets or sets top position in device pixels. /// - public int Y { get; set; } + public int Y { get; init; } /// /// Gets or sets width in device pixels. /// - public int Width { get; set; } + public int Width { get; init; } /// /// Gets or sets height in device pixels. /// - public int Height { get; set; } + public int Height { get; init; } /// /// Gets or sets width of the screen in device pixels where the window is located. /// - public int ScreenWidth { get; set; } + public int ScreenWidth { get; init; } /// /// Gets or sets height of the screen in device pixels where the window is located. /// - public int ScreenHeight { get; set; } + public int ScreenHeight { get; init; } /// /// Gets or sets DPI (dots per inch) of the display where the window is located. /// - public int Dpi { get; set; } + public int Dpi { get; init; } + + /// + /// Gets a value indicating whether the width and height of the window are valid (greater than 0). + /// + public bool IsSizeValid => Width > 0 && Height > 0; /// /// Converts the window position properties to a structure representing the physical window rectangle. diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/WindowPositionHelper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/WindowPositionHelper.cs index bf8af589a6..766c4bf17c 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/WindowPositionHelper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/WindowPositionHelper.cs @@ -18,7 +18,7 @@ internal static class WindowPositionHelper private const int MinimumVisibleSize = 100; private const int DefaultDpi = 96; - public static PointInt32? CalculateCenteredPosition(DisplayArea? displayArea, SizeInt32 windowSize, int windowDpi) + public static RectInt32? CenterOnDisplay(DisplayArea? displayArea, SizeInt32 windowSize, int windowDpi) { if (displayArea is null) { @@ -32,15 +32,9 @@ internal static class WindowPositionHelper } var targetDpi = GetDpiForDisplay(displayArea); - var predictedSize = ScaleSize(windowSize, windowDpi, targetDpi); - - // Clamp to work area - var width = Math.Min(predictedSize.Width, workArea.Width); - var height = Math.Min(predictedSize.Height, workArea.Height); - - return new PointInt32( - workArea.X + ((workArea.Width - width) / 2), - workArea.Y + ((workArea.Height - height) / 2)); + var scaledSize = ScaleSize(windowSize, windowDpi, targetDpi); + var clampedSize = ClampSize(scaledSize.Width, scaledSize.Height, workArea); + return CenterRectInWorkArea(clampedSize, workArea); } /// @@ -74,6 +68,10 @@ internal static class WindowPositionHelper savedRect = savedRect with { Width = DefaultWidth, Height = DefaultHeight }; } + // Remember the original size before DPI scaling - needed to compute + // gaps relative to the old screen when repositioning across displays. + var originalSize = new SizeInt32(savedRect.Width, savedRect.Height); + if (targetDpi != savedDpi) { savedRect = ScaleRect(savedRect, savedDpi, targetDpi); @@ -81,12 +79,17 @@ internal static class WindowPositionHelper var clampedSize = ClampSize(savedRect.Width, savedRect.Height, workArea); - var shouldRecenter = hasInvalidSize || - IsOffscreen(savedRect, workArea) || - savedScreenSize.Width != workArea.Width || - savedScreenSize.Height != workArea.Height; + if (hasInvalidSize) + { + return CenterRectInWorkArea(clampedSize, workArea); + } - if (shouldRecenter) + if (savedScreenSize.Width != workArea.Width || savedScreenSize.Height != workArea.Height) + { + return RepositionRelativeToWorkArea(savedRect, savedScreenSize, originalSize, clampedSize, workArea); + } + + if (IsOffscreen(savedRect, workArea)) { return CenterRectInWorkArea(clampedSize, workArea); } @@ -126,27 +129,92 @@ internal static class WindowPositionHelper private static RectInt32 ScaleRect(RectInt32 rect, int fromDpi, int toDpi) { + if (fromDpi <= 0 || toDpi <= 0 || fromDpi == toDpi) + { + return rect; + } + + // Don't scale position, that's absolute coordinates in virtual screen space var scale = (double)toDpi / fromDpi; return new RectInt32( - (int)Math.Round(rect.X * scale), - (int)Math.Round(rect.Y * scale), + rect.X, + rect.Y, (int)Math.Round(rect.Width * scale), (int)Math.Round(rect.Height * scale)); } - private static SizeInt32 ClampSize(int width, int height, RectInt32 workArea) => - new(Math.Min(width, workArea.Width), Math.Min(height, workArea.Height)); + private static SizeInt32 ClampSize(int width, int height, RectInt32 workArea) + { + return new SizeInt32(Math.Min(width, workArea.Width), Math.Min(height, workArea.Height)); + } - private static RectInt32 CenterRectInWorkArea(SizeInt32 size, RectInt32 workArea) => - new( + private static RectInt32 RepositionRelativeToWorkArea(RectInt32 savedRect, SizeInt32 savedScreenSize, SizeInt32 originalSize, SizeInt32 clampedSize, RectInt32 workArea) + { + // Treat each axis as a 3-zone grid (start / center / end) so that + // edge-snapped windows stay snapped and centered windows stay centered. + // We don't store the old work area origin, so we use the current one as a + // best estimate (correct when the same physical display changed resolution/DPI/taskbar). + var newX = ScaleAxisByZone(savedRect.X, originalSize.Width, clampedSize.Width, workArea.X, savedScreenSize.Width, workArea.Width); + var newY = ScaleAxisByZone(savedRect.Y, originalSize.Height, clampedSize.Height, workArea.Y, savedScreenSize.Height, workArea.Height); + + newX = Math.Clamp(newX, workArea.X, Math.Max(workArea.X, workArea.X + workArea.Width - clampedSize.Width)); + newY = Math.Clamp(newY, workArea.Y, Math.Max(workArea.Y, workArea.Y + workArea.Height - clampedSize.Height)); + + return new RectInt32(newX, newY, clampedSize.Width, clampedSize.Height); + } + + /// + /// Repositions a window along one axis using a 3-zone model (start / center / end). + /// The zone is determined by which third of the old screen the window center falls in. + /// Uses (pre-DPI-scaling) for gap calculations against + /// the old screen, and (post-scaling) for placement on the new screen. + /// + private static int ScaleAxisByZone(int savedPos, int oldWindowSize, int newWindowSize, int workAreaOrigin, int oldScreenSize, int newScreenSize) + { + if (oldScreenSize <= 0 || newScreenSize <= 0) + { + return savedPos; + } + + var gapFromStart = savedPos - workAreaOrigin; + var windowCenter = gapFromStart + (oldWindowSize / 2); + + if (windowCenter >= oldScreenSize / 3 && windowCenter <= oldScreenSize * 2 / 3) + { + // Center zone - keep centered + return workAreaOrigin + ((newScreenSize - newWindowSize) / 2); + } + + var gapFromEnd = oldScreenSize - gapFromStart - oldWindowSize; + + if (gapFromStart <= gapFromEnd) + { + // Start zone - preserve proportional distance from start edge + var rel = (double)gapFromStart / oldScreenSize; + return workAreaOrigin + (int)Math.Round(rel * newScreenSize); + } + else + { + // End zone - preserve proportional distance from end edge + var rel = (double)gapFromEnd / oldScreenSize; + return workAreaOrigin + newScreenSize - newWindowSize - (int)Math.Round(rel * newScreenSize); + } + } + + private static RectInt32 CenterRectInWorkArea(SizeInt32 size, RectInt32 workArea) + { + return new RectInt32( workArea.X + ((workArea.Width - size.Width) / 2), workArea.Y + ((workArea.Height - size.Height) / 2), size.Width, size.Height); + } - private static bool IsOffscreen(RectInt32 rect, RectInt32 workArea) => - rect.X + MinimumVisibleSize > workArea.X + workArea.Width || - rect.X + rect.Width - MinimumVisibleSize < workArea.X || - rect.Y + MinimumVisibleSize > workArea.Y + workArea.Height || - rect.Y + rect.Height - MinimumVisibleSize < workArea.Y; + private static bool IsOffscreen(RectInt32 rect, RectInt32 workArea) + { + return rect.X + MinimumVisibleSize > workArea.X + workArea.Width || + rect.X + rect.Width - MinimumVisibleSize < workArea.X || + rect.Y + MinimumVisibleSize > workArea.Y + workArea.Height || + rect.Y + rect.Height - MinimumVisibleSize < workArea.Y; + } } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs index a6900773ab..2a63d5a2aa 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs @@ -72,6 +72,7 @@ public sealed partial class MainWindow : WindowEx, private readonly IThemeService _themeService; private readonly WindowThemeSynchronizer _windowThemeSynchronizer; private bool _ignoreHotKeyWhenFullScreen = true; + private bool _suppressDpiChange; private bool _themeServiceInitialized; // Session tracking for telemetry @@ -127,6 +128,16 @@ public sealed partial class MainWindow : WindowEx, _keyboardListener.SetProcessCommand(new CmdPalKeyboardService.ProcessCommand(HandleSummon)); + WM_TASKBAR_RESTART = PInvoke.RegisterWindowMessage("TaskbarCreated"); + + // LOAD BEARING: If you don't stick the pointer to HotKeyPrc into a + // member (and instead like, use a local), then the pointer we marshal + // into the WindowLongPtr will be useless after we leave this function, + // and our **WindProc will explode**. + _hotkeyWndProc = HotKeyPrc; + var hotKeyPrcPointer = Marshal.GetFunctionPointerForDelegate(_hotkeyWndProc); + _originalWndProc = Marshal.GetDelegateForFunctionPointer(PInvoke.SetWindowLongPtr(_hwnd, WINDOW_LONG_PTR_INDEX.GWL_WNDPROC, hotKeyPrcPointer)); + this.SetIcon(); AppWindow.Title = RS_.GetString("AppName"); RestoreWindowPosition(); @@ -153,16 +164,6 @@ public sealed partial class MainWindow : WindowEx, SizeChanged += WindowSizeChanged; RootElement.Loaded += RootElementLoaded; - WM_TASKBAR_RESTART = PInvoke.RegisterWindowMessage("TaskbarCreated"); - - // LOAD BEARING: If you don't stick the pointer to HotKeyPrc into a - // member (and instead like, use a local), then the pointer we marshal - // into the WindowLongPtr will be useless after we leave this function, - // and our **WindProc will explode**. - _hotkeyWndProc = HotKeyPrc; - var hotKeyPrcPointer = Marshal.GetFunctionPointerForDelegate(_hotkeyWndProc); - _originalWndProc = Marshal.GetDelegateForFunctionPointer(PInvoke.SetWindowLongPtr(_hwnd, WINDOW_LONG_PTR_INDEX.GWL_WNDPROC, hotKeyPrcPointer)); - // Load our settings, and then also wire up a settings changed handler HotReloadSettings(); App.Current.Services.GetService()!.SettingsChanged += SettingsChangedHandler; @@ -213,6 +214,11 @@ public sealed partial class MainWindow : WindowEx, // Now that our content has loaded, we can update our draggable regions UpdateRegionsForCustomTitleBar(); + // Also update regions when DPI changes. SizeChanged only fires when the logical + // (DIP) size changes — a DPI change that scales the physical size while preserving + // the DIP size won't trigger it, leaving drag regions at the old physical coordinates. + RootElement.XamlRoot.Changed += XamlRoot_Changed; + // Add dev ribbon if enabled if (!BuildInfo.IsCiBuild) { @@ -221,6 +227,8 @@ public sealed partial class MainWindow : WindowEx, } } + private void XamlRoot_Changed(XamlRoot sender, XamlRootChangedEventArgs args) => UpdateRegionsForCustomTitleBar(); + private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs args) => UpdateRegionsForCustomTitleBar(); private void PositionCentered() @@ -231,16 +239,14 @@ public sealed partial class MainWindow : WindowEx, private void PositionCentered(DisplayArea displayArea) { - var position = WindowPositionHelper.CalculateCenteredPosition( + var rect = WindowPositionHelper.CenterOnDisplay( displayArea, AppWindow.Size, (int)this.GetDpiForWindow()); - if (position is not null) + if (rect is not null) { - // Use Move(), not MoveAndResize(). Windows auto-resizes on DPI change via WM_DPICHANGED; - // the helper already accounts for this when calculating the centered position. - AppWindow.Move((PointInt32)position); + MoveAndResizeDpiAware(rect.Value); } } @@ -249,29 +255,62 @@ public sealed partial class MainWindow : WindowEx, var settings = App.Current.Services.GetService(); if (settings?.LastWindowPosition is not { Width: > 0, Height: > 0 } savedPosition) { + // don't try to restore if the saved position is invalid, just recenter PositionCentered(); return; } - // MoveAndResize is safe here—we're restoring a saved state at startup, - // not moving a live window between displays. var newRect = WindowPositionHelper.AdjustRectForVisibility( savedPosition.ToPhysicalWindowRectangle(), new SizeInt32(savedPosition.ScreenWidth, savedPosition.ScreenHeight), savedPosition.Dpi); - AppWindow.MoveAndResize(newRect); + MoveAndResizeDpiAware(newRect); + } + + /// + /// Moves and resizes the window while suppressing WM_DPICHANGED. + /// The caller is expected to provide a rect already scaled for the target display's DPI. + /// Without suppression, the framework would apply its own DPI scaling on top, double-scaling the window. + /// + private void MoveAndResizeDpiAware(RectInt32 rect) + { + var originalMinHeight = MinHeight; + var originalMinWidth = MinWidth; + + _suppressDpiChange = true; + + try + { + // WindowEx is uses current DPI to calculate the minimum window size + MinHeight = 0; + MinWidth = 0; + AppWindow.MoveAndResize(rect); + } + finally + { + MinHeight = originalMinHeight; + MinWidth = originalMinWidth; + _suppressDpiChange = false; + } } private void UpdateWindowPositionInMemory() { + var placement = new WINDOWPLACEMENT { length = (uint)Marshal.SizeOf() }; + if (!PInvoke.GetWindowPlacement(_hwnd, ref placement)) + { + return; + } + + var rect = placement.rcNormalPosition; var displayArea = DisplayArea.GetFromWindowId(AppWindow.Id, DisplayAreaFallback.Nearest) ?? DisplayArea.Primary; _currentWindowPosition = new WindowPosition { - X = AppWindow.Position.X, - Y = AppWindow.Position.Y, - Width = AppWindow.Size.Width, - Height = AppWindow.Size.Height, + X = rect.X, + Y = rect.Y, + Width = rect.Width, + Height = rect.Height, Dpi = (int)this.GetDpiForWindow(), ScreenWidth = displayArea.WorkArea.Width, ScreenHeight = displayArea.WorkArea.Height, @@ -480,7 +519,7 @@ public sealed partial class MainWindow : WindowEx, { var originalScreen = new SizeInt32(_currentWindowPosition.ScreenWidth, _currentWindowPosition.ScreenHeight); var newRect = WindowPositionHelper.AdjustRectForVisibility(_currentWindowPosition.ToPhysicalWindowRectangle(), originalScreen, _currentWindowPosition.Dpi); - AppWindow.MoveAndResize(newRect); + MoveAndResizeDpiAware(newRect); } else { @@ -737,18 +776,12 @@ public sealed partial class MainWindow : WindowEx, var settings = serviceProvider.GetService(); if (settings is not null) { - settings.LastWindowPosition = new WindowPosition + // a quick sanity check, so we don't overwrite correct values + if (_currentWindowPosition.IsSizeValid) { - X = _currentWindowPosition.X, - Y = _currentWindowPosition.Y, - Width = _currentWindowPosition.Width, - Height = _currentWindowPosition.Height, - Dpi = _currentWindowPosition.Dpi, - ScreenWidth = _currentWindowPosition.ScreenWidth, - ScreenHeight = _currentWindowPosition.ScreenHeight, - }; - - SettingsModel.SaveSettings(settings); + settings.LastWindowPosition = _currentWindowPosition; + SettingsModel.SaveSettings(settings); + } } var extensionService = serviceProvider.GetService()!; @@ -1108,6 +1141,13 @@ public sealed partial class MainWindow : WindowEx, // Prevent the window from maximizing when double-clicking the title bar area case PInvoke.WM_NCLBUTTONDBLCLK: return (LRESULT)IntPtr.Zero; + + // When restoring a saved position across monitors with different DPIs, + // MoveAndResize already sets the correctly-scaled size. Suppress the + // framework's automatic DPI resize to avoid double-scaling. + case PInvoke.WM_DPICHANGED when _suppressDpiChange: + return (LRESULT)IntPtr.Zero; + case PInvoke.WM_HOTKEY: { var hotkeyIndex = (int)wParam.Value; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/NativeMethods.txt b/src/modules/cmdpal/Microsoft.CmdPal.UI/NativeMethods.txt index 513db65b1a..6bb010e890 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/NativeMethods.txt +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/NativeMethods.txt @@ -66,4 +66,8 @@ GetStockObject GetModuleHandle GetWindowThreadProcessId -AttachThreadInput \ No newline at end of file +AttachThreadInput + +GetWindowPlacement +WINDOWPLACEMENT +WM_DPICHANGED \ No newline at end of file From 0f87b61dadaabf37df8746ed44a745f371a41511 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 19 Feb 2026 16:20:05 -0600 Subject: [PATCH 04/13] CmdPal: Load pinned command items from anywhere (#45566) This doesn't actually have a UX to expose this yet - we need to stack a couple of PRs up to get to that. But this adds plumbing such that we can now stash away a command ID, and retrieve it later as a top-level command. Kinda like pinning for apps, but for _anything_. It works off of a new command provider interface `ICommandProvider4`, which lets us look up Command**Item**s by ID. If we see a command ID stored in that command provider's settings, we will try to look it up, and then load it from the command provider. e.g. ```json "com.microsoft.cmdpal.builtin.system": { "IsEnabled": true, "FallbackCommands": { "com.microsoft.cmdpal.builtin.system.fallback": { "IsEnabled": true, "IncludeInGlobalResults": true } }, "PinnedCommandIds": [ "com.microsoft.cmdpal.builtin.system.lock", "com.microsoft.cmdpal.builtin.system.restart_shell" ] }, ``` will get us image Then it's just a matter of plumbing the command provider ID through the layers, so that the command item knows who it is from. We'll need that later for actually wiring this to the command's context menu. related to #45191 related to #45201 --- .../AppExtensionHost.cs | 2 + .../CommandProviderContext.cs | 12 +++ .../ContentPageViewModel.cs | 4 +- .../ListViewModel.cs | 4 +- .../LoadingPageViewModel.cs | 2 +- .../NullPageViewModel.cs | 2 +- .../PageViewModel.cs | 7 +- .../ShellViewModel.cs | 17 +++-- .../CommandPaletteContentPageViewModel.cs | 4 +- .../CommandPalettePageViewModelFactory.cs | 6 +- .../CommandProviderWrapper.cs | 73 +++++++++++++++++-- .../CommandSettingsViewModel.cs | 4 +- .../Messages/PinCommandItemMessage.cs | 9 +++ .../ProviderSettings.cs | 2 + .../TopLevelCommandManager.cs | 17 +++++ .../TopLevelViewModel.cs | 14 ++-- .../PowerToysAppHostService.cs | 11 +++ .../doc/initial-sdk-spec/initial-sdk-spec.md | 31 ++++++++ .../AllAppsCommandProvider.cs | 14 ++++ .../Helpers/Commands.cs | 73 +++++++++++++++---- .../SystemCommandExtensionProvider.cs | 16 +++- .../CommandProvider.cs | 5 +- .../Microsoft.CommandPalette.Extensions.idl | 8 +- 23 files changed, 280 insertions(+), 57 deletions(-) create mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs create mode 100644 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PinCommandItemMessage.cs diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs index 125d8d78f4..eab0a8522e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs @@ -165,4 +165,6 @@ public interface IAppHostService AppExtensionHost GetDefaultHost(); AppExtensionHost GetHostForCommand(object? context, AppExtensionHost? currentHost); + + CommandProviderContext GetProviderContextForCommand(object? command, CommandProviderContext? currentContext); } diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs new file mode 100644 index 0000000000..948a911dd9 --- /dev/null +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CmdPal.Core.ViewModels; + +public sealed class CommandProviderContext +{ + public required string ProviderId { get; init; } + + public static CommandProviderContext Empty { get; } = new() { ProviderId = "" }; +} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs index b30d02ce83..0163868f9b 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs @@ -47,8 +47,8 @@ public partial class ContentPageViewModel : PageViewModel, ICommandBarContext // Remember - "observable" properties from the model (via PropChanged) // cannot be marked [ObservableProperty] - public ContentPageViewModel(IContentPage model, TaskScheduler scheduler, AppExtensionHost host) - : base(model, scheduler, host) + public ContentPageViewModel(IContentPage model, TaskScheduler scheduler, AppExtensionHost host, CommandProviderContext providerContext) + : base(model, scheduler, host, providerContext) { _model = new(model); } diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs index bbfbcadcea..d1f59e268b 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs @@ -89,8 +89,8 @@ public partial class ListViewModel : PageViewModel, IDisposable } } - public ListViewModel(IListPage model, TaskScheduler scheduler, AppExtensionHost host) - : base(model, scheduler, host) + public ListViewModel(IListPage model, TaskScheduler scheduler, AppExtensionHost host, CommandProviderContext providerContext) + : base(model, scheduler, host, providerContext) { _model = new(model); EmptyContent = new(new(null), PageContext); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs index 3e2cd420c2..ffd405c884 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs @@ -9,7 +9,7 @@ namespace Microsoft.CmdPal.Core.ViewModels; public partial class LoadingPageViewModel : PageViewModel { public LoadingPageViewModel(IPage? model, TaskScheduler scheduler, AppExtensionHost host) - : base(model, scheduler, host) + : base(model, scheduler, host, CommandProviderContext.Empty) { ModelIsLoading = true; IsInitialized = false; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs index 504eef6af1..e2427f811c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs @@ -5,4 +5,4 @@ namespace Microsoft.CmdPal.Core.ViewModels; internal sealed partial class NullPageViewModel(TaskScheduler scheduler, AppExtensionHost extensionHost) - : PageViewModel(null, scheduler, extensionHost); + : PageViewModel(null, scheduler, extensionHost, CommandProviderContext.Empty); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs index 3b08b9266b..27e3129cbb 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs @@ -76,13 +76,16 @@ public partial class PageViewModel : ExtensionObjectViewModel, IPageContext public IconInfoViewModel Icon { get; protected set; } - public PageViewModel(IPage? model, TaskScheduler scheduler, AppExtensionHost extensionHost) + public CommandProviderContext ProviderContext { get; protected set; } + + public PageViewModel(IPage? model, TaskScheduler scheduler, AppExtensionHost extensionHost, CommandProviderContext providerContext) : base(scheduler) { InitializeSelfAsPageContext(); _pageModel = new(model); Scheduler = scheduler; ExtensionHost = extensionHost; + ProviderContext = providerContext; Icon = new(null); ExtensionHost.StatusMessages.CollectionChanged += StatusMessages_CollectionChanged; @@ -275,5 +278,5 @@ public interface IPageViewModelFactoryService /// Indicates whether the page is not the top-level page. /// The command palette host that will host the page (for status messages) /// A new instance of the page view model. - PageViewModel? TryCreatePageViewModel(IPage page, bool nested, AppExtensionHost host); + PageViewModel? TryCreatePageViewModel(IPage page, bool nested, AppExtensionHost host, CommandProviderContext providerContext); } diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs index 62c70076ad..ff64e6f6ca 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs +++ b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs @@ -258,6 +258,7 @@ public partial class ShellViewModel : ObservableObject, } var host = _appHostService.GetHostForCommand(message.Context, CurrentPage.ExtensionHost); + var providerContext = _appHostService.GetProviderContextForCommand(message.Context, CurrentPage.ProviderContext); _rootPageService.OnPerformCommand(message.Context, !CurrentPage.IsNested, host); @@ -273,15 +274,15 @@ public partial class ShellViewModel : ObservableObject, // Telemetry: Track extension page navigation for session metrics if (host is not null) { - string extensionId = host.GetExtensionDisplayName() ?? "builtin"; - string commandId = command?.Id ?? "unknown"; - string commandName = command?.Name ?? "unknown"; + var extensionId = host.GetExtensionDisplayName() ?? "builtin"; + var commandId = command?.Id ?? "unknown"; + var commandName = command?.Name ?? "unknown"; WeakReferenceMessenger.Default.Send( new(extensionId, commandId, commandName, true, 0)); } // Construct our ViewModel of the appropriate type and pass it the UI Thread context. - var pageViewModel = _pageViewModelFactory.TryCreatePageViewModel(page, _isNested, host!); + var pageViewModel = _pageViewModelFactory.TryCreatePageViewModel(page, _isNested, host!, providerContext); if (pageViewModel is null) { CoreLogger.LogError($"Failed to create ViewModel for page {page.GetType().Name}"); @@ -352,10 +353,10 @@ public partial class ShellViewModel : ObservableObject, // Telemetry: Track command execution time and success var stopwatch = System.Diagnostics.Stopwatch.StartNew(); var command = message.Command.Unsafe; - string extensionId = host?.GetExtensionDisplayName() ?? "builtin"; - string commandId = command?.Id ?? "unknown"; - string commandName = command?.Name ?? "unknown"; - bool success = false; + var extensionId = host?.GetExtensionDisplayName() ?? "builtin"; + var commandId = command?.Id ?? "unknown"; + var commandName = command?.Name ?? "unknown"; + var success = false; try { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs index e3cd8a92d7..3312cac2f9 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs @@ -9,8 +9,8 @@ namespace Microsoft.CmdPal.UI.ViewModels; public partial class CommandPaletteContentPageViewModel : ContentPageViewModel { - public CommandPaletteContentPageViewModel(IContentPage model, TaskScheduler scheduler, AppExtensionHost host) - : base(model, scheduler, host) + public CommandPaletteContentPageViewModel(IContentPage model, TaskScheduler scheduler, AppExtensionHost host, CommandProviderContext providerContext) + : base(model, scheduler, host, providerContext) { } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs index 90e70d7fef..0c8397b3c4 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs @@ -17,12 +17,12 @@ public class CommandPalettePageViewModelFactory _scheduler = scheduler; } - public PageViewModel? TryCreatePageViewModel(IPage page, bool nested, AppExtensionHost host) + public PageViewModel? TryCreatePageViewModel(IPage page, bool nested, AppExtensionHost host, CommandProviderContext providerContext) { return page switch { - IListPage listPage => new ListViewModel(listPage, _scheduler, host) { IsNested = nested }, - IContentPage contentPage => new CommandPaletteContentPageViewModel(contentPage, _scheduler, host), + IListPage listPage => new ListViewModel(listPage, _scheduler, host, providerContext) { IsNested = nested }, + IContentPage contentPage => new CommandPaletteContentPageViewModel(contentPage, _scheduler, host, providerContext), _ => null, }; } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs index d0f73f4a12..2e2c009db7 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -8,6 +8,7 @@ using Microsoft.CmdPal.Core.ViewModels; using Microsoft.CmdPal.Core.ViewModels.Models; using Microsoft.CmdPal.UI.ViewModels.Services; using Microsoft.CommandPalette.Extensions; +using Microsoft.CommandPalette.Extensions.Toolkit; using Microsoft.Extensions.DependencyInjection; using Windows.Foundation; @@ -158,6 +159,9 @@ public sealed class CommandProviderWrapper UnsafePreCacheApiAdditions(two); } + // Load pinned commands from saved settings + var pinnedCommands = LoadPinnedCommands(model, providerSettings); + Id = model.Id; DisplayName = model.DisplayName; Icon = new(model.Icon); @@ -175,7 +179,7 @@ public sealed class CommandProviderWrapper Settings = new(model.Settings, this, _taskScheduler); // We do need to explicitly initialize commands though - InitializeCommands(commands, fallbacks, serviceProvider, pageContext); + InitializeCommands(commands, fallbacks, pinnedCommands, serviceProvider, pageContext); Logger.LogDebug($"Loaded commands from {DisplayName} ({ProviderId})"); } @@ -206,27 +210,34 @@ public sealed class CommandProviderWrapper } } - private void InitializeCommands(ICommandItem[] commands, IFallbackCommandItem[] fallbacks, IServiceProvider serviceProvider, WeakReference pageContext) + private void InitializeCommands(ICommandItem[] commands, IFallbackCommandItem[] fallbacks, ICommandItem[] pinnedCommands, IServiceProvider serviceProvider, WeakReference pageContext) { var settings = serviceProvider.GetService()!; var providerSettings = GetProviderSettings(settings); - + var ourContext = GetProviderContext(); var makeAndAdd = (ICommandItem? i, bool fallback) => { CommandItemViewModel commandItemViewModel = new(new(i), pageContext); - TopLevelViewModel topLevelViewModel = new(commandItemViewModel, fallback, ExtensionHost, ProviderId, settings, providerSettings, serviceProvider, i); + TopLevelViewModel topLevelViewModel = new(commandItemViewModel, fallback, ExtensionHost, ourContext, settings, providerSettings, serviceProvider, i); topLevelViewModel.InitializeProperties(); return topLevelViewModel; }; + var topLevelList = new List(); + if (commands is not null) { - TopLevelItems = commands - .Select(c => makeAndAdd(c, false)) - .ToArray(); + topLevelList.AddRange(commands.Select(c => makeAndAdd(c, false))); } + if (pinnedCommands is not null) + { + topLevelList.AddRange(pinnedCommands.Select(c => makeAndAdd(c, false))); + } + + TopLevelItems = topLevelList.ToArray(); + if (fallbacks is not null) { FallbackItems = fallbacks @@ -235,6 +246,32 @@ public sealed class CommandProviderWrapper } } + private ICommandItem[] LoadPinnedCommands(ICommandProvider model, ProviderSettings providerSettings) + { + var pinnedItems = new List(); + + if (model is ICommandProvider4 provider4) + { + foreach (var pinnedId in providerSettings.PinnedCommandIds) + { + try + { + var commandItem = provider4.GetCommandItem(pinnedId); + if (commandItem is not null) + { + pinnedItems.Add(commandItem); + } + } + catch (Exception e) + { + Logger.LogError($"Failed to load pinned command {pinnedId}: {e.Message}"); + } + } + } + + return pinnedItems.ToArray(); + } + private void UnsafePreCacheApiAdditions(ICommandProvider2 provider) { var apiExtensions = provider.GetApiExtensionStubs(); @@ -248,6 +285,26 @@ public sealed class CommandProviderWrapper } } + public void PinCommand(string commandId, IServiceProvider serviceProvider) + { + var settings = serviceProvider.GetService()!; + var providerSettings = GetProviderSettings(settings); + + if (!providerSettings.PinnedCommandIds.Contains(commandId)) + { + providerSettings.PinnedCommandIds.Add(commandId); + SettingsModel.SaveSettings(settings); + + // Raise CommandsChanged so the TopLevelCommandManager reloads our commands + this.CommandsChanged?.Invoke(this, new ItemsChangedEventArgs(-1)); + } + } + + public CommandProviderContext GetProviderContext() + { + return new() { ProviderId = ProviderId }; + } + public override bool Equals(object? obj) => obj is CommandProviderWrapper wrapper && isValid == wrapper.isValid; public override int GetHashCode() => _commandProvider.GetHashCode(); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs index fe440cdaa7..7b5d5f06c6 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -31,7 +31,7 @@ public partial class CommandSettingsViewModel(ICommandSettings? _unsafeSettings, if (model.SettingsPage is not null) { - SettingsPage = new CommandPaletteContentPageViewModel(model.SettingsPage, mainThread, provider.ExtensionHost); + SettingsPage = new CommandPaletteContentPageViewModel(model.SettingsPage, mainThread, provider.ExtensionHost, provider.GetProviderContext()); SettingsPage.InitializeProperties(); } } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PinCommandItemMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PinCommandItemMessage.cs new file mode 100644 index 0000000000..c9b9f00506 --- /dev/null +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PinCommandItemMessage.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CmdPal.UI.ViewModels.Messages; + +public record PinCommandItemMessage(string ProviderId, string CommandId) +{ +} diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettings.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettings.cs index 3bb9a43360..419d6fbbe5 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettings.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettings.cs @@ -18,6 +18,8 @@ public class ProviderSettings public Dictionary FallbackCommands { get; set; } = new(); + public List PinnedCommandIds { get; set; } = []; + [JsonIgnore] public string ProviderDisplayName { get; set; } = string.Empty; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs index 4473a1e144..1de71f59a3 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs @@ -22,6 +22,7 @@ namespace Microsoft.CmdPal.UI.ViewModels; public partial class TopLevelCommandManager : ObservableObject, IRecipient, + IRecipient, IPageContext, IDisposable { @@ -42,6 +43,7 @@ public partial class TopLevelCommandManager : ObservableObject, _commandProviderCache = commandProviderCache; _taskScheduler = _serviceProvider.GetService()!; WeakReferenceMessenger.Default.Register(this); + WeakReferenceMessenger.Default.Register(this); _reloadCommandsGate = new(ReloadAllCommandsAsyncCore); } @@ -414,6 +416,21 @@ public partial class TopLevelCommandManager : ObservableObject, public void Receive(ReloadCommandsMessage message) => ReloadAllCommandsAsync().ConfigureAwait(false); + public void Receive(PinCommandItemMessage message) + { + var wrapper = LookupProvider(message.ProviderId); + wrapper?.PinCommand(message.CommandId, _serviceProvider); + } + + private CommandProviderWrapper? LookupProvider(string providerId) + { + lock (_commandProvidersLock) + { + return _builtInCommands.FirstOrDefault(w => w.ProviderId == providerId) + ?? _extensionCommandProviders.FirstOrDefault(w => w.ProviderId == providerId); + } + } + void IPageContext.ShowException(Exception ex, string? extensionHint) { var message = DiagnosticsHelper.BuildExceptionMessage(ex, extensionHint ?? "TopLevelCommandManager"); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs index 13b9423119..1fa9682f33 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -27,7 +27,7 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx private readonly IServiceProvider _serviceProvider; private readonly CommandItemViewModel _commandItemViewModel; - private readonly string _commandProviderId; + public CommandProviderContext ProviderContext { get; private set; } private string IdFromModel => IsFallback && !string.IsNullOrWhiteSpace(_fallbackId) ? _fallbackId : _commandItemViewModel.Command.Id; @@ -57,7 +57,7 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx public CommandItemViewModel ItemViewModel => _commandItemViewModel; - public string CommandProviderId => _commandProviderId; + public string CommandProviderId => ProviderContext.ProviderId; ////// ICommandItem public string Title => _commandItemViewModel.Title; @@ -190,7 +190,7 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx CommandItemViewModel item, bool isFallback, CommandPaletteHost extensionHost, - string commandProviderId, + CommandProviderContext commandProviderContext, SettingsModel settings, ProviderSettings providerSettings, IServiceProvider serviceProvider, @@ -199,7 +199,7 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx _serviceProvider = serviceProvider; _settings = settings; _providerSettings = providerSettings; - _commandProviderId = commandProviderId; + ProviderContext = commandProviderContext; _commandItemViewModel = item; IsFallback = isFallback; @@ -358,8 +358,8 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx { // Use WyHash64 to generate stable ID hashes. // manually seeding with 0, so that the hash is stable across launches - var result = WyHash64.ComputeHash64(_commandProviderId + DisplayTitle + Title + Subtitle, seed: 0); - _generatedId = $"{_commandProviderId}{result}"; + var result = WyHash64.ComputeHash64(CommandProviderId + DisplayTitle + Title + Subtitle, seed: 0); + _generatedId = $"{CommandProviderId}{result}"; } private void DoOnUiThread(Action action) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysAppHostService.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysAppHostService.cs index 7edf0a34c9..95a2c24aa6 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysAppHostService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysAppHostService.cs @@ -26,4 +26,15 @@ internal sealed class PowerToysAppHostService : IAppHostService return topLevelHost ?? currentHost ?? CommandPaletteHost.Instance; } + + public CommandProviderContext GetProviderContextForCommand(object? command, CommandProviderContext? currentContext) + { + CommandProviderContext? topLevelId = null; + if (command is TopLevelViewModel topLevelViewModel) + { + topLevelId = topLevelViewModel.ProviderContext; + } + + return topLevelId ?? currentContext ?? throw new InvalidOperationException("No command provider context could be found for the given command, and no current context was provided."); + } } diff --git a/src/modules/cmdpal/doc/initial-sdk-spec/initial-sdk-spec.md b/src/modules/cmdpal/doc/initial-sdk-spec/initial-sdk-spec.md index 57b5c4bd42..66ecbf34b6 100644 --- a/src/modules/cmdpal/doc/initial-sdk-spec/initial-sdk-spec.md +++ b/src/modules/cmdpal/doc/initial-sdk-spec/initial-sdk-spec.md @@ -77,6 +77,7 @@ functionality. - [Rendering of ICommandItems in Lists and Menus](#rendering-of-icommanditems-in-lists-and-menus) - [Addenda I: API additions (ICommandProvider2)](#addenda-i-api-additions-icommandprovider2) - [Addenda IV: Dock bands](#addenda-iv-dock-bands) + - [Pinning nested commands to the dock (and top level)](#pinning-nested-commands-to-the-dock-and-top-level) - [Class diagram](#class-diagram) - [Future considerations](#future-considerations) - [Arbitrary parameters and arguments](#arbitrary-parameters-and-arguments) @@ -2128,6 +2129,36 @@ Users may choose to have: - Dock bands will still display the `Title` & `Subtitle` of each item in the band as the tooltip on those items, even when the "labels" are hidden. +### Pinning nested commands to the dock (and top level) + +We'll use another command provider method to allow the host to ask extensions +for items based on their ID. + +```csharp +interface ICommandProvider4 requires ICommandProvider3 +{ + ICommandItem GetCommandItem(String id); +}; +``` + +This will allow users to pin not just top-level commands, but also nested +commands which have an ID. The host can store that ID away, and then later ask +the extension for the `ICommandItem` with that ID, to get the full details of +the command to pin. + +This is needed separate from the `GetCommand` method on `ICommandProvider`, +because that method is was designed for two main purposes: + +* Short-circuiting the loading of top-level commands for frozen extensions. In + that case, DevPal would only need to look up the actual `ICommand` to perform + it. It wouldn't need the full `ICommandItem` with all the details. +* Allowing invokable commands to navigate using the GoToPageArgs. In that case, + DevPal would only need the `ICommand` to perform the navigation. + +In neither of those scenarios was the full "display" of the item needed. In +pinning scenarios, however, we need everything that the user would see in the UI +for that item, which is all in the `ICommandItem`. + ## Class diagram This is a diagram attempting to show the relationships between the various types we've defined for the SDK. Some elements are omitted for clarity. (Notably, `IconData` and `IPropChanged`, which are used in many places.) diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsCommandProvider.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsCommandProvider.cs index 317087847e..a223dcab01 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsCommandProvider.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsCommandProvider.cs @@ -184,6 +184,20 @@ public partial class AllAppsCommandProvider : CommandProvider return null; } + public override ICommandItem? GetCommandItem(string id) + { + var items = _page.GetItems(); + foreach (var item in items) + { + if (item.Command.Id == id) + { + return item; + } + } + + return null; + } + private void OnPinStateChanged(object? sender, System.EventArgs e) { RaiseItemsChanged(0); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Helpers/Commands.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Helpers/Commands.cs index 9448cc0f2f..fbf086063b 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Helpers/Commands.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Helpers/Commands.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -42,37 +42,61 @@ internal static class Commands var results = new List(); results.AddRange(new[] { - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_shutdown, confirmCommands, Resources.Microsoft_plugin_sys_shutdown_computer_confirmation, () => OpenInShellHelper.OpenInShell("shutdown", "/s /hybrid /t 0", runWithHiddenWindow: true))) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_shutdown, confirmCommands, Resources.Microsoft_plugin_sys_shutdown_computer_confirmation, () => OpenInShellHelper.OpenInShell("shutdown", "/s /hybrid /t 0", runWithHiddenWindow: true)) + { + Id = "com.microsoft.cmdpal.builtin.system.shutdown", + }) { Title = Resources.Microsoft_plugin_sys_shutdown_computer, Subtitle = Resources.Microsoft_plugin_sys_shutdown_computer_description, Icon = Icons.ShutdownIcon, }, - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_restart, confirmCommands, Resources.Microsoft_plugin_sys_restart_computer_confirmation, () => OpenInShellHelper.OpenInShell("shutdown", "/g /t 0", runWithHiddenWindow: true))) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_restart, confirmCommands, Resources.Microsoft_plugin_sys_restart_computer_confirmation, () => OpenInShellHelper.OpenInShell("shutdown", "/g /t 0", runWithHiddenWindow: true)) + { + Id = "com.microsoft.cmdpal.builtin.system.restart", + }) { Title = Resources.Microsoft_plugin_sys_restart_computer, Subtitle = Resources.Microsoft_plugin_sys_restart_computer_description, Icon = Icons.RestartIcon, }, - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_signout, confirmCommands, Resources.Microsoft_plugin_sys_sign_out_confirmation, () => NativeMethods.ExitWindowsEx(EWXLOGOFF, 0))) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_signout, confirmCommands, Resources.Microsoft_plugin_sys_sign_out_confirmation, () => NativeMethods.ExitWindowsEx(EWXLOGOFF, 0)) + { + Id = "com.microsoft.cmdpal.builtin.system.signout", + }) { Title = Resources.Microsoft_plugin_sys_sign_out, Subtitle = Resources.Microsoft_plugin_sys_sign_out_description, Icon = Icons.LogoffIcon, }, - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_lock, confirmCommands, Resources.Microsoft_plugin_sys_lock_confirmation, () => NativeMethods.LockWorkStation())) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_lock, confirmCommands, Resources.Microsoft_plugin_sys_lock_confirmation, () => NativeMethods.LockWorkStation()) + { + Id = "com.microsoft.cmdpal.builtin.system.lock", + }) { Title = Resources.Microsoft_plugin_sys_lock, Subtitle = Resources.Microsoft_plugin_sys_lock_description, Icon = Icons.LockIcon, }, - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_sleep, confirmCommands, Resources.Microsoft_plugin_sys_sleep_confirmation, () => NativeMethods.SetSuspendState(false, true, true))) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_sleep, confirmCommands, Resources.Microsoft_plugin_sys_sleep_confirmation, () => NativeMethods.SetSuspendState(false, true, true)) + { + Id = "com.microsoft.cmdpal.builtin.system.sleep", + }) { Title = Resources.Microsoft_plugin_sys_sleep, Subtitle = Resources.Microsoft_plugin_sys_sleep_description, Icon = Icons.SleepIcon, }, - new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_hibernate, confirmCommands, Resources.Microsoft_plugin_sys_hibernate_confirmation, () => NativeMethods.SetSuspendState(true, true, true))) + new ListItem( + new ExecuteCommandConfirmation(Resources.Microsoft_plugin_command_name_hibernate, confirmCommands, Resources.Microsoft_plugin_sys_hibernate_confirmation, () => NativeMethods.SetSuspendState(true, true, true)) + { + Id = "com.microsoft.cmdpal.builtin.system.hibernate", + }) { Title = Resources.Microsoft_plugin_sys_hibernate, Subtitle = Resources.Microsoft_plugin_sys_hibernate_description, @@ -85,13 +109,19 @@ internal static class Commands { results.AddRange(new[] { - new ListItem(new OpenInShellCommand(Resources.Microsoft_plugin_command_name_open, "explorer.exe", "shell:RecycleBinFolder")) + new ListItem(new OpenInShellCommand(Resources.Microsoft_plugin_command_name_open, "explorer.exe", "shell:RecycleBinFolder") + { + Id = "com.microsoft.cmdpal.builtin.system.recycle_bin", + }) { Title = Resources.Microsoft_plugin_sys_RecycleBinOpen, Subtitle = Resources.Microsoft_plugin_sys_RecycleBin_description, Icon = Icons.RecycleBinIcon, }, - new ListItem(new EmptyRecycleBinConfirmation(emptyRBSuccessMessage)) + new ListItem(new EmptyRecycleBinConfirmation(emptyRBSuccessMessage) + { + Id = "com.microsoft.cmdpal.builtin.system.empty_recycle_bin", + }) { Title = Resources.Microsoft_plugin_sys_RecycleBinEmptyResult, Subtitle = Resources.Microsoft_plugin_sys_RecycleBinEmpty_description, @@ -102,7 +132,10 @@ internal static class Commands else { results.Add( - new ListItem(new OpenInShellCommand(Resources.Microsoft_plugin_command_name_open, "explorer.exe", "shell:RecycleBinFolder")) + new ListItem(new OpenInShellCommand(Resources.Microsoft_plugin_command_name_open, "explorer.exe", "shell:RecycleBinFolder") + { + Id = "com.microsoft.cmdpal.builtin.system.recycle_bin", + }) { Title = Resources.Microsoft_plugin_sys_RecycleBin, Subtitle = Resources.Microsoft_plugin_sys_RecycleBin_description, @@ -110,7 +143,15 @@ internal static class Commands }); } - results.Add(new ListItem(new ExecuteCommandConfirmation(Resources.Microsoft_plugin_sys_RestartShell_name!, confirmCommands, Resources.Microsoft_plugin_sys_RestartShell_confirmation!, static () => OpenInShellHelper.OpenInShell("cmd", "/C tskill explorer && start explorer", runWithHiddenWindow: true))) + results.Add(new ListItem( + new ExecuteCommandConfirmation( + Resources.Microsoft_plugin_sys_RestartShell_name!, + confirmCommands, + Resources.Microsoft_plugin_sys_RestartShell_confirmation!, + static () => OpenInShellHelper.OpenInShell("cmd", "/C tskill explorer && start explorer", runWithHiddenWindow: true)) + { + Id = "com.microsoft.cmdpal.builtin.system.restart_shell", + }) { Title = Resources.Microsoft_plugin_sys_RestartShell!, Subtitle = Resources.Microsoft_plugin_sys_RestartShell_description!, @@ -141,19 +182,19 @@ internal static class Commands var results = new List(); // We update the cache only if the last query is older than 'updateCacheIntervalSeconds' seconds - DateTime timeOfLastNetworkQueryBefore = timeOfLastNetworkQuery; + var timeOfLastNetworkQueryBefore = timeOfLastNetworkQuery; timeOfLastNetworkQuery = DateTime.Now; // Set time of last query to this query if ((timeOfLastNetworkQuery - timeOfLastNetworkQueryBefore).TotalSeconds >= UpdateCacheIntervalSeconds) { networkPropertiesCache = NetworkConnectionProperties.GetList(); } - CompositeFormat sysIpv4DescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_ip4_description); - CompositeFormat sysIpv6DescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_ip6_description); - CompositeFormat sysMacDescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_mac_description); + var sysIpv4DescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_ip4_description); + var sysIpv6DescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_ip6_description); + var sysMacDescriptionCompositeFormate = CompositeFormat.Parse(Resources.Microsoft_plugin_sys_mac_description); var hideDisconnectedNetworkInfo = manager.HideDisconnectedNetworkInfo(); - foreach (NetworkConnectionProperties intInfo in networkPropertiesCache) + foreach (var intInfo in networkPropertiesCache) { if (hideDisconnectedNetworkInfo) { diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/SystemCommandExtensionProvider.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/SystemCommandExtensionProvider.cs index 4bc86c209d..bf3a0f79e2 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/SystemCommandExtensionProvider.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/SystemCommandExtensionProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -39,4 +39,18 @@ public sealed partial class SystemCommandExtensionProvider : CommandProvider } public override IFallbackCommandItem[] FallbackCommands() => [_fallbackSystemItem]; + + public override ICommandItem? GetCommandItem(string id) + { + var everything = Page.GetItems(); + foreach (var item in everything) + { + if (item.Command.Id == id) + { + return item; + } + } + + return null; + } } diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/CommandProvider.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/CommandProvider.cs index 3ad4671263..769d7010f3 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/CommandProvider.cs +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/CommandProvider.cs @@ -9,7 +9,8 @@ namespace Microsoft.CommandPalette.Extensions.Toolkit; public abstract partial class CommandProvider : ICommandProvider, ICommandProvider2, - ICommandProvider3 + ICommandProvider3, + ICommandProvider4 { public virtual string Id { get; protected set; } = string.Empty; @@ -25,6 +26,8 @@ public abstract partial class CommandProvider : public virtual ICommand? GetCommand(string id) => null; + public virtual ICommandItem? GetCommandItem(string id) => null; + public virtual ICommandSettings? Settings { get; protected set; } public virtual bool Frozen { get; protected set; } = true; diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.idl b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.idl index dff98f6516..7836a3aac3 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.idl +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.idl @@ -411,5 +411,11 @@ namespace Microsoft.CommandPalette.Extensions { ICommandItem[] GetDockBands(); }; - + + [contract(Microsoft.CommandPalette.Extensions.ExtensionsContract, 1)] + interface ICommandProvider4 requires ICommandProvider3 + { + ICommandItem GetCommandItem(String id); + }; + } From 5e30caa674e19748c18f33c119540c8430437a4a Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Fri, 20 Feb 2026 15:49:42 +0000 Subject: [PATCH 05/13] [WindowWalker] Fix race condition in UWP app enumeration (#45601) ## Summary of the Pull Request This fixes a race condition in the WindowWalker component in both **Command Palette** and **Run**. The lack of a lock around a cache update could potentially lead to inaccurate information about UWP applications being returned. ## PR Checklist - [x] Closes: #45600 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments More details about the root cause can be found in the original issue: #45600. In summary, a `Task` is created and started as part of the `CreateWindowProcessInstance()` code. The creation is inside a lock, but there is no lock around access to the `_handlesToProcessCache` cache within the Task itself, which will run on a different thread. ## Validation Steps Performed - Ensured unit tests still pass (NB: I cannot currently run CmdPal UI tests for some reason) - Manually ran the applications, testing the Window Walker component in both --- .../Microsoft.CmdPal.Ext.WindowWalker/Components/Window.cs | 6 +++++- .../Microsoft.Plugin.WindowWalker/Components/Window.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Components/Window.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Components/Window.cs index c071d55e80..8db2e709fb 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Components/Window.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Components/Window.cs @@ -395,7 +395,11 @@ internal sealed class Window var childProcessName = WindowProcess.GetProcessNameFromProcessID(childProcessId); // Update process info in cache - _handlesToProcessCache[hWindow].UpdateProcessInfo(childProcessId, childThreadId, childProcessName); + lock (_handlesToProcessCache) + { + _handlesToProcessCache[hWindow].UpdateProcessInfo(childProcessId, childThreadId, childProcessName); + } + return false; } else diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs index cb01d9f59c..5786b63581 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs @@ -404,7 +404,11 @@ namespace Microsoft.Plugin.WindowWalker.Components var childProcessName = WindowProcess.GetProcessNameFromProcessID(childProcessId); // Update process info in cache - _handlesToProcessCache[hWindow].UpdateProcessInfo(childProcessId, childThreadId, childProcessName); + lock (_handlesToProcessCache) + { + _handlesToProcessCache[hWindow].UpdateProcessInfo(childProcessId, childThreadId, childProcessName); + } + return false; } else From b64afea9f70833895a8e9c9247b59d7b0234541d Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Fri, 20 Feb 2026 17:53:49 +0100 Subject: [PATCH 06/13] Fix for AP settings page crashing (#45699) Don't put anything other than `SettingsCard` in a `SettingsExpander`.. because it will blow up --- .../SettingsXAML/Views/AdvancedPastePage.xaml | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml index 3345528652..3b59daa7da 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml @@ -152,6 +152,18 @@ x:Uid="AdvancedPasteUI_Shortcut" HeaderIcon="{ui:FontIcon Glyph=}" IsExpanded="True"> + + + + + + + @@ -166,16 +178,7 @@ IsEnabled="{x:Bind ViewModel.ClipboardHistoryEnabled, Mode=OneWay}"> - - - - - + From ed76886d98248880f091977171bac4d9cce5aec9 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 22:24:15 +0000 Subject: [PATCH 07/13] Settings: Fix SCOOBE showing unknown symbol instead of bullet (#45696) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bullet separator between the release date and "View on GitHub" in the SCOOBE release notes page was rendering as an unknown symbol (◆?) instead of `•`. The character stored in the source file was `\x95` (Windows-1252 bullet), which is invalid in UTF-8 and maps to U+0095 (a control character). ## Changes - `ScoobeReleaseNotesPage.xaml.cs`: Replace `\x95` (Windows-1252) with `•` (U+2022, UTF-8: `\xE2\x80\xA2`) ```diff - $"{release.PublishedDate.ToString(...)} \x95 [View on GitHub]({releaseUrl})" + $"{release.PublishedDate.ToString(...)} • [View on GitHub]({releaseUrl})" ``` ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments Single-byte fix: the bullet character in `ScoobeReleaseNotesPage.xaml.cs` was a Windows-1252 `\x95` byte embedded in a UTF-8 source file. UTF-8 treats `0x95` as U+0095 (MESSAGE WAITING, a C1 control), which has no glyph and renders as the replacement/unknown symbol. Replaced with the correct Unicode bullet `•` (U+2022). ## Validation Steps Performed - Confirmed `\x95` byte present in original file via hex inspection - Verified replacement byte sequence is `\xE2\x80\xA2` (valid UTF-8 for U+2022) - No other occurrences of `\x95` in the file
Original prompt > > ---- > > *This section details on the original issue you should resolve* > > Settings: SCOOBE shows an unknown symbol instead of a bullet > ### Microsoft PowerToys version > > main > > ### Installation method > > Dev build in Visual Studio > > ### Area(s) with issue? > > Settings > > ### Steps to reproduce > > Main (0.98): > > Image > > 0.97: > > Image > > ### ✔️ Expected Behavior > > _No response_ > > ### ❌ Actual Behavior > > _No response_ > > ### Additional Information > > _No response_ > > ### Other Software > > _No response_ > > ## Comments on the Issue (you are @copilot in this section) > > > >
- Fixes microsoft/PowerToys#45695 --- ✨ Let Copilot coding agent [set things up for you](https://github.com/microsoft/PowerToys/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com> --- .../SettingsXAML/OOBE/Views/ScoobeReleaseNotesPage.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/ScoobeReleaseNotesPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/ScoobeReleaseNotesPage.xaml.cs index 9371fcbaed..278612290a 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/ScoobeReleaseNotesPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/ScoobeReleaseNotesPage.xaml.cs @@ -86,7 +86,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views var releaseUrl = string.Format(CultureInfo.InvariantCulture, GitHubReleaseLinkTemplate, release.TagName); releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"# {release.Name}"); - releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"{release.PublishedDate.ToString("MMMM d, yyyy", CultureInfo.CurrentCulture)} [View on GitHub]({releaseUrl})"); + releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"{release.PublishedDate.ToString("MMMM d, yyyy", CultureInfo.CurrentCulture)} • [View on GitHub]({releaseUrl})"); releaseNotesHtmlBuilder.AppendLine(); releaseNotesHtmlBuilder.AppendLine(" "); releaseNotesHtmlBuilder.AppendLine(); From fafb582ae28cf41ae93d7a5c74afa8d223c00ec1 Mon Sep 17 00:00:00 2001 From: Michael Jolley Date: Sat, 21 Feb 2026 18:47:27 -0800 Subject: [PATCH 08/13] Fix CmdPal apps extension ignoring the fallback results limit setting (#45716) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary MainListPage hardcoded _appResultLimit = 10 instead of reading from AllAppsCommandProvider.TopLevelResultLimit, which correctly parses the user's SearchResultLimit setting. This meant changing the results limit in settings had no effect on the apps extension fallback results. ## Changes - `MainListPage.cs` — Replaced the hardcoded _appResultLimit = 10 field with a computed property AppResultLimit that delegates to AllAppsCommandProvider.TopLevelResultLimit. - `MainListPageResultFactoryTests.cs` — Added three regression tests: - `Merge_AppLimitOfOne_ReturnsOnlyTopApp` — verifies limit of 1 returns only the top app - `Merge_AppLimitOfZero_ReturnsNoApps` — verifies limit of 0 returns no apps - `Merge_AppLimitOfOne_WithOtherResults_AppsAreLimited` — verifies apps are limited even when mixed with other result types ## Validation - [X] Existing tests pass - [X] New regression tests cover edge cases for the appResultLimit parameter ## Linked Issues - Fixes #45654 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Commands/MainListPage.cs | 5 +- .../MainListPageResultFactoryTests.cs | 69 +++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs index 325f9b5ff8..50a9fd92c3 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs @@ -47,7 +47,8 @@ public sealed partial class MainListPage : DynamicListPage, private bool _includeApps; private bool _filteredItemsIncludesApps; - private int _appResultLimit = 10; + + private int AppResultLimit => AllAppsCommandProvider.TopLevelResultLimit; private InterlockedBoolean _refreshRunning; private InterlockedBoolean _refreshRequested; @@ -190,7 +191,7 @@ public sealed partial class MainListPage : DynamicListPage, validScoredFallbacks, _filteredApps, validFallbacks, - _appResultLimit); + AppResultLimit); } } } diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/MainListPageResultFactoryTests.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/MainListPageResultFactoryTests.cs index 5cb60ca03b..13b583a495 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/MainListPageResultFactoryTests.cs +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/MainListPageResultFactoryTests.cs @@ -120,6 +120,75 @@ public partial class MainListPageResultFactoryTests Assert.AreEqual("A2", result[1].Title); } + [TestMethod] + public void Merge_AppLimitOfOne_ReturnsOnlyTopApp() + { + var apps = new List> + { + S("A1", 100), + S("A2", 90), + S("A3", 80), + }; + + var result = MainListPageResultFactory.Create( + null, + null, + apps, + null, + appResultLimit: 1); + + Assert.AreEqual(1, result.Length); + Assert.AreEqual("A1", result[0].Title); + } + + [TestMethod] + public void Merge_AppLimitOfZero_ReturnsNoApps() + { + var apps = new List> + { + S("A1", 100), + S("A2", 90), + }; + + var result = MainListPageResultFactory.Create( + null, + null, + apps, + null, + appResultLimit: 0); + + Assert.AreEqual(0, result.Length); + } + + [TestMethod] + public void Merge_AppLimitOfOne_WithOtherResults_AppsAreLimited() + { + var filtered = new List> + { + S("F1", 100), + S("F2", 50), + }; + + var apps = new List> + { + S("A1", 90), + S("A2", 80), + S("A3", 70), + }; + + var result = MainListPageResultFactory.Create( + filtered, + null, + apps, + null, + appResultLimit: 1); + + Assert.AreEqual(3, result.Length); + Assert.AreEqual("F1", result[0].Title); + Assert.AreEqual("A1", result[1].Title); + Assert.AreEqual("F2", result[2].Title); + } + [TestMethod] public void Merge_FiltersEmptyFallbacks() { From 368490ef79549ebb72bef1b973bbb0db4829d71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Mon, 23 Feb 2026 02:13:20 +0100 Subject: [PATCH 09/13] CmdPal: Include Microsoft.CmdPal.Ext.PerformanceMonitor in SLNF (#45738) ## Summary of the Pull Request This PR updates Command Palette's solution filter to include recently added Microsoft.CmdPal.Ext.PerformanceMonitor project. ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- src/modules/cmdpal/CommandPalette.slnf | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/cmdpal/CommandPalette.slnf b/src/modules/cmdpal/CommandPalette.slnf index decc56060f..e21c1c3c38 100644 --- a/src/modules/cmdpal/CommandPalette.slnf +++ b/src/modules/cmdpal/CommandPalette.slnf @@ -37,6 +37,7 @@ "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.Calc\\Microsoft.CmdPal.Ext.Calc.csproj", "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.ClipboardHistory\\Microsoft.CmdPal.Ext.ClipboardHistory.csproj", "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.Indexer\\Microsoft.CmdPal.Ext.Indexer.csproj", + "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.PerformanceMonitor\\Microsoft.CmdPal.Ext.PerformanceMonitor.csproj", "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.Registry\\Microsoft.CmdPal.Ext.Registry.csproj", "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.RemoteDesktop\\Microsoft.CmdPal.Ext.RemoteDesktop.csproj", "src\\modules\\cmdpal\\ext\\Microsoft.CmdPal.Ext.Shell\\Microsoft.CmdPal.Ext.Shell.csproj", From 009ee75de0d8209b6205665c4d755d3574f20461 Mon Sep 17 00:00:00 2001 From: Michael Jolley Date: Sun, 22 Feb 2026 19:14:19 -0800 Subject: [PATCH 10/13] CmdPal: Fix RDP extension rejecting host:port connections (#45740) ## Summary Fixes #45100 Uri.CheckHostName does not accept host:port strings (e.g. localhost:3389), returning UriHostNameType.Unknown. This causes the RDP extension to show an invalid hostname error when connecting to a local forwarded port. ## Changes - OpenRemoteDesktopCommand.cs - Strip port suffix before Uri.CheckHostName validation. The full host:port is still passed to mstsc /v:. - FallbackRemoteDesktopItem.cs - Same port-aware validation so the fallback correctly recognizes host:port queries and displays them in the title. - FallbackRemoteDesktopItemTests.cs - Added tests for localhost:3389 and 192.168.1.100:3390 inputs. ## Validation Port detection uses LastIndexOf(':') + ushort.TryParse to safely identify a trailing port number without affecting IPv6 addresses or plain hostnames. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../FallbackRemoteDesktopItemTests.cs | 42 +++++++++++++++++++ .../Commands/FallbackRemoteDesktopItem.cs | 36 +++++++++++----- .../Commands/OpenRemoteDesktopCommand.cs | 15 ++++++- 3 files changed, 82 insertions(+), 11 deletions(-) diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.RemoteDesktop.UnitTests/FallbackRemoteDesktopItemTests.cs b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.RemoteDesktop.UnitTests/FallbackRemoteDesktopItemTests.cs index f42520e6de..28f410c6ac 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.RemoteDesktop.UnitTests/FallbackRemoteDesktopItemTests.cs +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.RemoteDesktop.UnitTests/FallbackRemoteDesktopItemTests.cs @@ -98,6 +98,48 @@ public class FallbackRemoteDesktopItemTests Assert.IsNull(command); } + [TestMethod] + public void UpdateQuery_WhenQueryIsHostnameWithPort_UsesFullHostPort() + { + // Arrange + var setup = CreateFallback(); + var fallback = setup.Fallback; + const string hostPort = "localhost:3389"; + + // Act + fallback.UpdateQuery(hostPort); + + // Assert + var expectedTitle = string.Format(CultureInfo.CurrentCulture, OpenHostCompositeFormat, hostPort); + Assert.AreEqual(expectedTitle, fallback.Title); + Assert.AreEqual(Resources.remotedesktop_title, fallback.Subtitle); + + var command = fallback.Command as OpenRemoteDesktopCommand; + Assert.IsNotNull(command); + Assert.AreEqual(hostPort, GetCommandHost(command)); + } + + [TestMethod] + public void UpdateQuery_WhenQueryIsIPWithPort_UsesFullHostPort() + { + // Arrange + var setup = CreateFallback(); + var fallback = setup.Fallback; + const string hostPort = "192.168.1.100:3390"; + + // Act + fallback.UpdateQuery(hostPort); + + // Assert + var expectedTitle = string.Format(CultureInfo.CurrentCulture, OpenHostCompositeFormat, hostPort); + Assert.AreEqual(expectedTitle, fallback.Title); + Assert.AreEqual(Resources.remotedesktop_title, fallback.Subtitle); + + var command = fallback.Command as OpenRemoteDesktopCommand; + Assert.IsNotNull(command); + Assert.AreEqual(hostPort, GetCommandHost(command)); + } + private static string GetCommandHost(OpenRemoteDesktopCommand command) { var field = typeof(OpenRemoteDesktopCommand).GetField("_rdpHost", BindingFlags.NonPublic | BindingFlags.Instance); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/FallbackRemoteDesktopItem.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/FallbackRemoteDesktopItem.cs index 287a697c31..8319d5c2c2 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/FallbackRemoteDesktopItem.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/FallbackRemoteDesktopItem.cs @@ -60,18 +60,34 @@ internal sealed partial class FallbackRemoteDesktopItem : FallbackCommandItem Title = connectionName; Subtitle = string.Format(CultureInfo.CurrentCulture, RemoteDesktopOpenHostFormat, connectionName); } - else if (ValidUriHostNameTypes.Contains(Uri.CheckHostName(query))) - { - var connectionName = query.Trim(); - Command = new OpenRemoteDesktopCommand(connectionName); - Title = string.Format(CultureInfo.CurrentCulture, RemoteDesktopOpenHostFormat, connectionName); - Subtitle = Resources.remotedesktop_title; - } else { - Title = string.Empty; - Subtitle = string.Empty; - Command = _emptyCommand; + // Strip port suffix (e.g. "localhost:3389") before validation, + // since Uri.CheckHostName does not accept host:port strings. + var hostForValidation = query.Trim(); + var lastColon = hostForValidation.LastIndexOf(':'); + if (lastColon > 0 && lastColon < hostForValidation.Length - 1) + { + var portPart = hostForValidation.Substring(lastColon + 1); + if (ushort.TryParse(portPart, out _)) + { + hostForValidation = hostForValidation.Substring(0, lastColon); + } + } + + if (ValidUriHostNameTypes.Contains(Uri.CheckHostName(hostForValidation))) + { + var connectionName = query.Trim(); + Command = new OpenRemoteDesktopCommand(connectionName); + Title = string.Format(CultureInfo.CurrentCulture, RemoteDesktopOpenHostFormat, connectionName); + Subtitle = Resources.remotedesktop_title; + } + else + { + Title = string.Empty; + Subtitle = string.Empty; + Command = _emptyCommand; + } } } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/OpenRemoteDesktopCommand.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/OpenRemoteDesktopCommand.cs index 39c53fe9d2..614bebb95a 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/OpenRemoteDesktopCommand.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.RemoteDesktop/Commands/OpenRemoteDesktopCommand.cs @@ -46,7 +46,20 @@ internal sealed partial class OpenRemoteDesktopCommand : BaseObservable, IInvoka if (!string.IsNullOrWhiteSpace(_rdpHost)) { // validate that _rdpHost is a proper hostname or IP address - if (Uri.CheckHostName(_rdpHost) == UriHostNameType.Unknown) + // Strip port suffix (e.g. "localhost:3389") before validation, + // since Uri.CheckHostName does not accept host:port strings. + var hostForValidation = _rdpHost; + var lastColon = _rdpHost.LastIndexOf(':'); + if (lastColon > 0 && lastColon < _rdpHost.Length - 1) + { + var portPart = _rdpHost.Substring(lastColon + 1); + if (ushort.TryParse(portPart, out _)) + { + hostForValidation = _rdpHost.Substring(0, lastColon); + } + } + + if (Uri.CheckHostName(hostForValidation) == UriHostNameType.Unknown) { return CommandResult.ShowToast(new ToastArgs() { From 196b9305c3aa2a0790ae5a30388a27a19a586087 Mon Sep 17 00:00:00 2001 From: Michael Jolley Date: Sun, 22 Feb 2026 19:31:50 -0800 Subject: [PATCH 11/13] CmdPal: Add 'Keep previous query' setting to Command Palette (#45742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Closes #39929 Adds a new "Keep previous query" toggle to Command Palette settings that preserves the last search text when the palette is reopened after running a command. ## Changes - **`SettingsModel.cs`** — Added `KeepPreviousQuery` bool property (defaults to `false`) - **`SettingsViewModel.cs`** — Added property with auto-save on change - **`GeneralPage.xaml`** — Added toggle switch in the Activation section, below "Highlight search on activate" - **`Resources.resw`** — Added localized header ("Keep previous query") and description ("Preserves the last search text when Command Palette is reopened") - **`SearchBar.xaml.cs`** — `Receive(GoHomeMessage)` now checks the setting and skips `ClearSearch()` when enabled ## Behavior - **Off (default):** No change from current behavior — search text is cleared on dismiss. - **On:** When a command is run and the palette dismisses, the search text is preserved. On reopen, the previous query is still in the search box. Combined with the existing "Highlight search on activate" setting, the text will be pre-selected so the user can immediately retype or press Enter to re-run. ## Validation - Setting off: search clears on dismiss (existing behavior unchanged) - Setting on: search text persists across dismiss/reopen - Setting serializes/deserializes correctly via existing JSON settings infrastructure - No impact on page navigation, escape key behavior, or auto-go-home timer --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.CmdPal.UI.ViewModels/SettingsModel.cs | 2 ++ .../SettingsViewModel.cs | 10 ++++++++++ .../Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs | 8 +++++++- .../Microsoft.CmdPal.UI/Settings/GeneralPage.xaml | 3 +++ .../Microsoft.CmdPal.UI/Strings/en-us/Resources.resw | 6 ++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsModel.cs index c023c3daae..7c45395ab7 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsModel.cs @@ -42,6 +42,8 @@ public partial class SettingsModel : ObservableObject public bool HighlightSearchOnActivate { get; set; } = true; + public bool KeepPreviousQuery { get; set; } + public bool ShowSystemTrayIcon { get; set; } = true; public bool IgnoreShortcutWhenFullscreen { get; set; } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsViewModel.cs index 947a025e69..affee3fd89 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsViewModel.cs @@ -104,6 +104,16 @@ public partial class SettingsViewModel : INotifyPropertyChanged } } + public bool KeepPreviousQuery + { + get => _settings.KeepPreviousQuery; + set + { + _settings.KeepPreviousQuery = value; + Save(); + } + } + public int MonitorPositionIndex { get => (int)_settings.SummonOn; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs index ca27af4719..678c152e9d 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/SearchBar.xaml.cs @@ -421,7 +421,13 @@ public sealed partial class SearchBar : UserControl, } } - public void Receive(GoHomeMessage message) => ClearSearch(); + public void Receive(GoHomeMessage message) + { + if (!Settings.KeepPreviousQuery) + { + ClearSearch(); + } + } public void Receive(FocusSearchBoxMessage message) => FilterBox.Focus(Microsoft.UI.Xaml.FocusState.Programmatic); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml index bd80615556..bb3110deb3 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/GeneralPage.xaml @@ -68,6 +68,9 @@ + + + diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw index 996a6202fc..d82aa20b96 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw @@ -350,6 +350,12 @@ Right-click to remove the key combination, thereby deactivating the shortcut. Selects the previous search text at launch + + Keep previous query + + + Preserves the last search text when Command Palette is reopened + Show app details From 138c66c32803207cd806b1c71a482a9d91339996 Mon Sep 17 00:00:00 2001 From: Michael Jolley Date: Mon, 23 Feb 2026 04:05:09 -0800 Subject: [PATCH 12/13] CmdPal: Removing Core projects (#45693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Functionally, no differences. - Removed Core projects. - Core.Common => Microsoft.CmdPal.Common - Core.ViewModels => Microsoft.CmdPal.UI.ViewModels --------- Co-authored-by: Jiří Polášek --- .github/actions/spell-check/excludes.txt | 4 +- .github/actions/spell-check/expect.txt | 2 +- PowerToys.slnx | 16 +-- src/codeAnalysis/GlobalSuppressions.cs | 16 +-- src/modules/cmdpal/CommandPalette.slnf | 5 +- .../Microsoft.CmdPal.Core.Common.csproj | 26 ---- .../Messages/HideDetailsMessage.cs | 12 -- .../Messages/LaunchUriMessage.cs | 12 -- .../Messages/ShowDetailsMessage.cs | 12 -- .../Microsoft.CmdPal.Core.ViewModels.csproj | 25 ---- .../NativeMethods.json | 4 - .../NativeMethods.txt | 19 --- .../Properties/Resources.Designer.cs | 72 ---------- .../Properties/Resources.resx | 124 ------------------ .../AppPackagingFlavor.cs | 2 +- .../CoreLogger.cs | 2 +- .../Helpers/DiagnosticsHelper.cs | 3 +- .../Helpers/ExtensionHostInstance.cs | 4 +- .../Helpers/IPrecomputedListItem.cs | 4 +- .../Helpers/InterlockedBoolean.cs | 4 +- .../Helpers/InternalListHelpers.cs | 4 +- .../Helpers/NativeEventWaiter.cs | 5 +- .../Helpers/PathHelper.cs | 2 +- .../Helpers/SupersedingAsyncGate.cs | 6 +- .../Helpers/SupersedingAsyncValueGate`1.cs | 2 +- .../Helpers/VersionHelper.cs | 2 +- .../Helpers/WellKnownKeyChords.cs | 3 +- .../Microsoft.CmdPal.Common.csproj} | 29 ++-- .../NativeMethods.json | 0 .../NativeMethods.txt | 0 .../Properties/Resources.Designer.cs | 4 +- .../Properties/Resources.resx | 0 .../Services/ApplicationInfoService.cs | 4 +- .../Services/IApplicationInfoService.cs | 2 +- .../Services/IExtensionService.cs | 4 +- .../Services/IExtensionWrapper.cs | 5 +- .../Services/IRunHistoryService.cs | 2 +- .../Services/Reports/ErrorReportBuilder.cs | 4 +- .../Services/Reports/IErrorReportBuilder.cs | 2 +- .../Sanitizer/Abstraction/ITextSanitizer.cs | 2 +- .../Sanitizer/Abstraction/SanitizationRule.cs | 2 +- .../Sanitizer/ConnectionStringRuleProvider.cs | 4 +- .../EnvironmentPropertiesRuleProvider.cs | 4 +- .../Sanitizer/ErrorReportSanitizer.cs | 4 +- .../Sanitizer/FilenameMaskRuleProvider.cs | 4 +- .../Services/Sanitizer/GuardrailEventArgs.cs | 2 +- .../Sanitizer/ISanitizationRuleProvider.cs | 4 +- .../Services/Sanitizer/NetworkRuleProvider.cs | 4 +- .../Services/Sanitizer/PiiRuleProvider.cs | 4 +- .../ProfilePathAndUsernameRuleProvider.cs | 4 +- .../Services/Sanitizer/SanitizerDefaults.cs | 2 +- .../Sanitizer/SecretKeyValueRulesProvider.cs | 4 +- .../Services/Sanitizer/TextSanitizer.cs | 4 +- .../Services/Sanitizer/TokenRuleProvider.cs | 4 +- .../Services/Sanitizer/UrlRuleProvider.cs | 4 +- .../Text/BloomFilter.cs | 2 +- .../Text/FuzzyMatcherProvider.cs | 2 +- .../Text/FuzzyQuery.cs | 2 +- .../Text/FuzzyTarget.cs | 2 +- .../Text/FuzzyTargetCache.cs | 2 +- .../Text/IBloomFilter.cs | 2 +- .../Text/IFuzzyMatcherProvider.cs | 2 +- .../Text/IPrecomputedFuzzyMatcher.cs | 2 +- .../Text/IStringFolder.cs | 2 +- .../Text/PinyinFuzzyMatcherOptions.cs | 2 +- .../Text/PinyinMode.cs | 2 +- .../Text/PrecomputedFuzzyMatcher.cs | 2 +- .../Text/PrecomputedFuzzyMatcherOptions.cs | 2 +- .../Text/PrecomputedFuzzyMatcherWithPinyin.cs | 2 +- .../Text/StringFolder.cs | 2 +- .../Text/SymbolClassifier.cs | 2 +- .../Text/SymbolKind.cs | 2 +- .../AliasManager.cs | 2 +- .../AppExtensionHost.cs | 4 +- .../AsyncNavigationRequest.cs | 2 +- .../BatchUpdateManager.cs | 8 +- .../CommandBarViewModel.cs | 4 +- .../CommandContextItemViewModel.cs | 5 +- .../CommandItemViewModel.cs | 12 +- .../CommandPaletteContentPageViewModel.cs | 1 - .../CommandPaletteHost.cs | 4 +- .../CommandPalettePageViewModelFactory.cs | 1 - .../CommandProviderContext.cs | 2 +- .../CommandProviderWrapper.cs | 6 +- .../CommandSettingsViewModel.cs | 6 +- .../CommandViewModel.cs | 4 +- .../Commands/BuiltinsExtensionHost.cs | 2 +- .../Commands/LogMessagesPage.cs | 2 +- .../Commands/MainListPage.cs | 5 +- .../Commands/MainListPageResultFactory.cs | 2 +- .../Commands/NewExtensionFormBase.cs | 2 +- .../Commands/ReloadExtensionsCommand.cs | 1 - .../ConfirmResultViewModel.cs | 4 +- .../ContentFormViewModel.cs | 6 +- .../ContentMarkdownViewModel.cs | 4 +- .../ContentPageViewModel.cs | 6 +- .../ContentTreeViewModel.cs | 4 +- .../ContentViewModel.cs | 2 +- .../ContextMenuViewModel.cs | 10 +- .../DetailsCommandsViewModel.cs | 4 +- .../DetailsDataViewModel.cs | 5 +- .../DetailsElementViewModel.cs | 4 +- .../DetailsLinkViewModel.cs | 4 +- .../DetailsSeparatorViewModel.cs | 4 +- .../DetailsTagsViewModel.cs | 4 +- .../DetailsViewModel.cs | 4 +- .../ExtensionObjectViewModel.cs | 6 +- .../FallbackSettingsViewModel.cs | 1 - .../FilterItemViewModel.cs | 4 +- .../FiltersViewModel.cs | 6 +- .../GalleryGridPropertiesViewModel.cs | 4 +- .../GlobalLogPageContext.cs | 2 +- .../IBackgroundPropertyChangedNotification.cs | 2 +- .../IContextItemViewModel.cs | 2 +- .../IFilterItemViewModel.cs | 2 +- .../IGridPropertiesViewModel.cs | 2 +- .../IRootPageService.cs | 2 +- .../IconDataViewModel.cs | 4 +- .../IconInfoViewModel.cs | 4 +- .../ListItemType.cs | 2 +- .../ListItemViewModel.cs | 6 +- .../ListViewModel.cs | 9 +- .../LoadingPageViewModel.cs | 2 +- .../LogMessageViewModel.cs | 4 +- .../MediumGridPropertiesViewModel.cs | 4 +- .../ActivateSecondaryCommandMessage.cs | 6 +- .../ActivateSelectedListItemMessage.cs | 6 +- .../Messages/BeginInvokeMessage.cs | 2 +- .../Messages/ClearSearchMessage.cs | 6 +- .../Messages/CloseContextMenuMessage.cs | 6 +- .../Messages/CmdPalInvokeResultMessage.cs | 2 +- .../Messages/DismissMessage.cs | 2 +- .../Messages/ErrorOccurredMessage.cs | 2 +- .../Messages/ExtensionInvokedMessage.cs | 2 +- .../Messages/FocusSearchBoxMessage.cs | 6 +- .../Messages/GoBackMessage.cs | 8 +- .../Messages/GoHomeMessage.cs | 6 +- .../Messages/HandleCommandResultMessage.cs | 8 +- .../Messages/HideDetailsMessage.cs | 7 + .../Messages/LaunchUriMessage.cs | 7 + .../Messages/NavigateBackMessage.cs | 2 +- .../Messages/NavigateLeftCommand.cs | 2 +- .../Messages/NavigateNextCommand.cs | 6 +- .../Messages/NavigatePageDownCommand.cs | 6 +- .../Messages/NavigatePageUpCommand.cs | 6 +- .../Messages/NavigatePreviousCommand.cs | 6 +- .../Messages/NavigateRightCommand.cs | 2 +- .../Messages/NavigateToPageMessage.cs | 2 +- .../Messages/NavigationDepthMessage.cs | 2 +- .../Messages/PerformCommandMessage.cs | 4 +- .../Messages/SearchQueryMessage.cs | 2 +- .../Messages/SessionDurationMessage.cs | 2 +- .../Messages/ShowConfirmationMessage.cs | 6 +- .../Messages/ShowDetailsMessage.cs | 7 + .../Messages/ShowToastMessage.cs | 6 +- .../Messages/ShowWindowMessage.cs | 6 +- .../Messages/TelemetryBeginInvokeMessage.cs | 2 +- .../TelemetryExtensionInvokedMessage.cs | 2 +- .../Messages/TelemetryInvokeResultMessage.cs | 2 +- .../Messages/TryCommandKeybindingMessage.cs | 2 +- .../Messages/UpdateCommandBarMessage.cs | 4 +- .../Messages/UpdateSuggestionMessage.cs | 6 +- .../Microsoft.CmdPal.UI.ViewModels.csproj | 2 - .../Models/ExtensionObject`1.cs | 2 +- .../Models/ExtensionService.cs | 2 +- .../Models/ExtensionWrapper.cs | 2 +- .../NullPageViewModel.cs | 2 +- .../PageViewModel.cs | 6 +- .../ProgressViewModel.cs | 4 +- .../Properties/Resources.Designer.cs | 11 +- .../Properties/Resources.resx | 4 + .../ProviderSettingsViewModel.cs | 3 +- .../SeparatorViewModel.cs | 2 +- .../Services/DefaultCommandProviderCache.cs | 2 +- .../SettingsExtensionsViewModel.cs | 2 - .../ShellViewModel.cs | 8 +- .../ShowDetailsCommand.cs | 6 +- .../SmallGridPropertiesViewModel.cs | 4 +- .../StatusMessageViewModel.cs | 4 +- .../TagViewModel.cs | 4 +- .../ToastViewModel.cs | 4 +- .../TopLevelCommandManager.cs | 5 +- .../TopLevelViewModel.cs | 9 +- .../cmdpal/Microsoft.CmdPal.UI/App.xaml.cs | 9 +- .../Controls/CommandBar.xaml | 3 +- .../Controls/CommandBar.xaml.cs | 4 +- .../Controls/ContextMenu.xaml | 7 +- .../Controls/ContextMenu.xaml.cs | 6 +- .../Controls/FallbackRanker.xaml | 1 - .../Controls/FiltersDropDown.xaml | 6 +- .../Controls/FiltersDropDown.xaml.cs | 2 +- .../Controls/SearchBar.xaml.cs | 5 +- .../Microsoft.CmdPal.UI/Controls/Tag.xaml.cs | 2 +- .../Controls/WrapPanelCustom/WrapPanel.cs | 2 +- .../Converters/ContentTemplateSelector.cs | 1 - .../Converters/ContextItemTemplateSelector.cs | 4 +- .../Converters/DetailsDataTemplateSelector.cs | 2 +- .../Converters/FilterTemplateSelector.cs | 2 +- .../GridItemContainerStyleSelector.cs | 2 +- .../Converters/GridItemTemplateSelector.cs | 3 +- .../ListItemContainerStyleSelector.cs | 2 +- .../Converters/ListItemTemplateSelector.cs | 2 +- .../ExtViews/ContentPage.xaml | 1 - .../ExtViews/ContentPage.xaml.cs | 4 +- .../ExtViews/ListPage.xaml | 22 ++-- .../ExtViews/ListPage.xaml.cs | 5 +- .../Helpers/AdaptiveCache`2.cs | 2 +- .../Helpers/GlobalErrorHandler.cs | 4 +- .../Helpers/Icons/CachedIconSourceProvider.cs | 2 +- .../Helpers/Icons/IIconSourceProvider.cs | 2 +- .../Helpers/Icons/IconCacheProvider.cs | 2 +- .../Helpers/Icons/IconSourceProvider.cs | 2 +- .../Helpers/TelemetryForwarder.cs | 5 +- .../cmdpal/Microsoft.CmdPal.UI/LogWrapper.cs | 2 +- .../Microsoft.CmdPal.UI/MainWindow.xaml.cs | 5 +- .../Messages/OpenContextMenuMessage.cs | 2 +- .../Microsoft.CmdPal.UI.csproj | 1 - .../Pages/LoadingPage.xaml.cs | 2 +- .../Microsoft.CmdPal.UI/Pages/ShellPage.xaml | 14 +- .../Pages/ShellPage.xaml.cs | 3 +- .../PowerToysAppHostService.cs | 1 - .../PowerToysRootPageService.cs | 5 +- .../cmdpal/Microsoft.CmdPal.UI/Program.cs | 2 +- .../Microsoft.CmdPal.UI/RunHistoryService.cs | 2 +- .../Services/IThemeProvider.cs | 2 +- .../Services/WindowThemeSynchronizer.cs | 2 +- .../Settings/AppearancePage.xaml.cs | 3 - .../Settings/GeneralPage.xaml.cs | 2 +- .../Settings/InternalPage.xaml.cs | 2 +- .../Microsoft.CmdPal.UI/ToastWindow.xaml.cs | 3 +- .../Views/ICurrentPageAware.cs | 2 +- .../GlobalUsings.cs | 0 .../Microsoft.CmdPal.Common.UnitTests.csproj} | 2 +- .../ConnectionStringRuleProviderTests.cs | 4 +- .../ErrorReportSanitizerTests.TestData.cs | 0 .../Sanitizer/ErrorReportSanitizerTests.cs | 2 +- .../FilenameMaskRuleProviderTests.cs | 4 +- .../Sanitizer/PiiRuleProviderTests.cs | 6 +- .../SecretKeyValueRulesProviderTests.cs | 4 +- .../TestUtils/SanitizerTestHelper.cs | 2 +- .../Text/PrecomputedFuzzyMatcherEmojiTests.cs | 2 +- .../PrecomputedFuzzyMatcherOptionsTests.cs | 2 +- ...computedFuzzyMatcherSecondaryInputTests.cs | 2 +- .../Text/PrecomputedFuzzyMatcherTests.cs | 2 +- .../PrecomputedFuzzyMatcherUnicodeTests.cs | 2 +- .../PrecomputedFuzzyMatcherWithPinyinTests.cs | 2 +- .../Text/StringFolderTests.cs | 2 +- .../QueryTests.cs | 2 +- .../ShellCommandProviderTests.cs | 2 +- .../MainListPageResultFactoryTests.cs | 2 +- .../RecentCommandsTests.cs | 2 +- .../Microsoft.CmdPal.Ext.Apps/AppListItem.cs | 6 +- .../Microsoft.CmdPal.Ext.Apps/KeyChords.cs | 2 +- .../Microsoft.CmdPal.Ext.Apps.csproj | 2 +- .../BookmarksManager.cs | 2 +- .../Commands/LaunchBookmarkCommand.cs | 2 +- .../KeyChords.cs | 2 +- .../Pages/BookmarkListItem.cs | 3 +- .../Pages/BookmarkPlaceholderPage.cs | 2 +- .../TextFileSystemMetadataProvider.cs | 2 +- .../Helpers/UrlHelper.cs | 2 +- ...crosoft.CmdPal.Ext.ClipboardHistory.csproj | 2 +- .../Data/IndexerListItem.cs | 3 +- .../Microsoft.CmdPal.Ext.Indexer/KeyChords.cs | 2 +- .../Microsoft.CmdPal.Ext.Indexer.csproj | 2 +- .../Pages/ExploreListItem.cs | 2 +- .../DevHome/Helpers/Resources.cs | 2 +- ...osoft.CmdPal.Ext.PerformanceMonitor.csproj | 2 +- .../PerformanceWidgetsPage.cs | 2 +- .../Commands/OpenUrlWithHistoryCommand.cs | 2 +- .../FallbackExecuteItem.cs | 2 +- .../Helpers/ShellListPageHelpers.cs | 2 +- .../Microsoft.CmdPal.Ext.Shell.csproj | 22 +++- .../Pages/PathListItem.cs | 4 +- .../Pages/RunExeItem.cs | 2 +- .../Pages/ShellListPage.cs | 2 +- .../ShellCommandsProvider.cs | 2 +- .../Microsoft.CmdPal.Ext.WinGet.csproj | 2 +- .../WinGetExtensionHost.cs | 2 +- .../Commands/OpenWithCommand.cs | 2 +- 280 files changed, 473 insertions(+), 825 deletions(-) delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Microsoft.CmdPal.Core.Common.csproj delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HideDetailsMessage.cs delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/LaunchUriMessage.cs delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowDetailsMessage.cs delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Microsoft.CmdPal.Core.ViewModels.csproj delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.json delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.txt delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.Designer.cs delete mode 100644 src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.resx rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/AppPackagingFlavor.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/CoreLogger.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/DiagnosticsHelper.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/ExtensionHostInstance.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/IPrecomputedListItem.cs (91%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/InterlockedBoolean.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/InternalListHelpers.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/NativeEventWaiter.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/PathHelper.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/SupersedingAsyncGate.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/SupersedingAsyncValueGate`1.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/VersionHelper.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Helpers/WellKnownKeyChords.cs (97%) rename src/modules/cmdpal/{CoreCommonProps.props => Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj} (70%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/NativeMethods.json (100%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/NativeMethods.txt (100%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Properties/Resources.Designer.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Properties/Resources.resx (100%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/ApplicationInfoService.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/IApplicationInfoService.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/IExtensionService.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/IExtensionWrapper.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/IRunHistoryService.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Reports/ErrorReportBuilder.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Reports/IErrorReportBuilder.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/Abstraction/ITextSanitizer.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/Abstraction/SanitizationRule.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/ConnectionStringRuleProvider.cs (85%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/ErrorReportSanitizer.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/FilenameMaskRuleProvider.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/GuardrailEventArgs.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/ISanitizationRuleProvider.cs (69%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/NetworkRuleProvider.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/PiiRuleProvider.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/SanitizerDefaults.cs (88%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/SecretKeyValueRulesProvider.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/TextSanitizer.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/TokenRuleProvider.cs (88%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Services/Sanitizer/UrlRuleProvider.cs (83%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/BloomFilter.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/FuzzyMatcherProvider.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/FuzzyQuery.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/FuzzyTarget.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/FuzzyTargetCache.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/IBloomFilter.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/IFuzzyMatcherProvider.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/IPrecomputedFuzzyMatcher.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/IStringFolder.cs (86%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/PinyinFuzzyMatcherOptions.cs (91%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/PinyinMode.cs (85%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/PrecomputedFuzzyMatcher.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/PrecomputedFuzzyMatcherOptions.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/PrecomputedFuzzyMatcherWithPinyin.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/StringFolder.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/SymbolClassifier.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.Common => Microsoft.CmdPal.Common}/Text/SymbolKind.cs (86%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/AppExtensionHost.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/AsyncNavigationRequest.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/BatchUpdateManager.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/CommandBarViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/CommandContextItemViewModel.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/CommandItemViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/CommandProviderContext.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/CommandViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ConfirmResultViewModel.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ContentPageViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ContentViewModel.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ContextMenuViewModel.cs (97%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsCommandsViewModel.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsDataViewModel.cs (68%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsElementViewModel.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsLinkViewModel.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsSeparatorViewModel.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsTagsViewModel.cs (92%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/DetailsViewModel.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ExtensionObjectViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/FilterItemViewModel.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/FiltersViewModel.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/GalleryGridPropertiesViewModel.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/GlobalLogPageContext.cs (92%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IBackgroundPropertyChangedNotification.cs (92%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IContextItemViewModel.cs (88%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IFilterItemViewModel.cs (83%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IGridPropertiesViewModel.cs (88%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IRootPageService.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IconDataViewModel.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/IconInfoViewModel.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ListItemType.cs (85%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ListItemViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ListViewModel.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/LoadingPageViewModel.cs (92%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/LogMessageViewModel.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/MediumGridPropertiesViewModel.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ActivateSecondaryCommandMessage.cs (75%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ActivateSelectedListItemMessage.cs (74%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/BeginInvokeMessage.cs (80%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ClearSearchMessage.cs (66%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/CloseContextMenuMessage.cs (74%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/CmdPalInvokeResultMessage.cs (84%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/DismissMessage.cs (81%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ErrorOccurredMessage.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ExtensionInvokedMessage.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/FocusSearchBoxMessage.cs (66%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/GoBackMessage.cs (61%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/GoHomeMessage.cs (81%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/HandleCommandResultMessage.cs (70%) create mode 100644 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HideDetailsMessage.cs create mode 100644 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/LaunchUriMessage.cs rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigateBackMessage.cs (82%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigateLeftCommand.cs (86%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigateNextCommand.cs (77%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigatePageDownCommand.cs (76%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigatePageUpCommand.cs (76%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigatePreviousCommand.cs (76%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigateRightCommand.cs (86%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigateToPageMessage.cs (84%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/NavigationDepthMessage.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/PerformCommandMessage.cs (93%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/SearchQueryMessage.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/SessionDurationMessage.cs (91%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ShowConfirmationMessage.cs (73%) create mode 100644 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowDetailsMessage.cs rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ShowToastMessage.cs (64%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/ShowWindowMessage.cs (64%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/TelemetryBeginInvokeMessage.cs (85%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/TelemetryExtensionInvokedMessage.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/TelemetryInvokeResultMessage.cs (88%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/TryCommandKeybindingMessage.cs (86%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/UpdateCommandBarMessage.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Messages/UpdateSuggestionMessage.cs (61%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/Models/ExtensionObject`1.cs (90%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/NullPageViewModel.cs (89%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/PageViewModel.cs (98%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ProgressViewModel.cs (95%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/SeparatorViewModel.cs (92%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ShellViewModel.cs (99%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ShowDetailsCommand.cs (85%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/SmallGridPropertiesViewModel.cs (87%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/StatusMessageViewModel.cs (96%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/TagViewModel.cs (94%) rename src/modules/cmdpal/{Core/Microsoft.CmdPal.Core.ViewModels => Microsoft.CmdPal.UI.ViewModels}/ToastViewModel.cs (74%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/GlobalUsings.cs (100%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests/Microsoft.CmdPal.Core.Common.UnitTests.csproj => Microsoft.CmdPal.Common.UnitTests/Microsoft.CmdPal.Common.UnitTests.csproj} (89%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/ConnectionStringRuleProviderTests.cs (97%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/ErrorReportSanitizerTests.TestData.cs (100%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/ErrorReportSanitizerTests.cs (94%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/FilenameMaskRuleProviderTests.cs (94%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/PiiRuleProviderTests.cs (97%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Services/Sanitizer/SecretKeyValueRulesProviderTests.cs (98%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/TestUtils/SanitizerTestHelper.cs (98%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherEmojiTests.cs (98%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherOptionsTests.cs (98%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherSecondaryInputTests.cs (99%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherTests.cs (99%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherUnicodeTests.cs (99%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/PrecomputedFuzzyMatcherWithPinyinTests.cs (98%) rename src/modules/cmdpal/Tests/{Microsoft.CmdPal.Core.Common.UnitTests => Microsoft.CmdPal.Common.UnitTests}/Text/StringFolderTests.cs (97%) diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt index d2057bcda2..019bc357dd 100644 --- a/.github/actions/spell-check/excludes.txt +++ b/.github/actions/spell-check/excludes.txt @@ -110,8 +110,8 @@ ^src/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002\.pdn$ ^src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleMarkdownImagesPage\.cs$ ^src/modules/cmdpal/Microsoft\.CmdPal\.UI/Settings/InternalPage\.SampleData\.cs$ -^src/modules/cmdpal/Tests/Microsoft\.CmdPal\.Core\.Common\.UnitTests/.*\.TestData\.cs$ -^src/modules/cmdpal/Tests/Microsoft\.CmdPal\.Core\.Common\.UnitTests/Text/.*\.cs$ +^src/modules/cmdpal/Tests/Microsoft\.CmdPal\.Common\.UnitTests/.*\.TestData\.cs$ +^src/modules/cmdpal/Tests/Microsoft\.CmdPal\.Common\.UnitTests/Text/.*\.cs$ ^src/modules/colorPicker/ColorPickerUI/Shaders/GridShader\.cso$ ^src/modules/launcher/Plugins/Microsoft\.PowerToys\.Run\.Plugin\.TimeDate/Properties/ ^src/modules/MouseUtils/MouseJumpUI/MainForm\.resx$ diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 985ef2fc31..d4b925f503 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -845,6 +845,7 @@ MOUSEINPUT MOVESIZEEND MOVESIZESTART MRM +MRT mru msc mscorlib @@ -2037,7 +2038,6 @@ mousehighlighter mousejump mousepointer mouseutils -mrt MSAL msdia MSIs diff --git a/PowerToys.slnx b/PowerToys.slnx index fabd54f0f0..7c09e1500d 100644 --- a/PowerToys.slnx +++ b/PowerToys.slnx @@ -196,6 +196,10 @@ + + + + @@ -275,16 +279,6 @@ - - - - - - - - - - @@ -305,7 +299,7 @@ - + diff --git a/src/codeAnalysis/GlobalSuppressions.cs b/src/codeAnalysis/GlobalSuppressions.cs index ae544b0c76..dad4241522 100644 --- a/src/codeAnalysis/GlobalSuppressions.cs +++ b/src/codeAnalysis/GlobalSuppressions.cs @@ -22,13 +22,13 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("StyleCop.CSharp.SpecialRules", "SA0001:XmlCommentAnalysisDisabled", Justification = "Not enabled as we don't want or need XML documentation.")] [assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1629:DocumentationTextMustEndWithAPeriod", Justification = "Not enabled as we don't want or need XML documentation.")] -[assembly: SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly", Scope = "member", Target = "Microsoft.Templates.Core.Locations.TemplatesSynchronization.#SyncStatusChanged", Justification = "Using an Action does not allow the required notation")] +[assembly: SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly", Scope = "member", Target = "Microsoft.Templates.Locations.TemplatesSynchronization.#SyncStatusChanged", Justification = "Using an Action does not allow the required notation")] // Non general suppressions [assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "This is part of the markdown processing", MessageId = "System.Windows.Documents.Run.#ctor(System.String)", Scope = "member", Target = "Microsoft.Templates.UI.Controls.Markdown.#ImageInlineEvaluator(System.Text.RegularExpressions.Match)")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "We need to have the names of these keys in lowercase to be able to compare with the keys becoming form the template json. ContainsKey does not allow StringComparer specification to IgnoreCase", Scope = "member", Target = "Microsoft.Templates.Core.ITemplateInfoExtensions.#GetQueryableProperties(Microsoft.TemplateEngine.Abstractions.ITemplateInfo)")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "We need to have the names of these keys in lowercase to be able to compare with the keys becoming form the template json. ContainsKey does not allow StringComparer specification to IgnoreCase", Scope = "member", Target = "Microsoft.Templates.Core.Composition.CompositionQuery.#Match(System.Collections.Generic.IEnumerable`1,Microsoft.Templates.Core.Composition.QueryablePropertyDictionary)")] -[assembly: SuppressMessage("Usage", "VSTHRD103:Call async methods when in an async method", Justification = "Resource DictionaryWriter does not implement flush async", Scope = "member", Target = "~M:Microsoft.Templates.Core.PostActions.Catalog.Merge.MergeResourceDictionaryPostAction.ExecuteInternalAsync~System.Threading.Tasks.Task")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "We need to have the names of these keys in lowercase to be able to compare with the keys becoming form the template json. ContainsKey does not allow StringComparer specification to IgnoreCase", Scope = "member", Target = "Microsoft.Templates.ITemplateInfoExtensions.#GetQueryableProperties(Microsoft.TemplateEngine.Abstractions.ITemplateInfo)")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "We need to have the names of these keys in lowercase to be able to compare with the keys becoming form the template json. ContainsKey does not allow StringComparer specification to IgnoreCase", Scope = "member", Target = "Microsoft.Templates.Composition.CompositionQuery.#Match(System.Collections.Generic.IEnumerable`1,Microsoft.Templates.Composition.QueryablePropertyDictionary)")] +[assembly: SuppressMessage("Usage", "VSTHRD103:Call async methods when in an async method", Justification = "Resource DictionaryWriter does not implement flush async", Scope = "member", Target = "~M:Microsoft.Templates.PostActions.Catalog.Merge.MergeResourceDictionaryPostAction.ExecuteInternalAsync~System.Threading.Tasks.Task")] [assembly: SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Used in a lot of places for meaningful method names")] [assembly: SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Static methods may improve performance but decrease maintainability")] [assembly: SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Renaming everything would be a lot of work. It does not do any harm if an EventHandler delegate ends with the suffix EventHandler. Besides this, the Rule causes some false positives.")] @@ -43,10 +43,10 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("Microsoft.VisualStudio.Threading.Analyzers", "VSTHRD100:Avoid async void methods", Justification = "Event handlers needs async void", Scope = "member", Target = "~M:Microsoft.Templates.UI.ViewModels.Common.SavedTemplateViewModel.OnDelete(Microsoft.Templates.UI.ViewModels.Common.SavedTemplateViewModel)")] // Localization suppressions -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#CreateJunction(System.String,System.String,System.Boolean)", Justification = "Only used for local generation")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#DeleteJunction(System.String)", Justification = "Only used for local generation")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#InternalGetTarget(Microsoft.Win32.SafeHandles.SafeFileHandle)", Justification = "Only used for local generation")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#OpenReparsePoint(System.String,Microsoft.Templates.Core.Locations.JunctionNativeMethods+EFileAccess)", Justification = "Only used for local generation")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Locations.JunctionNativeMethods.#CreateJunction(System.String,System.String,System.Boolean)", Justification = "Only used for local generation")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Locations.JunctionNativeMethods.#DeleteJunction(System.String)", Justification = "Only used for local generation")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Locations.JunctionNativeMethods.#InternalGetTarget(Microsoft.Win32.SafeHandles.SafeFileHandle)", Justification = "Only used for local generation")] +[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Locations.JunctionNativeMethods.#OpenReparsePoint(System.String,Microsoft.Templates.Locations.JunctionNativeMethods+EFileAccess)", Justification = "Only used for local generation")] [assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Windows.Documents.InlineCollection.Add(System.String)", Scope = "member", Target = "Microsoft.Templates.UI.Extensions.TextBlockExtensions.#OnSequentialFlowStepChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)", Justification = "No text here")] [assembly: SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "The user's search term should be compared with culture based rules.", Scope = "type", Target = "~T:Microsoft.PowerToys.Run.Plugin.TimeDate.Components.SearchController")] diff --git a/src/modules/cmdpal/CommandPalette.slnf b/src/modules/cmdpal/CommandPalette.slnf index e21c1c3c38..278c4a7a5f 100644 --- a/src/modules/cmdpal/CommandPalette.slnf +++ b/src/modules/cmdpal/CommandPalette.slnf @@ -11,12 +11,11 @@ "src\\common\\version\\version.vcxproj", "src\\modules\\cmdpal\\CmdPalKeyboardService\\CmdPalKeyboardService.vcxproj", "src\\modules\\cmdpal\\CmdPalModuleInterface\\CmdPalModuleInterface.vcxproj", - "src\\modules\\cmdpal\\Core\\Microsoft.CmdPal.Core.Common\\Microsoft.CmdPal.Core.Common.csproj", - "src\\modules\\cmdpal\\Core\\Microsoft.CmdPal.Core.ViewModels\\Microsoft.CmdPal.Core.ViewModels.csproj", + "src\\modules\\cmdpal\\Microsoft.CmdPal.Common\\Microsoft.CmdPal.Common.csproj", "src\\modules\\cmdpal\\Microsoft.CmdPal.UI.ViewModels\\Microsoft.CmdPal.UI.ViewModels.csproj", "src\\modules\\cmdpal\\Microsoft.CmdPal.UI\\Microsoft.CmdPal.UI.csproj", "src\\modules\\cmdpal\\Microsoft.Terminal.UI\\Microsoft.Terminal.UI.vcxproj", - "src\\modules\\cmdpal\\Tests\\Microsoft.CmdPal.Core.Common.UnitTests\\Microsoft.CmdPal.Core.Common.UnitTests.csproj", + "src\\modules\\cmdpal\\Tests\\Microsoft.CmdPal.Common.UnitTests\\Microsoft.CmdPal.Common.UnitTests.csproj", "src\\modules\\cmdpal\\Tests\\Microsoft.CmdPal.Ext.Apps.UnitTests\\Microsoft.CmdPal.Ext.Apps.UnitTests.csproj", "src\\modules\\cmdpal\\Tests\\Microsoft.CmdPal.Ext.Bookmarks.UnitTests\\Microsoft.CmdPal.Ext.Bookmarks.UnitTests.csproj", "src\\modules\\cmdpal\\Tests\\Microsoft.CmdPal.Ext.Calc.UnitTests\\Microsoft.CmdPal.Ext.Calc.UnitTests.csproj", diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Microsoft.CmdPal.Core.Common.csproj b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Microsoft.CmdPal.Core.Common.csproj deleted file mode 100644 index 300264967d..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Microsoft.CmdPal.Core.Common.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Microsoft.CmdPal.Core.Common - - - - - - - - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - - - - diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HideDetailsMessage.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HideDetailsMessage.cs deleted file mode 100644 index 43fa403731..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HideDetailsMessage.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.CmdPal.Core.ViewModels.Models; -using Microsoft.CommandPalette.Extensions; - -namespace Microsoft.CmdPal.Core.ViewModels.Messages; - -public record HideDetailsMessage() -{ -} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/LaunchUriMessage.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/LaunchUriMessage.cs deleted file mode 100644 index 3835b7cc7f..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/LaunchUriMessage.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.CmdPal.Core.ViewModels.Models; -using Microsoft.CommandPalette.Extensions; - -namespace Microsoft.CmdPal.Core.ViewModels.Messages; - -public record LaunchUriMessage(Uri Uri) -{ -} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowDetailsMessage.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowDetailsMessage.cs deleted file mode 100644 index 69dda7a589..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowDetailsMessage.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.CmdPal.Core.ViewModels.Models; -using Microsoft.CommandPalette.Extensions; - -namespace Microsoft.CmdPal.Core.ViewModels.Messages; - -public record ShowDetailsMessage(DetailsViewModel Details) -{ -} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Microsoft.CmdPal.Core.ViewModels.csproj b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Microsoft.CmdPal.Core.ViewModels.csproj deleted file mode 100644 index 6e1b224ecd..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Microsoft.CmdPal.Core.ViewModels.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - false - - - - - - - - - - - - - - True - True - Resources.resx - - - - diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.json b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.json deleted file mode 100644 index 59fa7259c4..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://aka.ms/CsWin32.schema.json", - "allowMarshaling": false -} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.txt b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.txt deleted file mode 100644 index 981c7446f7..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NativeMethods.txt +++ /dev/null @@ -1,19 +0,0 @@ -GetPhysicallyInstalledSystemMemory -GlobalMemoryStatusEx -GetSystemInfo -CoCreateInstance -SetForegroundWindow -IsIconic -RegisterHotKey -SetWindowLongPtr -CallWindowProc -ShowWindow -SetForegroundWindow -SetFocus -SetActiveWindow -MonitorFromWindow -GetMonitorInfo -SHCreateStreamOnFileEx -CoAllowSetForegroundWindow -SHCreateStreamOnFileEx -SHLoadIndirectString diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.Designer.cs b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.Designer.cs deleted file mode 100644 index ebfc32b862..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.CmdPal.Core.ViewModels.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CmdPal.Core.ViewModels.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Show details. - /// - public static string ShowDetailsCommand { - get { - return ResourceManager.GetString("ShowDetailsCommand", resourceCulture); - } - } - } -} diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.resx b/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.resx deleted file mode 100644 index 560907942b..0000000000 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Show details - Name for the command that shows details of an item - - \ No newline at end of file diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/AppPackagingFlavor.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/AppPackagingFlavor.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/AppPackagingFlavor.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/AppPackagingFlavor.cs index 2d23db30b3..abb8bfe0a4 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/AppPackagingFlavor.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/AppPackagingFlavor.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common; +namespace Microsoft.CmdPal.Common; /// /// Represents the packaging flavor of the application. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/CoreLogger.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/CoreLogger.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/CoreLogger.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/CoreLogger.cs index 1863756c75..4540544d05 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/CoreLogger.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/CoreLogger.cs @@ -4,7 +4,7 @@ using System; -namespace Microsoft.CmdPal.Core.Common; +namespace Microsoft.CmdPal.Common; public static class CoreLogger { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/DiagnosticsHelper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/DiagnosticsHelper.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/DiagnosticsHelper.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/DiagnosticsHelper.cs index ee28b94ac4..92c850261b 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/DiagnosticsHelper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/DiagnosticsHelper.cs @@ -2,10 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// Provides utility methods for building diagnostic and error messages. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/ExtensionHostInstance.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/ExtensionHostInstance.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/ExtensionHostInstance.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/ExtensionHostInstance.cs index 4c1f690635..d40f69d6b1 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/ExtensionHostInstance.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/ExtensionHostInstance.cs @@ -2,12 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading.Tasks; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.Common; +namespace Microsoft.CmdPal.Common; public partial class ExtensionHostInstance { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/IPrecomputedListItem.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/IPrecomputedListItem.cs similarity index 91% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/IPrecomputedListItem.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/IPrecomputedListItem.cs index 2847ee7b12..b0fd6e1dd1 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/IPrecomputedListItem.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/IPrecomputedListItem.cs @@ -2,9 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common.Text; +using Microsoft.CmdPal.Common.Text; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// Represents an item that can provide precomputed fuzzy matching targets for its title and subtitle. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InterlockedBoolean.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InterlockedBoolean.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InterlockedBoolean.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InterlockedBoolean.cs index d098c33a8b..4cec20ad91 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InterlockedBoolean.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InterlockedBoolean.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Threading; - -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// Thread-safe boolean implementation using atomic operations diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InternalListHelpers.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InternalListHelpers.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InternalListHelpers.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InternalListHelpers.cs index 60d841aaf8..eb2ad98aef 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/InternalListHelpers.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/InternalListHelpers.cs @@ -4,9 +4,9 @@ using System.Buffers; using System.Diagnostics; -using Microsoft.CmdPal.Core.Common.Text; +using Microsoft.CmdPal.Common.Text; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; public static partial class InternalListHelpers { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/NativeEventWaiter.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/NativeEventWaiter.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/NativeEventWaiter.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/NativeEventWaiter.cs index df644795f0..c617ba6ece 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/NativeEventWaiter.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/NativeEventWaiter.cs @@ -2,12 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading; - using Microsoft.UI.Dispatching; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; public static partial class NativeEventWaiter { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/PathHelper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/PathHelper.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/PathHelper.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/PathHelper.cs index 75cfcac444..259dbdb85a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/PathHelper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/PathHelper.cs @@ -6,7 +6,7 @@ using System.Runtime.CompilerServices; using Windows.Win32; using Windows.Win32.Storage.FileSystem; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; public static class PathHelper { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncGate.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncGate.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncGate.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncGate.cs index f5e4d3e97b..1608054333 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncGate.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncGate.cs @@ -2,11 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// An async gate that ensures only one operation runs at a time. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncValueGate`1.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncValueGate`1.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncValueGate`1.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncValueGate`1.cs index 4fab6bf194..12ff456f9f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/SupersedingAsyncValueGate`1.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncValueGate`1.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// An async gate that ensures only one value computation runs at a time. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/VersionHelper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/VersionHelper.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/VersionHelper.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/VersionHelper.cs index ad280b6c52..0b7293e7d8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/VersionHelper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/VersionHelper.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using Windows.ApplicationModel; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// Helper class for retrieving application version information safely. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/WellKnownKeyChords.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/WellKnownKeyChords.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/WellKnownKeyChords.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/WellKnownKeyChords.cs index 19364ddbd6..5f44e951a6 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Helpers/WellKnownKeyChords.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/WellKnownKeyChords.cs @@ -4,10 +4,9 @@ using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; - using Windows.System; -namespace Microsoft.CmdPal.Core.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; /// /// Well-known key chords used in the Command Palette and extensions. diff --git a/src/modules/cmdpal/CoreCommonProps.props b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj similarity index 70% rename from src/modules/cmdpal/CoreCommonProps.props rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj index 51d502a65d..255561ef8b 100644 --- a/src/modules/cmdpal/CoreCommonProps.props +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj @@ -1,7 +1,9 @@ - - - + + + + + Microsoft.CmdPal.Common enable preview @@ -23,6 +25,11 @@ + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -32,20 +39,24 @@ - - - - - PublicResXFileCodeGenerator + ResXFileCodeGenerator Resources.Designer.cs + + + True + True + Resources.resx + + + - <_Parameter1>$(AssemblyName).UnitTests + <_Parameter1>$(AssemblyName).UnitTests diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/NativeMethods.json b/src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.json similarity index 100% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/NativeMethods.json rename to src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.json diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/NativeMethods.txt b/src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.txt similarity index 100% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/NativeMethods.txt rename to src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.txt diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Properties/Resources.Designer.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Properties/Resources.Designer.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Properties/Resources.Designer.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Properties/Resources.Designer.cs index 052da7deb1..2837c1a1bd 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Microsoft.CmdPal.Core.Common.Properties { +namespace Microsoft.CmdPal.Common.Properties { using System; @@ -39,7 +39,7 @@ namespace Microsoft.CmdPal.Core.Common.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CmdPal.Core.Common.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CmdPal.Common.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Properties/Resources.resx b/src/modules/cmdpal/Microsoft.CmdPal.Common/Properties/Resources.resx similarity index 100% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Properties/Resources.resx rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Properties/Resources.resx diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/ApplicationInfoService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/ApplicationInfoService.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/ApplicationInfoService.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/ApplicationInfoService.cs index 0919c38946..832e7e991f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/ApplicationInfoService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/ApplicationInfoService.cs @@ -5,11 +5,11 @@ using System.Globalization; using System.Runtime.InteropServices; using System.Security.Principal; -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common.Helpers; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.ApplicationModel; -namespace Microsoft.CmdPal.Core.Common.Services; +namespace Microsoft.CmdPal.Common.Services; /// /// Implementation of IApplicationInfoService providing application-wide information. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IApplicationInfoService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IApplicationInfoService.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IApplicationInfoService.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IApplicationInfoService.cs index f687333d20..6ff036dc40 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IApplicationInfoService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IApplicationInfoService.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Services; +namespace Microsoft.CmdPal.Common.Services; /// /// Provides access to application-wide information such as version, packaging flavor, and directory paths. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionService.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionService.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionService.cs index bc35a0d284..56f34e3a99 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionService.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Threading.Tasks; using Windows.Foundation; -namespace Microsoft.CmdPal.Core.Common.Services; +namespace Microsoft.CmdPal.Common.Services; public interface IExtensionService { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionWrapper.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs index 3aaf4bdf52..2f0a6a7fa8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IExtensionWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs @@ -2,13 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Microsoft.CommandPalette.Extensions; using Windows.ApplicationModel; -namespace Microsoft.CmdPal.Core.Common.Services; +namespace Microsoft.CmdPal.Common.Services; public interface IExtensionWrapper { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IRunHistoryService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IRunHistoryService.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IRunHistoryService.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IRunHistoryService.cs index fd68b6e521..b145417d21 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/IRunHistoryService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IRunHistoryService.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Services; +namespace Microsoft.CmdPal.Common.Services; public interface IRunHistoryService { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/ErrorReportBuilder.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/ErrorReportBuilder.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/ErrorReportBuilder.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/ErrorReportBuilder.cs index c98740aaf5..0f227bc740 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/ErrorReportBuilder.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/ErrorReportBuilder.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer; +using Microsoft.CmdPal.Common.Services.Sanitizer; -namespace Microsoft.CmdPal.Core.Common.Services.Reports; +namespace Microsoft.CmdPal.Common.Services.Reports; public sealed class ErrorReportBuilder : IErrorReportBuilder { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/IErrorReportBuilder.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/IErrorReportBuilder.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/IErrorReportBuilder.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/IErrorReportBuilder.cs index 77487b01e5..471406a2d4 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Reports/IErrorReportBuilder.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Reports/IErrorReportBuilder.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Services.Reports; +namespace Microsoft.CmdPal.Common.Services.Reports; /// /// Defines a contract for creating human-readable error reports from exceptions, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs index 85b7973bf9..deb36570e8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/ITextSanitizer.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +namespace Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; /// /// Defines a service that sanitizes text by applying a set of configurable, regex-based rules. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs index 27460fafd5..bfa45cf85d 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/Abstraction/SanitizationRule.cs @@ -4,7 +4,7 @@ using System.Text.RegularExpressions; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +namespace Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; public readonly record struct SanitizationRule { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs similarity index 85% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs index 00fffbcb84..eb4dbbce5c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ConnectionStringRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed partial class ConnectionStringRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs index 4fcb779e35..b328e09e7c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/EnvironmentPropertiesRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed class EnvironmentPropertiesRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ErrorReportSanitizer.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ErrorReportSanitizer.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ErrorReportSanitizer.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ErrorReportSanitizer.cs index 35c4496b28..c7daac2207 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ErrorReportSanitizer.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ErrorReportSanitizer.cs @@ -2,9 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; /// /// Specific sanitizer used for error report content. Builds on top of the generic TextSanitizer. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs index fecd6ec580..600360db88 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/FilenameMaskRuleProvider.cs @@ -4,9 +4,9 @@ using System.Collections.Frozen; using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed class FilenameMaskRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/GuardrailEventArgs.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/GuardrailEventArgs.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/GuardrailEventArgs.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/GuardrailEventArgs.cs index ab00ac7510..3d5d8ecea9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/GuardrailEventArgs.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/GuardrailEventArgs.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; public record GuardrailEventArgs( string RuleDescription, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ISanitizationRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ISanitizationRuleProvider.cs similarity index 69% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ISanitizationRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ISanitizationRuleProvider.cs index 5d21c5262f..bbc933a7f9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ISanitizationRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ISanitizationRuleProvider.cs @@ -2,9 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal interface ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/NetworkRuleProvider.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/NetworkRuleProvider.cs index 6be99b6ff6..de73a866fe 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/NetworkRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/NetworkRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed partial class NetworkRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/PiiRuleProvider.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/PiiRuleProvider.cs index ae8f167f7c..b2bb96cf2e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/PiiRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/PiiRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed partial class PiiRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs index be3d086ae7..e2e0b64e06 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/ProfilePathAndUsernameRuleProvider.cs @@ -4,9 +4,9 @@ using System.Collections.Frozen; using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed class ProfilePathAndUsernameRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SanitizerDefaults.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SanitizerDefaults.cs similarity index 88% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SanitizerDefaults.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SanitizerDefaults.cs index 83c7a9bbb1..50b6c9fbe7 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SanitizerDefaults.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SanitizerDefaults.cs @@ -4,7 +4,7 @@ using System.Text.RegularExpressions; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal static class SanitizerDefaults { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs index d5b5f2358a..e33e9961ec 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/SecretKeyValueRulesProvider.cs @@ -4,9 +4,9 @@ using System.Collections.Frozen; using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed class SecretKeyValueRulesProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TextSanitizer.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TextSanitizer.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TextSanitizer.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TextSanitizer.cs index 7b835bc26f..20cc285859 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TextSanitizer.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TextSanitizer.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; /// /// Generic text sanitizer that applies a sequence of regex-based rules over input text. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TokenRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TokenRuleProvider.cs similarity index 88% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TokenRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TokenRuleProvider.cs index fb8da33336..d6ed8a5712 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/TokenRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/TokenRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed partial class TokenRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/UrlRuleProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/UrlRuleProvider.cs similarity index 83% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/UrlRuleProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/UrlRuleProvider.cs index 17ded73ea5..88406a5624 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Services/Sanitizer/UrlRuleProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/Sanitizer/UrlRuleProvider.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Text.RegularExpressions; -using Microsoft.CmdPal.Core.Common.Services.Sanitizer.Abstraction; +using Microsoft.CmdPal.Common.Services.Sanitizer.Abstraction; -namespace Microsoft.CmdPal.Core.Common.Services.Sanitizer; +namespace Microsoft.CmdPal.Common.Services.Sanitizer; internal sealed partial class UrlRuleProvider : ISanitizationRuleProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/BloomFilter.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/BloomFilter.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/BloomFilter.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/BloomFilter.cs index 59255a1bae..6a3b54d19a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/BloomFilter.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/BloomFilter.cs @@ -4,7 +4,7 @@ using System.Runtime.CompilerServices; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class BloomFilter : IBloomFilter { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyMatcherProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyMatcherProvider.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyMatcherProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyMatcherProvider.cs index 80c5fa9ace..755f18403e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyMatcherProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyMatcherProvider.cs @@ -4,7 +4,7 @@ using System.Globalization; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class FuzzyMatcherProvider : IFuzzyMatcherProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyQuery.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyQuery.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyQuery.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyQuery.cs index 80de31bd7a..978ab0a955 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyQuery.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyQuery.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public readonly struct FuzzyQuery { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTarget.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTarget.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTarget.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTarget.cs index b0c2927f20..8ecaf41bf6 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTarget.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTarget.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public readonly struct FuzzyTarget { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTargetCache.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTargetCache.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTargetCache.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTargetCache.cs index dc5ec6e011..236806e139 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/FuzzyTargetCache.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/FuzzyTargetCache.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public struct FuzzyTargetCache { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IBloomFilter.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IBloomFilter.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IBloomFilter.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IBloomFilter.cs index e9234e7adf..a24bcd405a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IBloomFilter.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IBloomFilter.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public interface IBloomFilter { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IFuzzyMatcherProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IFuzzyMatcherProvider.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IFuzzyMatcherProvider.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IFuzzyMatcherProvider.cs index 706dd0d8bf..9eb20e966d 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IFuzzyMatcherProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IFuzzyMatcherProvider.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public interface IFuzzyMatcherProvider { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IPrecomputedFuzzyMatcher.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IPrecomputedFuzzyMatcher.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IPrecomputedFuzzyMatcher.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IPrecomputedFuzzyMatcher.cs index dfb8af378e..1f89dec9c1 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IPrecomputedFuzzyMatcher.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IPrecomputedFuzzyMatcher.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public interface IPrecomputedFuzzyMatcher { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IStringFolder.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IStringFolder.cs similarity index 86% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IStringFolder.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IStringFolder.cs index 6fcfbfaf61..9d2ef18abb 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/IStringFolder.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/IStringFolder.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public interface IStringFolder { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinFuzzyMatcherOptions.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinFuzzyMatcherOptions.cs similarity index 91% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinFuzzyMatcherOptions.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinFuzzyMatcherOptions.cs index c060c33c92..9360c2e9af 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinFuzzyMatcherOptions.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinFuzzyMatcherOptions.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class PinyinFuzzyMatcherOptions { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinMode.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinMode.cs similarity index 85% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinMode.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinMode.cs index 0da88e14c0..355299e06a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PinyinMode.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PinyinMode.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public enum PinyinMode { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcher.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcher.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcher.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcher.cs index 0994f1d328..45e314ecb5 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcher.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcher.cs @@ -7,7 +7,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class PrecomputedFuzzyMatcher : IPrecomputedFuzzyMatcher { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherOptions.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherOptions.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherOptions.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherOptions.cs index b1b01d60f1..29c4d7b9e5 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherOptions.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherOptions.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class PrecomputedFuzzyMatcherOptions { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs index 026328f2c5..4cd051c145 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/PrecomputedFuzzyMatcherWithPinyin.cs @@ -6,7 +6,7 @@ using System.Globalization; using System.Runtime.CompilerServices; using ToolGood.Words.Pinyin; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class PrecomputedFuzzyMatcherWithPinyin : IPrecomputedFuzzyMatcher { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/StringFolder.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/StringFolder.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/StringFolder.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/StringFolder.cs index 2d814be553..3745bf1068 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/StringFolder.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/StringFolder.cs @@ -6,7 +6,7 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Text; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; public sealed class StringFolder : IStringFolder { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolClassifier.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolClassifier.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolClassifier.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolClassifier.cs index e1be786646..aafe9de169 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolClassifier.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolClassifier.cs @@ -4,7 +4,7 @@ using System.Runtime.CompilerServices; -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; internal static class SymbolClassifier { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolKind.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolKind.cs similarity index 86% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolKind.cs rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolKind.cs index d2644be420..7019cffd63 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.Common/Text/SymbolKind.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Text/SymbolKind.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.Common.Text; +namespace Microsoft.CmdPal.Common.Text; internal enum SymbolKind : byte { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AliasManager.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AliasManager.cs index 4c997266c6..94c19e688c 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AliasManager.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AliasManager.cs @@ -4,7 +4,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Messages; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AppExtensionHost.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AppExtensionHost.cs index eab0a8522e..c3405ff84b 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AppExtensionHost.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AppExtensionHost.cs @@ -4,12 +4,12 @@ using System.Collections.ObjectModel; using System.Diagnostics; -using Microsoft.CmdPal.Core.Common; +using Microsoft.CmdPal.Common; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.Foundation; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public abstract partial class AppExtensionHost : IExtensionHost { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AsyncNavigationRequest.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AsyncNavigationRequest.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AsyncNavigationRequest.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AsyncNavigationRequest.cs index 189d566c8a..2086ae4c1c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/AsyncNavigationRequest.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AsyncNavigationRequest.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; /// /// Encapsulates a navigation request within Command Palette view models. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/BatchUpdateManager.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/BatchUpdateManager.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/BatchUpdateManager.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/BatchUpdateManager.cs index 52d6091bd8..5cb408ef11 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/BatchUpdateManager.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/BatchUpdateManager.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using System.Collections.Concurrent; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.Common.Helpers; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; internal static class BatchUpdateManager { @@ -122,7 +122,7 @@ internal static class BatchUpdateManager internal interface IBatchUpdateTarget { - /// UI scheduler (used by targets internally for UI marshaling). Kept here for diagnostics / consistency. + /// Gets UI scheduler (used by targets internally for UI marshaling). Kept here for diagnostics / consistency. TaskScheduler UIScheduler { get; } /// Apply any coalesced updates. Must be safe to call on a background thread. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandBarViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandBarViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandBarViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandBarViewModel.cs index 010432a5e1..8c5a623d3a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandBarViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandBarViewModel.cs @@ -4,11 +4,11 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.System; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class CommandBarViewModel : ObservableObject, IRecipient diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandContextItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandContextItemViewModel.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandContextItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandContextItemViewModel.cs index bc07fca640..2f507495c4 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandContextItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandContextItemViewModel.cs @@ -3,11 +3,10 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] public partial class CommandContextItemViewModel(ICommandContextItem contextItem, WeakReference context) : CommandItemViewModel(new(contextItem), context), IContextItemViewModel diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandItemViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandItemViewModel.cs index af10995cf9..25078ace70 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandItemViewModel.cs @@ -3,16 +3,16 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Text; -using Microsoft.CmdPal.Core.ViewModels.Messages; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Text; +using Microsoft.CmdPal.UI.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.ApplicationModel.DataTransfer; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] public partial class CommandItemViewModel : ExtensionObjectViewModel, ICommandBarContext, IPrecomputedListItem diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs index 3312cac2f9..deae412657 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteContentPageViewModel.cs @@ -2,7 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; using Microsoft.CommandPalette.Extensions; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteHost.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteHost.cs index af089b3edc..2b0b338e74 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteHost.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPaletteHost.cs @@ -2,8 +2,8 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.Common.Services; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.CommandPalette.Extensions; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs index 0c8397b3c4..155f755c66 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandPalettePageViewModelFactory.cs @@ -2,7 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; using Microsoft.CommandPalette.Extensions; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderContext.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderContext.cs index 948a911dd9..125d841a63 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandProviderContext.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderContext.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public sealed class CommandProviderContext { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs index 2e2c009db7..2785dc1d9e 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs @@ -3,14 +3,12 @@ // See the LICENSE file in the project root for more information. using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common.Services; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CmdPal.UI.ViewModels.Services; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Microsoft.Extensions.DependencyInjection; - using Windows.Foundation; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs index 7b5d5f06c6..ee25758cba 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandSettingsViewModel.cs @@ -2,9 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.UI.ViewModels; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandViewModel.cs index 6ec593bfa4..6e86bedc8a 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/CommandViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class CommandViewModel : ExtensionObjectViewModel { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltinsExtensionHost.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltinsExtensionHost.cs index c046d0c21a..9b8bd8ed48 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltinsExtensionHost.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltinsExtensionHost.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.Common; +using Microsoft.CmdPal.Common; namespace Microsoft.CmdPal.UI.ViewModels.BuiltinCommands; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/LogMessagesPage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/LogMessagesPage.cs index 90dea58e5c..7c02739bb4 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/LogMessagesPage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/LogMessagesPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Specialized; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs index 50a9fd92c3..90a153c924 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs @@ -7,9 +7,8 @@ using System.Collections.Specialized; using System.Diagnostics; using CommunityToolkit.Mvvm.Messaging; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Text; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Text; using Microsoft.CmdPal.Ext.Apps; using Microsoft.CmdPal.Ext.Apps.Programs; using Microsoft.CmdPal.Ext.Apps.State; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPageResultFactory.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPageResultFactory.cs index 0c0d876179..602f978ce2 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPageResultFactory.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPageResultFactory.cs @@ -4,7 +4,7 @@ #pragma warning disable IDE0007 // Use implicit type -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common.Helpers; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionFormBase.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionFormBase.cs index 5a68c2a2cf..e68fef10a4 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionFormBase.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionFormBase.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.IO.Compression; using System.Text.Json; using System.Text.Json.Nodes; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.Foundation; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/ReloadExtensionsCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/ReloadExtensionsCommand.cs index 88024efe2f..c2fb9f916b 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/ReloadExtensionsCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/ReloadExtensionsCommand.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ConfirmResultViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ConfirmResultViewModel.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ConfirmResultViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ConfirmResultViewModel.cs index c653357ccd..a13379916f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ConfirmResultViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ConfirmResultViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ConfirmResultViewModel(IConfirmationArgs _args, WeakReference context) : ExtensionObjectViewModel(context) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentFormViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentFormViewModel.cs index aea2125573..54b043e006 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentFormViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentFormViewModel.cs @@ -8,9 +8,9 @@ using AdaptiveCards.ObjectModel.WinUI3; using AdaptiveCards.Templating; using CommunityToolkit.Mvvm.Messaging; using ManagedCommon; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Messages; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels; +using Microsoft.CmdPal.UI.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Windows.Data.Json; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentMarkdownViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentMarkdownViewModel.cs index c747bfc231..31b98506e2 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentMarkdownViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentMarkdownViewModel.cs @@ -2,8 +2,8 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentPageViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentPageViewModel.cs index 0163868f9b..9be0209144 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentPageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentPageViewModel.cs @@ -7,12 +7,12 @@ using System.Diagnostics.CodeAnalysis; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ContentPageViewModel : PageViewModel, ICommandBarContext { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentTreeViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentTreeViewModel.cs index cafb351d21..d3c271d949 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentTreeViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentTreeViewModel.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Collections.ObjectModel; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentViewModel.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentViewModel.cs index 42a2e5c6d9..8c4a500752 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContentViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContentViewModel.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public abstract partial class ContentViewModel(WeakReference context) : ExtensionObjectViewModel(context) diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContextMenuViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContextMenuViewModel.cs similarity index 97% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContextMenuViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContextMenuViewModel.cs index 83f314a11f..582ed574d2 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ContextMenuViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ContextMenuViewModel.cs @@ -6,15 +6,15 @@ using System.Collections.ObjectModel; using System.Runtime.CompilerServices; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Text; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Text; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.System; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ContextMenuViewModel : ObservableObject, IRecipient diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsCommandsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsCommandsViewModel.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsCommandsViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsCommandsViewModel.cs index 11a67603e9..7f50cbb578 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsCommandsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsCommandsViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class DetailsCommandsViewModel( IDetailsElement _detailsElement, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsDataViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsDataViewModel.cs similarity index 68% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsDataViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsDataViewModel.cs index 9165dde656..364c0066a5 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsDataViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsDataViewModel.cs @@ -2,10 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; -using Microsoft.CommandPalette.Extensions; - -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public abstract partial class DetailsDataViewModel(IPageContext context) : ExtensionObjectViewModel(context) { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsElementViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsElementViewModel.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsElementViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsElementViewModel.cs index 9739220b65..db19843c19 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsElementViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsElementViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public abstract partial class DetailsElementViewModel(IDetailsElement _detailsElement, WeakReference context) : ExtensionObjectViewModel(context) { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsLinkViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsLinkViewModel.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsLinkViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsLinkViewModel.cs index 81fec6e363..7441b541d8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsLinkViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsLinkViewModel.cs @@ -3,11 +3,11 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.Input; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class DetailsLinkViewModel( IDetailsElement _detailsElement, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsSeparatorViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsSeparatorViewModel.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsSeparatorViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsSeparatorViewModel.cs index e4c76918c0..ea3d4867a5 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsSeparatorViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsSeparatorViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class DetailsSeparatorViewModel( IDetailsElement _detailsElement, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsTagsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsTagsViewModel.cs similarity index 92% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsTagsViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsTagsViewModel.cs index 747a0a74c9..9b8b771941 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsTagsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsTagsViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class DetailsTagsViewModel( IDetailsElement _detailsElement, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsViewModel.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsViewModel.cs index 1e8642fff7..c02dbb2edd 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/DetailsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/DetailsViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class DetailsViewModel(IDetails _details, WeakReference context) : ExtensionObjectViewModel(context) { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ExtensionObjectViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ExtensionObjectViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ExtensionObjectViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ExtensionObjectViewModel.cs index 53af586431..e16b7710b0 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ExtensionObjectViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ExtensionObjectViewModel.cs @@ -7,10 +7,10 @@ using System.Collections.Concurrent; using System.ComponentModel; using System.Runtime.CompilerServices; using CommunityToolkit.Mvvm.ComponentModel; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.Common.Helpers; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public abstract partial class ExtensionObjectViewModel : ObservableObject, IBatchUpdateTarget, IBackgroundPropertyChangedNotification { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FallbackSettingsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FallbackSettingsViewModel.cs index fbba4ce3f4..db1e8c0f14 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FallbackSettingsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FallbackSettingsViewModel.cs @@ -4,7 +4,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels; using Microsoft.CmdPal.UI.ViewModels.Messages; namespace Microsoft.CmdPal.UI.ViewModels; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FilterItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FilterItemViewModel.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FilterItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FilterItemViewModel.cs index 45ea3e8a3a..d08c3cb302 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FilterItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FilterItemViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class FilterItemViewModel : ExtensionObjectViewModel, IFilterItemViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FiltersViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FiltersViewModel.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FiltersViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FiltersViewModel.cs index ba0d828dc3..b02368efc2 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/FiltersViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/FiltersViewModel.cs @@ -2,12 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class FiltersViewModel : ExtensionObjectViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GalleryGridPropertiesViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GalleryGridPropertiesViewModel.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GalleryGridPropertiesViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GalleryGridPropertiesViewModel.cs index 85d85838ac..7039e13355 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GalleryGridPropertiesViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GalleryGridPropertiesViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public class GalleryGridPropertiesViewModel : IGridPropertiesViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GlobalLogPageContext.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GlobalLogPageContext.cs similarity index 92% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GlobalLogPageContext.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GlobalLogPageContext.cs index 228ccc5f4b..fde1a36817 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/GlobalLogPageContext.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/GlobalLogPageContext.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public class GlobalLogPageContext : IPageContext { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IBackgroundPropertyChangedNotification.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IBackgroundPropertyChangedNotification.cs similarity index 92% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IBackgroundPropertyChangedNotification.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IBackgroundPropertyChangedNotification.cs index 4db157f46d..e5112949d9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IBackgroundPropertyChangedNotification.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IBackgroundPropertyChangedNotification.cs @@ -4,7 +4,7 @@ using System.ComponentModel; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; /// /// Provides a notification mechanism for property changes that fires diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IContextItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IContextItemViewModel.cs similarity index 88% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IContextItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IContextItemViewModel.cs index a8f65b2634..ed362f0d16 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IContextItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IContextItemViewModel.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] public interface IContextItemViewModel diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IFilterItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IFilterItemViewModel.cs similarity index 83% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IFilterItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IFilterItemViewModel.cs index fb324bb42f..bb9a8b58dd 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IFilterItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IFilterItemViewModel.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public interface IFilterItemViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IGridPropertiesViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IGridPropertiesViewModel.cs similarity index 88% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IGridPropertiesViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IGridPropertiesViewModel.cs index ec14bbdde3..d869632ce1 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IGridPropertiesViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IGridPropertiesViewModel.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public interface IGridPropertiesViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IRootPageService.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IRootPageService.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IRootPageService.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IRootPageService.cs index 77eaecae4b..e54436df25 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IRootPageService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IRootPageService.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public interface IRootPageService { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconDataViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconDataViewModel.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconDataViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconDataViewModel.cs index 4044800be6..5ab0d8f271 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconDataViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconDataViewModel.cs @@ -3,12 +3,12 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.ComponentModel; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.Storage.Streams; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class IconDataViewModel : ObservableObject, IIconData { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconInfoViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconInfoViewModel.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconInfoViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconInfoViewModel.cs index aebe9b03aa..f91a359593 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/IconInfoViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/IconInfoViewModel.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.ComponentModel; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class IconInfoViewModel : ObservableObject, IIconInfo { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemType.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemType.cs similarity index 85% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemType.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemType.cs index 71e6970056..8d3aa03830 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemType.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemType.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public enum ListItemType { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs index bd3b505dc1..7b8f9c35a6 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListItemViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs @@ -3,12 +3,12 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; -using Microsoft.CmdPal.Core.ViewModels.Commands; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Commands; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ListItemViewModel : CommandItemViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListViewModel.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListViewModel.cs index d1f59e268b..6454ccdae8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ListViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListViewModel.cs @@ -3,17 +3,16 @@ // See the LICENSE file in the project root for more information. using System.Collections.ObjectModel; -using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.ViewModels.Messages; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.UI.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.Foundation; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ListViewModel : PageViewModel, IDisposable { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LoadingPageViewModel.cs similarity index 92% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LoadingPageViewModel.cs index ffd405c884..3bc1463877 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LoadingPageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LoadingPageViewModel.cs @@ -4,7 +4,7 @@ using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class LoadingPageViewModel : PageViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LogMessageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LogMessageViewModel.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LogMessageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LogMessageViewModel.cs index 969bf60aea..d1e3a80d81 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/LogMessageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/LogMessageViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class LogMessageViewModel : ExtensionObjectViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/MediumGridPropertiesViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/MediumGridPropertiesViewModel.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/MediumGridPropertiesViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/MediumGridPropertiesViewModel.cs index 2059e1547b..d1d83a5daf 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/MediumGridPropertiesViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/MediumGridPropertiesViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public class MediumGridPropertiesViewModel : IGridPropertiesViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSecondaryCommandMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSecondaryCommandMessage.cs similarity index 75% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSecondaryCommandMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSecondaryCommandMessage.cs index 1ecd7431d2..4fa0527f85 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSecondaryCommandMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSecondaryCommandMessage.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to perform a list item's secondary command when the user presses ctrl+enter in the search box /// -public record ActivateSecondaryCommandMessage -{ -} +public record ActivateSecondaryCommandMessage; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSelectedListItemMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSelectedListItemMessage.cs similarity index 74% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSelectedListItemMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSelectedListItemMessage.cs index bdd1876d4e..c37e2e0229 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ActivateSelectedListItemMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ActivateSelectedListItemMessage.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to perform a list item's command when the user presses enter in the search box /// -public record ActivateSelectedListItemMessage -{ -} +public record ActivateSelectedListItemMessage; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/BeginInvokeMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/BeginInvokeMessage.cs similarity index 80% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/BeginInvokeMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/BeginInvokeMessage.cs index 8ed180a27c..532ae57399 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/BeginInvokeMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/BeginInvokeMessage.cs @@ -2,6 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record BeginInvokeMessage; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ClearSearchMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ClearSearchMessage.cs similarity index 66% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ClearSearchMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ClearSearchMessage.cs index 47bd0e7be8..0ac8b18be2 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ClearSearchMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ClearSearchMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record ClearSearchMessage() -{ -} +public record ClearSearchMessage(); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CloseContextMenuMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CloseContextMenuMessage.cs similarity index 74% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CloseContextMenuMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CloseContextMenuMessage.cs index 5178e00631..b9bb616587 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CloseContextMenuMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CloseContextMenuMessage.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to announce that a context menu should close /// -public record CloseContextMenuMessage -{ -} +public record CloseContextMenuMessage; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CmdPalInvokeResultMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CmdPalInvokeResultMessage.cs similarity index 84% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CmdPalInvokeResultMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CmdPalInvokeResultMessage.cs index da81db6e3c..ede5e46cbb 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/CmdPalInvokeResultMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/CmdPalInvokeResultMessage.cs @@ -2,6 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record CmdPalInvokeResultMessage(Microsoft.CommandPalette.Extensions.CommandResultKind Kind); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/DismissMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/DismissMessage.cs similarity index 81% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/DismissMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/DismissMessage.cs index 8150ee6584..ecb2f32373 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/DismissMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/DismissMessage.cs @@ -2,6 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record DismissMessage(bool ForceGoHome = false); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ErrorOccurredMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ErrorOccurredMessage.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ErrorOccurredMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ErrorOccurredMessage.cs index bfd60de675..3f3e10ffa6 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ErrorOccurredMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ErrorOccurredMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Message sent when an error occurs during command execution. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ExtensionInvokedMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ExtensionInvokedMessage.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ExtensionInvokedMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ExtensionInvokedMessage.cs index a8a2ee0055..56b60b3357 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ExtensionInvokedMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ExtensionInvokedMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Message sent when an extension command or page is invoked. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/FocusSearchBoxMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/FocusSearchBoxMessage.cs similarity index 66% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/FocusSearchBoxMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/FocusSearchBoxMessage.cs index 73fad88301..64743c959f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/FocusSearchBoxMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/FocusSearchBoxMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record FocusSearchBoxMessage() -{ -} +public record FocusSearchBoxMessage(); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoBackMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoBackMessage.cs similarity index 61% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoBackMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoBackMessage.cs index 86872d6bb1..76c97f803d 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoBackMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoBackMessage.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record GoBackMessage(bool WithAnimation = true, bool FocusSearch = true) -{ - // TODO! sticking these properties here feels like leaking the UI into the models -} +// TODO! sticking these properties here feels like leaking the UI into the models +public record GoBackMessage(bool WithAnimation = true, bool FocusSearch = true); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoHomeMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoHomeMessage.cs similarity index 81% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoHomeMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoHomeMessage.cs index d99cbbdd16..c50c32ecbd 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/GoHomeMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/GoHomeMessage.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; // TODO! sticking these properties here feels like leaking the UI into the models -public record GoHomeMessage(bool WithAnimation = true, bool FocusSearch = true) -{ -} +public record GoHomeMessage(bool WithAnimation = true, bool FocusSearch = true); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HandleCommandResultMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HandleCommandResultMessage.cs similarity index 70% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HandleCommandResultMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HandleCommandResultMessage.cs index 7c60f7cb4e..0eb6fb0f98 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/HandleCommandResultMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HandleCommandResultMessage.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record HandleCommandResultMessage(ExtensionObject Result) -{ -} +public record HandleCommandResultMessage(ExtensionObject Result); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HideDetailsMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HideDetailsMessage.cs new file mode 100644 index 0000000000..accb67334c --- /dev/null +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/HideDetailsMessage.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CmdPal.UI.ViewModels.Messages; + +public record HideDetailsMessage(); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/LaunchUriMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/LaunchUriMessage.cs new file mode 100644 index 0000000000..87ac016dbb --- /dev/null +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/LaunchUriMessage.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CmdPal.UI.ViewModels.Messages; + +public record LaunchUriMessage(Uri Uri); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateBackMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateBackMessage.cs similarity index 82% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateBackMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateBackMessage.cs index e6152b75d5..bdec0559eb 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateBackMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateBackMessage.cs @@ -2,6 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record NavigateBackMessage(bool FromBackspace = false); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateLeftCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateLeftCommand.cs similarity index 86% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateLeftCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateLeftCommand.cs index d352b552cf..81efefc93e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateLeftCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateLeftCommand.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to navigate left in a grid view when pressing the Left arrow key in the SearchBox. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateNextCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateNextCommand.cs similarity index 77% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateNextCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateNextCommand.cs index 88ee239c95..d5492445d9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateNextCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateNextCommand.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Commands; +namespace Microsoft.CmdPal.UI.ViewModels.Commands; /// /// Used to navigate to the next command in the page when pressing the Down key in the SearchBox. /// -public record NavigateNextCommand -{ -} +public record NavigateNextCommand; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageDownCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageDownCommand.cs similarity index 76% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageDownCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageDownCommand.cs index 6c11394382..d87fccd12e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageDownCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageDownCommand.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to navigate down one page in the page when pressing the PageDown key in the SearchBox. /// -public record NavigatePageDownCommand -{ -} +public record NavigatePageDownCommand; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageUpCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageUpCommand.cs similarity index 76% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageUpCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageUpCommand.cs index 1985c07438..98a429cdd4 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePageUpCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePageUpCommand.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to navigate up one page in the page when pressing the PageUp key in the SearchBox. /// -public record NavigatePageUpCommand -{ -} +public record NavigatePageUpCommand; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePreviousCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePreviousCommand.cs similarity index 76% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePreviousCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePreviousCommand.cs index 4d28fce50b..830109be37 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigatePreviousCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigatePreviousCommand.cs @@ -2,11 +2,9 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to navigate to the previous command in the page when pressing the Down key in the SearchBox. /// -public record NavigatePreviousCommand -{ -} +public record NavigatePreviousCommand; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateRightCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateRightCommand.cs similarity index 86% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateRightCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateRightCommand.cs index 3cfb05913d..7acaf1bf17 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateRightCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateRightCommand.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to navigate right in a grid view when pressing the Right arrow key in the SearchBox. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateToPageMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateToPageMessage.cs similarity index 84% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateToPageMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateToPageMessage.cs index a9318a88d7..bbdb2cd106 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigateToPageMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigateToPageMessage.cs @@ -2,6 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record NavigateToPageMessage(PageViewModel Page, bool WithAnimation, CancellationToken CancellationToken); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigationDepthMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigationDepthMessage.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigationDepthMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigationDepthMessage.cs index b916f28244..b65d9213b4 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/NavigationDepthMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/NavigationDepthMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Message containing the current navigation depth (BackStack count) when navigating to a page. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/PerformCommandMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PerformCommandMessage.cs similarity index 93% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/PerformCommandMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PerformCommandMessage.cs index cd07a51beb..cffa767f92 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/PerformCommandMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/PerformCommandMessage.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to do a command - navigate to a page or invoke it diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SearchQueryMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SearchQueryMessage.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SearchQueryMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SearchQueryMessage.cs index 7516af0b34..dc89c1ff45 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SearchQueryMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SearchQueryMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Message sent when a search query is executed in the Command Palette. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SessionDurationMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SessionDurationMessage.cs similarity index 91% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SessionDurationMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SessionDurationMessage.cs index 4b77a1fd06..3331fc3e86 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/SessionDurationMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/SessionDurationMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Message containing session telemetry data from Command Palette launch to dismissal. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowConfirmationMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowConfirmationMessage.cs similarity index 73% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowConfirmationMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowConfirmationMessage.cs index fb7c5e88a8..b10fddfcda 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowConfirmationMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowConfirmationMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record ShowConfirmationMessage(Microsoft.CommandPalette.Extensions.IConfirmationArgs? Args) -{ -} +public record ShowConfirmationMessage(Microsoft.CommandPalette.Extensions.IConfirmationArgs? Args); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowDetailsMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowDetailsMessage.cs new file mode 100644 index 0000000000..47dea82eb7 --- /dev/null +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowDetailsMessage.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.CmdPal.UI.ViewModels.Messages; + +public record ShowDetailsMessage(DetailsViewModel Details); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowToastMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowToastMessage.cs similarity index 64% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowToastMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowToastMessage.cs index 869d169858..ccfac6bcf3 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowToastMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowToastMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record ShowToastMessage(string Message) -{ -} +public record ShowToastMessage(string Message); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowWindowMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowWindowMessage.cs similarity index 64% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowWindowMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowWindowMessage.cs index 01c05ff9b7..702811538d 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/ShowWindowMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/ShowWindowMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record ShowWindowMessage(IntPtr Hwnd) -{ -} +public record ShowWindowMessage(IntPtr Hwnd); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryBeginInvokeMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryBeginInvokeMessage.cs similarity index 85% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryBeginInvokeMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryBeginInvokeMessage.cs index 87a1ae8aef..fdfdb9699e 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryBeginInvokeMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryBeginInvokeMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Telemetry message sent when command invocation begins. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs index 464d5ae696..ce531cb71d 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryExtensionInvokedMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Telemetry message sent when an extension command or page is invoked. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryInvokeResultMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryInvokeResultMessage.cs similarity index 88% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryInvokeResultMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryInvokeResultMessage.cs index 06e0b4fd53..4a79e387d9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TelemetryInvokeResultMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TelemetryInvokeResultMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Telemetry message sent when command invocation completes with a result. diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TryCommandKeybindingMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TryCommandKeybindingMessage.cs similarity index 86% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TryCommandKeybindingMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TryCommandKeybindingMessage.cs index 48f7305e0a..03f06f1f6b 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/TryCommandKeybindingMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/TryCommandKeybindingMessage.cs @@ -4,7 +4,7 @@ using Windows.System; -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; public record TryCommandKeybindingMessage(bool Ctrl, bool Alt, bool Shift, bool Win, VirtualKey Key) { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateCommandBarMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateCommandBarMessage.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateCommandBarMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateCommandBarMessage.cs index ad99b25933..ab97a178fa 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateCommandBarMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateCommandBarMessage.cs @@ -3,11 +3,11 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; -using Microsoft.CmdPal.Core.Common; +using Microsoft.CmdPal.Common; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; /// /// Used to update the command bar at the bottom to reflect the commands for a list item diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateSuggestionMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateSuggestionMessage.cs similarity index 61% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateSuggestionMessage.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateSuggestionMessage.cs index 7e27056c4c..1705efebb9 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Messages/UpdateSuggestionMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Messages/UpdateSuggestionMessage.cs @@ -2,8 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Messages; +namespace Microsoft.CmdPal.UI.ViewModels.Messages; -public record UpdateSuggestionMessage(string TextToSuggest) -{ -} +public record UpdateSuggestionMessage(string TextToSuggest); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Microsoft.CmdPal.UI.ViewModels.csproj b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Microsoft.CmdPal.UI.ViewModels.csproj index 187c835e37..bd64fab4b3 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Microsoft.CmdPal.UI.ViewModels.csproj +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Microsoft.CmdPal.UI.ViewModels.csproj @@ -56,8 +56,6 @@ - - diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Models/ExtensionObject`1.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionObject`1.cs similarity index 90% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Models/ExtensionObject`1.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionObject`1.cs index c90225f344..ddad7cc21f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/Models/ExtensionObject`1.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionObject`1.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels.Models; +namespace Microsoft.CmdPal.UI.ViewModels.Models; public class ExtensionObject(T? value) // where T : IInspectable { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionService.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionService.cs index d92068c71d..f0a14ab7db 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionService.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionService.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Services; +using Microsoft.CmdPal.Common.Services; using Microsoft.CommandPalette.Extensions; using Windows.ApplicationModel; using Windows.ApplicationModel.AppExtensions; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionWrapper.cs index 8d9f8eddb5..32526c6544 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Models/ExtensionWrapper.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Services; +using Microsoft.CmdPal.Common.Services; using Microsoft.CommandPalette.Extensions; using Windows.ApplicationModel; using Windows.ApplicationModel.AppExtensions; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/NullPageViewModel.cs similarity index 89% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/NullPageViewModel.cs index e2427f811c..bc8c5ddbd8 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/NullPageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/NullPageViewModel.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; internal sealed partial class NullPageViewModel(TaskScheduler scheduler, AppExtensionHost extensionHost) : PageViewModel(null, scheduler, extensionHost, CommandProviderContext.Empty); diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/PageViewModel.cs similarity index 98% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/PageViewModel.cs index 27e3129cbb..df3090d51c 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/PageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/PageViewModel.cs @@ -5,11 +5,11 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class PageViewModel : ExtensionObjectViewModel, IPageContext { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ProgressViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProgressViewModel.cs similarity index 95% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ProgressViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProgressViewModel.cs index 4ddcfb22e7..f0d28e7089 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ProgressViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProgressViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ProgressViewModel : ExtensionObjectViewModel { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs index 31dc0f9b9c..6974a1fefd 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -473,5 +473,14 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties { return ResourceManager.GetString("fallbacks", resourceCulture); } } + + /// + /// Looks up a localized string similar to Show details. + /// + public static string ShowDetailsCommand { + get { + return ResourceManager.GetString("ShowDetailsCommand", resourceCulture); + } + } } } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx index 92a5350d53..802205c5c2 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx @@ -260,4 +260,8 @@ Fallbacks + + Show details + Name for the command that shows details of an item + \ No newline at end of file diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettingsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettingsViewModel.cs index 1a2a82fa7f..15787344ee 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettingsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ProviderSettingsViewModel.cs @@ -7,8 +7,7 @@ using System.Globalization; using System.Text; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.Common.Services; using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CmdPal.UI.ViewModels.Properties; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SeparatorViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SeparatorViewModel.cs similarity index 92% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SeparatorViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SeparatorViewModel.cs index 93fae9beff..3c6d7c5cef 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SeparatorViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SeparatorViewModel.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] public partial class SeparatorViewModel() : diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Services/DefaultCommandProviderCache.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Services/DefaultCommandProviderCache.cs index 5e8f790b12..cdf3984444 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Services/DefaultCommandProviderCache.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Services/DefaultCommandProviderCache.cs @@ -4,7 +4,7 @@ using System.Text.Json; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common.Helpers; using Microsoft.CommandPalette.Extensions.Toolkit; namespace Microsoft.CmdPal.UI.ViewModels.Services; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsExtensionsViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsExtensionsViewModel.cs index 8e14a83d19..7828c77bf1 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsExtensionsViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SettingsExtensionsViewModel.cs @@ -9,8 +9,6 @@ using System.Text; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; - -using Microsoft.CmdPal.Core.ViewModels.Messages; using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions.Toolkit; diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs similarity index 99% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs index ff64e6f6ca..19c915375f 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShellViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs @@ -6,12 +6,12 @@ using System.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.ViewModels.Messages; -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.UI.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ShellViewModel : ObservableObject, IDisposable, diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShowDetailsCommand.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShowDetailsCommand.cs similarity index 85% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShowDetailsCommand.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShowDetailsCommand.cs index 64dc436119..51fedbd4e0 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ShowDetailsCommand.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShowDetailsCommand.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CommandPalette.Extensions.Toolkit; -namespace Microsoft.CmdPal.Core.ViewModels.Commands; +namespace Microsoft.CmdPal.UI.ViewModels.Commands; public sealed partial class ShowDetailsCommand : InvokableCommand { @@ -19,7 +19,7 @@ public sealed partial class ShowDetailsCommand : InvokableCommand public ShowDetailsCommand(DetailsViewModel details) { Id = ShowDetailsCommandId; - Name = Properties.Resources.ShowDetailsCommand; + Name = UI.ViewModels.Properties.Resources.ShowDetailsCommand; Icon = IconInfo; Details = details; } diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SmallGridPropertiesViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SmallGridPropertiesViewModel.cs similarity index 87% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SmallGridPropertiesViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SmallGridPropertiesViewModel.cs index 3cc51d780e..41f9756636 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/SmallGridPropertiesViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/SmallGridPropertiesViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public class SmallGridPropertiesViewModel : IGridPropertiesViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/StatusMessageViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/StatusMessageViewModel.cs similarity index 96% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/StatusMessageViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/StatusMessageViewModel.cs index 2c78ff407e..aca1409309 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/StatusMessageViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/StatusMessageViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class StatusMessageViewModel : ExtensionObjectViewModel { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/TagViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TagViewModel.cs similarity index 94% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/TagViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TagViewModel.cs index 5287cf441c..d2384dcc77 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/TagViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TagViewModel.cs @@ -2,10 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Models; +using Microsoft.CmdPal.UI.ViewModels.Models; using Microsoft.CommandPalette.Extensions; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class TagViewModel(ITag _tag, WeakReference context) : ExtensionObjectViewModel(context) { diff --git a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ToastViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ToastViewModel.cs similarity index 74% rename from src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ToastViewModel.cs rename to src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ToastViewModel.cs index 719d7edd5d..1ee4d80342 100644 --- a/src/modules/cmdpal/Core/Microsoft.CmdPal.Core.ViewModels/ToastViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ToastViewModel.cs @@ -3,10 +3,8 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.ComponentModel; -using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.ViewModels.Messages; -namespace Microsoft.CmdPal.Core.ViewModels; +namespace Microsoft.CmdPal.UI.ViewModels; public partial class ToastViewModel : ObservableObject { diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs index 1de71f59a3..5b26bab952 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs @@ -9,9 +9,8 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Services; using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CmdPal.UI.ViewModels.Services; using Microsoft.CommandPalette.Extensions; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs index 1fa9682f33..650c62fc77 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelViewModel.cs @@ -6,10 +6,9 @@ using System.Collections.ObjectModel; using System.Diagnostics; using CommunityToolkit.Mvvm.ComponentModel; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Text; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Text; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.CmdPal.UI.ViewModels.Settings; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -424,7 +423,7 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem, IEx public PerformCommandMessage GetPerformCommandMessage() { - return new PerformCommandMessage(this.CommandViewModel.Model, new Core.ViewModels.Models.ExtensionObject(this)); + return new PerformCommandMessage(this.CommandViewModel.Model, new Models.ExtensionObject(this)); } public override string ToString() diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml.cs index 5101891e6f..ead2d4f209 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml.cs @@ -3,11 +3,10 @@ // See the LICENSE file in the project root for more information. using ManagedCommon; -using Microsoft.CmdPal.Core.Common; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.Common.Text; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.Common; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Services; +using Microsoft.CmdPal.Common.Text; using Microsoft.CmdPal.Ext.Apps; using Microsoft.CmdPal.Ext.Bookmarks; using Microsoft.CmdPal.Ext.Calc; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CommandBar.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CommandBar.xaml index c59d60f747..fc265d80bf 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CommandBar.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CommandBar.xaml @@ -6,7 +6,6 @@ xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:cmdpalUI="using:Microsoft.CmdPal.UI" xmlns:converters="using:CommunityToolkit.WinUI.Converters" - xmlns:coreViewModels="using:Microsoft.CmdPal.Core.ViewModels" xmlns:cpcontrols="using:Microsoft.CmdPal.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:help="using:Microsoft.CmdPal.UI.Helpers" @@ -114,7 +113,7 @@ ItemsSource="{x:Bind CurrentPageViewModel.StatusMessages, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}"> - + - + @@ -69,7 +68,7 @@ - + @@ -110,7 +109,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -55,7 +55,7 @@ - + - + @@ -262,7 +262,7 @@ - + - + @@ -356,7 +356,7 @@ - + - + - + - + - + diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ListPage.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ListPage.xaml.cs index a220303fcf..6389fa703d 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ListPage.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/ExtViews/ListPage.xaml.cs @@ -5,12 +5,11 @@ using System.Diagnostics; using CommunityToolkit.Mvvm.Messaging; using ManagedCommon; -using Microsoft.CmdPal.Core.ViewModels; -using Microsoft.CmdPal.Core.ViewModels.Commands; -using Microsoft.CmdPal.Core.ViewModels.Messages; using Microsoft.CmdPal.UI.Helpers; using Microsoft.CmdPal.UI.Messages; using Microsoft.CmdPal.UI.ViewModels; +using Microsoft.CmdPal.UI.ViewModels.Commands; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.Extensions.DependencyInjection; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/AdaptiveCache`2.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/AdaptiveCache`2.cs index 847fd7a9cb..9cdf410872 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/AdaptiveCache`2.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/AdaptiveCache`2.cs @@ -5,7 +5,7 @@ using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using Microsoft.CmdPal.Core.Common.Helpers; +using Microsoft.CmdPal.Common.Helpers; namespace Microsoft.CmdPal.UI.Helpers; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs index 12454d16c3..149512ec1d 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/GlobalErrorHandler.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.Common.Services.Reports; +using Microsoft.CmdPal.Common.Services; +using Microsoft.CmdPal.Common.Services.Reports; using Windows.Win32; using Windows.Win32.Foundation; using Windows.Win32.UI.WindowsAndMessaging; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/CachedIconSourceProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/CachedIconSourceProvider.cs index 589e40d10f..67c7d97526 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/CachedIconSourceProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/CachedIconSourceProvider.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.UI.Xaml.Controls; using Windows.Foundation; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IIconSourceProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IIconSourceProvider.cs index 1d3f3fc646..5eaf68c65c 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IIconSourceProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IIconSourceProvider.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.UI.Xaml.Controls; namespace Microsoft.CmdPal.UI.Helpers; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconCacheProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconCacheProvider.cs index 40de39b5ab..8d5d4ef13f 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconCacheProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconCacheProvider.cs @@ -2,8 +2,8 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; using Microsoft.CmdPal.UI.Controls; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.CmdPal.UI.Helpers; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconSourceProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconSourceProvider.cs index 13c6ed764a..79c4166716 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconSourceProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconSourceProvider.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.UI.Xaml.Controls; using Windows.Foundation; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/TelemetryForwarder.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/TelemetryForwarder.cs index 37139bb982..ba2803049d 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/TelemetryForwarder.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/TelemetryForwarder.cs @@ -3,10 +3,9 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Mvvm.Messaging; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.Common.Services; using Microsoft.CmdPal.UI.Events; -using Microsoft.CommandPalette.Extensions; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.PowerToys.Telemetry; namespace Microsoft.CmdPal.UI; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/LogWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/LogWrapper.cs index 89dcce3983..5ec4335e13 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/LogWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/LogWrapper.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using ManagedCommon; -using Microsoft.CmdPal.Core.Common; +using Microsoft.CmdPal.Common; namespace Microsoft.CmdPal.UI; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs index 2a63d5a2aa..ed1937a8a8 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/MainWindow.xaml.cs @@ -7,9 +7,8 @@ using System.Runtime.InteropServices; using CmdPalKeyboardService; using CommunityToolkit.Mvvm.Messaging; using ManagedCommon; -using Microsoft.CmdPal.Core.Common.Helpers; -using Microsoft.CmdPal.Core.Common.Services; -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Services; using Microsoft.CmdPal.Ext.ClipboardHistory.Messages; using Microsoft.CmdPal.UI.Controls; using Microsoft.CmdPal.UI.Events; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Messages/OpenContextMenuMessage.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Messages/OpenContextMenuMessage.cs index 01a8a93125..a2a97a9a39 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Messages/OpenContextMenuMessage.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Messages/OpenContextMenuMessage.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels.Messages; +using Microsoft.CmdPal.UI.ViewModels.Messages; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls.Primitives; using Windows.Foundation; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj index 292c5a4e3d..acc9b5dbfb 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj @@ -132,7 +132,6 @@ - diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/LoadingPage.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/LoadingPage.xaml.cs index 7422efdbce..4e2bc1f38d 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/LoadingPage.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/LoadingPage.xaml.cs @@ -2,7 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.CmdPal.Core.ViewModels; +using Microsoft.CmdPal.UI.ViewModels; using Microsoft.UI.Dispatching; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml index 18bc15298d..91dbd1f820 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Pages/ShellPage.xaml @@ -6,7 +6,6 @@ xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:cmdpalUI="using:Microsoft.CmdPal.UI" xmlns:converters="using:CommunityToolkit.WinUI.Converters" - xmlns:coreViewModels="using:Microsoft.CmdPal.Core.ViewModels" xmlns:cpcontrols="using:Microsoft.CmdPal.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:h="using:Microsoft.CmdPal.UI.Helpers" @@ -16,6 +15,7 @@ xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls" xmlns:toolkit="using:CommunityToolkit.WinUI.Controls" xmlns:ui="using:CommunityToolkit.WinUI" + xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels" Background="Transparent" mc:Ignorable="d"> @@ -66,7 +66,7 @@ - + - +