diff --git a/.gitignore b/.gitignore
index 89541c3a2e..66532cc074 100644
--- a/.gitignore
+++ b/.gitignore
@@ -224,7 +224,7 @@ ClientBin/
*.publishsettings
orleans.codegen.cs
-# Including strong name files can present a security risk
+# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
@@ -322,7 +322,7 @@ ImageResizer/tools/**
# OpenCover UI analysis results
OpenCover/
-# Azure Stream Analytics local run output
+# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
@@ -331,7 +331,7 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser
-# MFractors (Xamarin productivity tool) working folder
+# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Temp build files
diff --git a/src/modules/cmdpal/.gitignore b/src/modules/cmdpal/.gitignore
index 5bb04dd16c..062f40d6fd 100644
--- a/src/modules/cmdpal/.gitignore
+++ b/src/modules/cmdpal/.gitignore
@@ -1,398 +1,5 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.tlog
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# Visual Studio History (VSHistory) files
-.vshistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msixbundle
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
\ No newline at end of file
+# Allow launchSettings.json in the Properties folder to be committed to source
+# control. This overrides the one in the root .gitignore, because all the cmdpal
+# projects will explode without this file
+!**/Properties/launchSettings.json
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/CommentAction.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/CommentAction.cs
similarity index 88%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/CommentAction.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/CommentAction.cs
index 6f0b19267d..77a0d89f1c 100644
--- a/src/modules/cmdpal/extensions/HackerNewsExtension/CommentAction.cs
+++ b/src/modules/cmdpal/Exts/HackerNewsExtension/CommentAction.cs
@@ -18,9 +18,9 @@ internal sealed class CommentAction : InvokableCommand
Icon = new("\ue8f2"); // chat bubbles
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
Process.Start(new ProcessStartInfo(_post.CommentsLink) { UseShellExecute = true });
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsActionsProvider.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsActionsProvider.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsActionsProvider.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsActionsProvider.cs
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsExtension.csproj b/src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsExtension.csproj
rename to src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsExtension.csproj
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsPage.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsPage.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/HackerNewsPage.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/HackerNewsPage.cs
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/LinkAction.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/LinkAction.cs
similarity index 88%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/LinkAction.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/LinkAction.cs
index 6d3c1a9a35..bb64321122 100644
--- a/src/modules/cmdpal/extensions/HackerNewsExtension/LinkAction.cs
+++ b/src/modules/cmdpal/Exts/HackerNewsExtension/LinkAction.cs
@@ -18,9 +18,9 @@ internal sealed class LinkAction : InvokableCommand
this.Icon = new("\uE8A7");
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
Process.Start(new ProcessStartInfo(_post.Link) { UseShellExecute = true });
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/NewsPost.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/NewsPost.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/NewsPost.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/NewsPost.cs
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/HackerNewsExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Program.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Program.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Program.cs
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/HackerNewsExtension/Properties/PublishProfiles/win-arm64.pubxml
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Properties/PublishProfiles/win-arm64.pubxml
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Properties/PublishProfiles/win-arm64.pubxml
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml
index d7548ab0a8..2c790532c6 100644
--- a/src/modules/cmdpal/extensions/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/modules/cmdpal/Exts/HackerNewsExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/Properties/launchSettings.json b/src/modules/cmdpal/Exts/HackerNewsExtension/Properties/launchSettings.json
similarity index 98%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/HackerNewsExtension/Properties/launchSettings.json
index 2df74d9a89..200e182015 100644
--- a/src/modules/cmdpal/extensions/HackerNewsExtension/Properties/launchSettings.json
+++ b/src/modules/cmdpal/Exts/HackerNewsExtension/Properties/launchSettings.json
@@ -7,4 +7,4 @@
"commandName": "Project"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/HackerNewsExtension/SampleExtension.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/HackerNewsExtension/SampleExtension.cs
diff --git a/src/modules/cmdpal/extensions/HackerNewsExtension/app.manifest b/src/modules/cmdpal/Exts/HackerNewsExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/HackerNewsExtension/app.manifest
rename to src/modules/cmdpal/Exts/HackerNewsExtension/app.manifest
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/MastodonExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MastodonExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/MastodonExtension.csproj b/src/modules/cmdpal/Exts/MastodonExtension/MastodonExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/MastodonExtension.csproj
rename to src/modules/cmdpal/Exts/MastodonExtension/MastodonExtension.csproj
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/MastodonExtensionPage.cs b/src/modules/cmdpal/Exts/MastodonExtension/MastodonExtensionPage.cs
similarity index 94%
rename from src/modules/cmdpal/extensions/MastodonExtension/MastodonExtensionPage.cs
rename to src/modules/cmdpal/Exts/MastodonExtension/MastodonExtensionPage.cs
index 226683206a..5589cfb221 100644
--- a/src/modules/cmdpal/extensions/MastodonExtension/MastodonExtensionPage.cs
+++ b/src/modules/cmdpal/Exts/MastodonExtension/MastodonExtensionPage.cs
@@ -23,7 +23,7 @@ internal sealed class MastodonExtensionPage : ListPage
new ListSection()
{
Items = [
- new ListItem(new NoOpAction()) { Title = "TODO: Implement your extension here" }
+ new ListItem(new NoOpCommand()) { Title = "TODO: Implement your extension here" }
],
}
];
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/MastodonExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/MastodonExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/Program.cs b/src/modules/cmdpal/Exts/MastodonExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/Program.cs
rename to src/modules/cmdpal/Exts/MastodonExtension/Program.cs
diff --git a/src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-arm64.pubxml
new file mode 100644
index 0000000000..e7a6a3728c
--- /dev/null
+++ b/src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-arm64.pubxml
@@ -0,0 +1,18 @@
+
+
+
+
+ FileSystem
+ ARM64
+ win-arm64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+ False
+ False
+
+
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-x64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml
rename to src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-x64.pubxml
index d7548ab0a8..2c790532c6 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/modules/cmdpal/Exts/MastodonExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Properties/launchSettings.json b/src/modules/cmdpal/Exts/MastodonExtension/Properties/launchSettings.json
similarity index 56%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/MastodonExtension/Properties/launchSettings.json
index 937307cebe..9520129ecb 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Properties/launchSettings.json
+++ b/src/modules/cmdpal/Exts/MastodonExtension/Properties/launchSettings.json
@@ -1,10 +1,10 @@
{
"profiles": {
- "PT Run v2 (Package)": {
+ "MastodonExtension (Package)": {
"commandName": "MsixPackage"
},
- "PT Run v2 (Unpackaged)": {
+ "MastodonExtension (Unpackaged)": {
"commandName": "Project"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/MastodonExtension/SampleExtension.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/MastodonExtension/SampleExtension.cs
diff --git a/src/modules/cmdpal/extensions/MastodonExtension/app.manifest b/src/modules/cmdpal/Exts/MastodonExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/MastodonExtension/app.manifest
rename to src/modules/cmdpal/Exts/MastodonExtension/app.manifest
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/MediaActionsProvider.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/MediaActionsProvider.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/MediaActionsProvider.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/MediaActionsProvider.cs
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/MediaControlsExtension.csproj b/src/modules/cmdpal/Exts/MediaControlsExtension/MediaControlsExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/MediaControlsExtension.csproj
rename to src/modules/cmdpal/Exts/MediaControlsExtension/MediaControlsExtension.csproj
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/MediaListItem.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/MediaListItem.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/MediaListItem.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/MediaListItem.cs
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/MediaControlsExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/PrevNextTrackAction.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/PrevNextTrackAction.cs
similarity index 96%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/PrevNextTrackAction.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/PrevNextTrackAction.cs
index 1f259f2b35..51c0f94c7f 100644
--- a/src/modules/cmdpal/extensions/MediaControlsExtension/PrevNextTrackAction.cs
+++ b/src/modules/cmdpal/Exts/MediaControlsExtension/PrevNextTrackAction.cs
@@ -41,6 +41,6 @@ internal sealed class PrevNextTrackAction : InvokableCommand
_ = _mediaSession.TrySkipNextAsync();
}
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Program.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Program.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Program.cs
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml
index ccd091e1b4..cea430ad55 100644
--- a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml
+++ b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml
index d7548ab0a8..2c790532c6 100644
--- a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/launchSettings.json b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/launchSettings.json
similarity index 98%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/MediaControlsExtension/Properties/launchSettings.json
index d397a4b5e7..0f70c2867f 100644
--- a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/launchSettings.json
+++ b/src/modules/cmdpal/Exts/MediaControlsExtension/Properties/launchSettings.json
@@ -7,4 +7,4 @@
"commandName": "Project"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/SampleExtension.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/SampleExtension.cs
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/TogglePlayMediaAction.cs b/src/modules/cmdpal/Exts/MediaControlsExtension/TogglePlayMediaAction.cs
similarity index 89%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/TogglePlayMediaAction.cs
rename to src/modules/cmdpal/Exts/MediaControlsExtension/TogglePlayMediaAction.cs
index 151c7c8666..21d297e99d 100644
--- a/src/modules/cmdpal/extensions/MediaControlsExtension/TogglePlayMediaAction.cs
+++ b/src/modules/cmdpal/Exts/MediaControlsExtension/TogglePlayMediaAction.cs
@@ -17,13 +17,13 @@ public sealed class TogglePlayMediaAction : InvokableCommand
Icon = new(string.Empty);
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
if (MediaSession != null)
{
_ = MediaSession.TryTogglePlayPauseAsync();
}
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/app.manifest b/src/modules/cmdpal/Exts/MediaControlsExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/app.manifest
rename to src/modules/cmdpal/Exts/MediaControlsExtension/app.manifest
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs
similarity index 93%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs
index 9afe223761..268b0cd3ba 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkForm.cs
@@ -58,12 +58,12 @@ internal sealed class AddBookmarkForm : Form
public override string StateJson() => throw new NotImplementedException();
- public override ActionResult SubmitForm(string payload)
+ public override CommandResult SubmitForm(string payload)
{
var formInput = JsonNode.Parse(payload);
if (formInput == null)
{
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
// get the name and url out of the values
@@ -100,7 +100,7 @@ internal sealed class AddBookmarkForm : Form
};
// Construct a new json blob with the name and url
- var jsonPath = BookmarksActionProvider.StateJsonPath();
+ var jsonPath = BookmarksCommandProvider.StateJsonPath();
var data = Bookmarks.ReadFromFile(jsonPath);
data.Data.Add(formData);
@@ -108,6 +108,6 @@ internal sealed class AddBookmarkForm : Form
Bookmarks.WriteToFile(jsonPath, data);
AddedAction?.Invoke(this, null);
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkPage.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkPage.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkPage.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/AddBookmarkPage.cs
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkData.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkData.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkData.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkData.cs
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkDataContext.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkDataContext.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkDataContext.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkDataContext.cs
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs
similarity index 95%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs
index 95aeec01b8..7b493ba8d8 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderForm.cs
@@ -71,7 +71,7 @@ internal sealed class BookmarkPlaceholderForm : Form
public override string StateJson() => throw new NotImplementedException();
- public override ActionResult SubmitForm(string payload)
+ public override CommandResult SubmitForm(string payload)
{
var target = _bookmark;
@@ -80,7 +80,7 @@ internal sealed class BookmarkPlaceholderForm : Form
var formObject = formInput?.AsObject();
if (formObject == null)
{
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
foreach (var (key, value) in formObject)
@@ -107,6 +107,6 @@ internal sealed class BookmarkPlaceholderForm : Form
System.Diagnostics.Debug.WriteLine($"Error launching URL: {ex.Message}");
}
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderPage.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderPage.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderPage.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarkPlaceholderPage.cs
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs
similarity index 93%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs
index 8cf57b244e..7c3a1dd1e0 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Bookmarks.cs
@@ -39,6 +39,6 @@ public sealed class Bookmarks
{
var jsonString = JsonSerializer.Serialize(data, _jsonOptions);
- File.WriteAllText(BookmarksActionProvider.StateJsonPath(), jsonString);
+ File.WriteAllText(BookmarksCommandProvider.StateJsonPath(), jsonString);
}
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksActionProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksCommandProvider.cs
similarity index 97%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksActionProvider.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksCommandProvider.cs
index 6d7ea7870d..58a73973ac 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksActionProvider.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/BookmarksCommandProvider.cs
@@ -11,7 +11,7 @@ using Microsoft.CmdPal.Extensions.Helpers;
namespace Microsoft.CmdPal.Ext.Bookmarks;
-public class BookmarksActionProvider : ICommandProvider
+public class BookmarksCommandProvider : ICommandProvider
{
public string DisplayName => $"Bookmarks";
@@ -20,7 +20,7 @@ public class BookmarksActionProvider : ICommandProvider
private readonly List _commands = [];
private readonly AddBookmarkPage _addNewCommand = new();
- public BookmarksActionProvider()
+ public BookmarksCommandProvider()
{
_addNewCommand.AddedAction += AddNewCommand_AddedAction;
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj
similarity index 51%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj
index 4ed0f6179e..c044209825 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/Microsoft.CmdPal.Ext.Bookmarks.csproj
@@ -1,10 +1,10 @@
-
+
Microsoft.CmdPal.Ext.Bookmarks
enable
-
+
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs
similarity index 96%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs
index 4bc8d4ef71..7c95ae99c0 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/OpenInTerminalAction.cs
@@ -36,6 +36,6 @@ internal sealed class OpenInTerminalAction : InvokableCommand
System.Diagnostics.Debug.WriteLine($"Error launching Windows Terminal: {ex.Message}");
}
- return ActionResult.Dismiss();
+ return CommandResult.Dismiss();
}
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/SourceGenerationContext.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/SourceGenerationContext.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/SourceGenerationContext.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/SourceGenerationContext.cs
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs
similarity index 96%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs
index 1c08e739f6..1e051f8957 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Bookmark/UrlAction.cs
@@ -27,7 +27,7 @@ public class UrlAction : InvokableCommand
Url = url;
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
var target = _url;
try
@@ -47,7 +47,7 @@ public class UrlAction : InvokableCommand
System.Diagnostics.Debug.WriteLine($"Error launching URL: {ex.Message}");
}
- return ActionResult.Dismiss();
+ return CommandResult.Dismiss();
}
internal static Uri? GetUri(string url)
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs
similarity index 78%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs
index 89e3389cf1..3fa5014073 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorAction.cs
@@ -4,6 +4,7 @@
using Microsoft.CmdPal.Extensions;
using Microsoft.CmdPal.Extensions.Helpers;
+using Windows.ApplicationModel.DataTransfer;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
@@ -23,10 +24,14 @@ public class CalculatorAction : InvokableCommand
{
if (_success)
{
- ClipboardHelper.SetText(_result);
+ var dataPackage = new DataPackage();
+ dataPackage.SetText(_result);
+ Clipboard.SetContent(dataPackage);
+
+ // ClipboardHelper.SetText(_result);
}
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
internal void SetResult(string result, bool success)
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorActionProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorCommandProvider.cs
similarity index 90%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorActionProvider.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorCommandProvider.cs
index d44bace9ea..e08ec34a18 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorActionProvider.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorCommandProvider.cs
@@ -9,13 +9,13 @@ using Microsoft.CmdPal.Extensions;
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace Microsoft.CmdPal.Ext.Calc;
-public class CalculatorActionProvider : ICommandProvider
+public class CalculatorCommandProvider : ICommandProvider
{
public string DisplayName => $"Calculator";
private readonly CalculatorTopLevelListItem calculatorCommand = new();
- public CalculatorActionProvider()
+ public CalculatorCommandProvider()
{
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorTopLevelListItem.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorTopLevelListItem.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorTopLevelListItem.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/CalculatorTopLevelListItem.cs
diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/Microsoft.CmdPal.Ext.Calc.csproj b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/Microsoft.CmdPal.Ext.Calc.csproj
new file mode 100644
index 0000000000..2d3cba680e
--- /dev/null
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Calc/Microsoft.CmdPal.Ext.Calc.csproj
@@ -0,0 +1,9 @@
+
+
+
+ Microsoft.CmdPal.Ext.Calc
+
+
+
+
+
diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/Microsoft.CmdPal.Ext.Settings.csproj b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/Microsoft.CmdPal.Ext.Settings.csproj
new file mode 100644
index 0000000000..8784bd413d
--- /dev/null
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/Microsoft.CmdPal.Ext.Settings.csproj
@@ -0,0 +1,9 @@
+
+
+
+ Microsoft.CmdPal.Ext.Settings
+
+
+
+
+
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsActionProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsCommandProvider.cs
similarity index 90%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsActionProvider.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsCommandProvider.cs
index 18e8127cc3..ff63928b92 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsActionProvider.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsCommandProvider.cs
@@ -8,13 +8,13 @@ using Microsoft.CmdPal.Extensions.Helpers;
namespace Microsoft.CmdPal.Ext.Settings;
-public class SettingsActionProvider : ICommandProvider
+public class SettingsCommandProvider : ICommandProvider
{
public string DisplayName => $"Settings";
private readonly SettingsPage settingsPage = new();
- public SettingsActionProvider()
+ public SettingsCommandProvider()
{
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs
similarity index 93%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs
index 72ea6096df..724ef89004 100644
--- a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs
+++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsForm.cs
@@ -77,15 +77,15 @@ internal sealed class SettingsForm : Form
public override string StateJson() => throw new NotImplementedException();
- public override ActionResult SubmitForm(string payload)
+ public override CommandResult SubmitForm(string payload)
{
var formInput = JsonNode.Parse(payload)?.AsObject();
if (formInput == null)
{
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
// Application.Current.GetService().SaveSettingAsync("GlobalHotkey", formInput["hotkey"]?.ToString() ?? string.Empty);
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsPage.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsPage.cs
similarity index 100%
rename from src/modules/cmdpal/src/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsPage.cs
rename to src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.CmdPalSettings/SettingsPage.cs
diff --git a/src/modules/cmdpal/extensions/NewExtension.ps1 b/src/modules/cmdpal/Exts/NewExtension.ps1
similarity index 100%
rename from src/modules/cmdpal/extensions/NewExtension.ps1
rename to src/modules/cmdpal/Exts/NewExtension.ps1
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessItem.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessItem.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessItem.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessItem.cs
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessListPage.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessListPage.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessListPage.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessListPage.cs
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessMonitorActionProvider.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessMonitorCommandProvider.cs
similarity index 91%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessMonitorActionProvider.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessMonitorCommandProvider.cs
index 4df8272ed3..33b24c2027 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessMonitorActionProvider.cs
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessMonitorCommandProvider.cs
@@ -7,7 +7,7 @@ using Microsoft.CmdPal.Extensions.Helpers;
namespace ProcessMonitorExtension;
-internal sealed class ProcessMonitorActionProvider : ICommandProvider
+internal sealed class ProcessMonitorCommandProvider : ICommandProvider
{
public string DisplayName => "Process Monitor Commands";
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessMonitorExtension.csproj b/src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessMonitorExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/ProcessMonitorExtension.csproj
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/ProcessMonitorExtension.csproj
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Program.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Program.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Program.cs
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml
index ccd091e1b4..cea430ad55 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-arm64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml
index d7548ab0a8..2c790532c6 100644
--- a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/launchSettings.json b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/launchSettings.json
similarity index 98%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/launchSettings.json
index 31adf00d01..7adb50094c 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/Properties/launchSettings.json
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/Properties/launchSettings.json
@@ -7,4 +7,4 @@
"commandName": "Project"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/SampleExtension.cs
similarity index 94%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/SampleExtension.cs
index dd52b79d8e..11c16104cf 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/SampleExtension.cs
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/SampleExtension.cs
@@ -26,7 +26,7 @@ public sealed class SampleExtension : IExtension
switch (providerType)
{
case ProviderType.Commands:
- return new ProcessMonitorActionProvider();
+ return new ProcessMonitorCommandProvider();
default:
return null;
}
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/SwitchToProcess.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/SwitchToProcess.cs
similarity index 90%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/SwitchToProcess.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/SwitchToProcess.cs
index 3d9e5671e2..cadb411363 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/SwitchToProcess.cs
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/SwitchToProcess.cs
@@ -22,9 +22,9 @@ internal sealed class SwitchToProcess : InvokableCommand
this.Name = "Switch to";
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
SwitchToThisWindow(process.Process.MainWindowHandle, true);
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/TerminateProcess.cs b/src/modules/cmdpal/Exts/ProcessMonitorExtension/TerminateProcess.cs
similarity index 88%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/TerminateProcess.cs
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/TerminateProcess.cs
index 2ad8e9836c..438784373e 100644
--- a/src/modules/cmdpal/extensions/ProcessMonitorExtension/TerminateProcess.cs
+++ b/src/modules/cmdpal/Exts/ProcessMonitorExtension/TerminateProcess.cs
@@ -18,10 +18,10 @@ internal sealed class TerminateProcess : InvokableCommand
Name = "End task";
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
var process = Process.GetProcessById(_process.ProcessId);
process.Kill();
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/ProcessMonitorExtension/app.manifest b/src/modules/cmdpal/Exts/ProcessMonitorExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/ProcessMonitorExtension/app.manifest
rename to src/modules/cmdpal/Exts/ProcessMonitorExtension/app.manifest
diff --git a/src/modules/cmdpal/extensions/SampleExtension.sln b/src/modules/cmdpal/Exts/SampleExtension.sln
similarity index 100%
rename from src/modules/cmdpal/extensions/SampleExtension.sln
rename to src/modules/cmdpal/Exts/SampleExtension.sln
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/SpongebotExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/SpongebotExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/CopyTextAction.cs b/src/modules/cmdpal/Exts/SpongebotExtension/CopyTextAction.cs
similarity index 69%
rename from src/modules/cmdpal/extensions/SpongebotExtension/CopyTextAction.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/CopyTextAction.cs
index eb4447f8cd..e76475292f 100644
--- a/src/modules/cmdpal/extensions/SpongebotExtension/CopyTextAction.cs
+++ b/src/modules/cmdpal/Exts/SpongebotExtension/CopyTextAction.cs
@@ -4,6 +4,7 @@
using Microsoft.CmdPal.Extensions;
using Microsoft.CmdPal.Extensions.Helpers;
+using Windows.ApplicationModel.DataTransfer;
namespace SpongebotExtension;
@@ -20,7 +21,11 @@ public class CopyTextAction : InvokableCommand
public override ICommandResult Invoke()
{
- ClipboardHelper.SetText(Text);
- return ActionResult.KeepOpen();
+ var dataPackage = new DataPackage();
+ dataPackage.SetText(Text);
+ Clipboard.SetContent(dataPackage);
+
+ // ClipboardHelper.SetText(Text);
+ return CommandResult.KeepOpen();
}
}
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/SpongebotExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/SpongebotExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Program.cs b/src/modules/cmdpal/Exts/SpongebotExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Program.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/Program.cs
diff --git a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml
rename to src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml
index ccd091e1b4..cea430ad55 100644
--- a/src/modules/cmdpal/extensions/MediaControlsExtension/Properties/PublishProfiles/win-arm64.pubxml
+++ b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-arm64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml
new file mode 100644
index 0000000000..2c790532c6
--- /dev/null
+++ b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -0,0 +1,18 @@
+
+
+
+
+ FileSystem
+ x64
+ win-x64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+ False
+ False
+
+
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/launchSettings.json b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/launchSettings.json
similarity index 98%
rename from src/modules/cmdpal/extensions/SpongebotExtension/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/SpongebotExtension/Properties/launchSettings.json
index e6c43e9ec8..9c5e235100 100644
--- a/src/modules/cmdpal/extensions/SpongebotExtension/Properties/launchSettings.json
+++ b/src/modules/cmdpal/Exts/SpongebotExtension/Properties/launchSettings.json
@@ -7,4 +7,4 @@
"commandName": "Project"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SampleExtension.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/SampleExtension.cs
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SpongeSettingsForm.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs
similarity index 92%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SpongeSettingsForm.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs
index 89319bd952..4db6ef22d1 100644
--- a/src/modules/cmdpal/extensions/SpongebotExtension/SpongeSettingsForm.cs
+++ b/src/modules/cmdpal/Exts/SpongebotExtension/SpongeSettingsForm.cs
@@ -56,12 +56,12 @@ internal sealed class SpongeSettingsForm : Form
public override string StateJson() => throw new NotImplementedException();
- public override ActionResult SubmitForm(string payload)
+ public override CommandResult SubmitForm(string payload)
{
var formInput = JsonNode.Parse(payload);
if (formInput == null)
{
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
// get the name and url out of the values
@@ -77,6 +77,6 @@ internal sealed class SpongeSettingsForm : Form
""";
File.WriteAllText(SpongebotPage.StateJsonPath(), json);
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SpongebotCommandsProvider.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SpongebotCommandsProvider.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SpongebotCommandsProvider.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/SpongebotCommandsProvider.cs
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SpongebotExtension.csproj b/src/modules/cmdpal/Exts/SpongebotExtension/SpongebotExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SpongebotExtension.csproj
rename to src/modules/cmdpal/Exts/SpongebotExtension/SpongebotExtension.csproj
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SpongebotPage.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SpongebotPage.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SpongebotPage.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/SpongebotPage.cs
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/SpongebotSettingsPage.cs b/src/modules/cmdpal/Exts/SpongebotExtension/SpongebotSettingsPage.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/SpongebotSettingsPage.cs
rename to src/modules/cmdpal/Exts/SpongebotExtension/SpongebotSettingsPage.cs
diff --git a/src/modules/cmdpal/extensions/SpongebotExtension/app.manifest b/src/modules/cmdpal/Exts/SpongebotExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/SpongebotExtension/app.manifest
rename to src/modules/cmdpal/Exts/SpongebotExtension/app.manifest
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/StoreLogo.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/StoreLogo.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/StoreLogo.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/StoreLogo.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/Exts/TemplateExtension/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/Exts/TemplateExtension/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Package.appxmanifest b/src/modules/cmdpal/Exts/TemplateExtension/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Package.appxmanifest
rename to src/modules/cmdpal/Exts/TemplateExtension/Package.appxmanifest
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Program.cs b/src/modules/cmdpal/Exts/TemplateExtension/Program.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Program.cs
rename to src/modules/cmdpal/Exts/TemplateExtension/Program.cs
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml b/src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml
similarity index 89%
rename from src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml
rename to src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml
index ccd091e1b4..cea430ad55 100644
--- a/src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml
+++ b/src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-arm64.pubxml
@@ -13,6 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-x64.pubxml b/src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-x64.pubxml
new file mode 100644
index 0000000000..2c790532c6
--- /dev/null
+++ b/src/modules/cmdpal/Exts/TemplateExtension/Properties/PublishProfiles/win-x64.pubxml
@@ -0,0 +1,18 @@
+
+
+
+
+ FileSystem
+ x64
+ win-x64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ False
+ False
+ True
+ False
+ False
+
+
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Properties/launchSettings.json b/src/modules/cmdpal/Exts/TemplateExtension/Properties/launchSettings.json
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/Properties/launchSettings.json
rename to src/modules/cmdpal/Exts/TemplateExtension/Properties/launchSettings.json
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/SampleExtension.cs b/src/modules/cmdpal/Exts/TemplateExtension/SampleExtension.cs
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/SampleExtension.cs
rename to src/modules/cmdpal/Exts/TemplateExtension/SampleExtension.cs
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/TemplateExtension.csproj b/src/modules/cmdpal/Exts/TemplateExtension/TemplateExtension.csproj
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/TemplateExtension.csproj
rename to src/modules/cmdpal/Exts/TemplateExtension/TemplateExtension.csproj
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/TemplateExtensionPage.cs b/src/modules/cmdpal/Exts/TemplateExtension/TemplateExtensionPage.cs
similarity index 94%
rename from src/modules/cmdpal/extensions/TemplateExtension/TemplateExtensionPage.cs
rename to src/modules/cmdpal/Exts/TemplateExtension/TemplateExtensionPage.cs
index 7af04d49ba..fd19fc6987 100644
--- a/src/modules/cmdpal/extensions/TemplateExtension/TemplateExtensionPage.cs
+++ b/src/modules/cmdpal/Exts/TemplateExtension/TemplateExtensionPage.cs
@@ -23,7 +23,7 @@ internal sealed class TemplateExtensionPage : ListPage
new ListSection()
{
Items = [
- new ListItem(new NoOpAction()) { Title = "TODO: Implement your extension here" }
+ new ListItem(new NoOpCommand()) { Title = "TODO: Implement your extension here" }
],
}
];
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/app.manifest b/src/modules/cmdpal/Exts/TemplateExtension/app.manifest
similarity index 100%
rename from src/modules/cmdpal/extensions/TemplateExtension/app.manifest
rename to src/modules/cmdpal/Exts/TemplateExtension/app.manifest
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/IFileService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Contracts/IFileService.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/IFileService.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Contracts/IFileService.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/Json.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/Json.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/Json.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/Json.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
similarity index 77%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
index 85e1c9bae7..d82d1a5342 100644
--- a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
+++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
@@ -1,5 +1,5 @@
-
+
Microsoft.CmdPal.Common
enable
@@ -18,7 +18,7 @@
-
+
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/NativeMethods.txt b/src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.txt
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/NativeMethods.txt
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/NativeMethods.txt
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/FileService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/FileService.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/FileService.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/FileService.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IApp.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IApp.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IApp.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IApp.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IExtensionService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionService.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IExtensionService.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionService.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/IExtensionWrapper.cs
diff --git a/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs b/src/modules/cmdpal/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs
rename to src/modules/cmdpal/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.cpp b/src/modules/cmdpal/Microsoft.Terminal.UI/Converters.cpp
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.cpp
rename to src/modules/cmdpal/Microsoft.Terminal.UI/Converters.cpp
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.h b/src/modules/cmdpal/Microsoft.Terminal.UI/Converters.h
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.h
rename to src/modules/cmdpal/Microsoft.Terminal.UI/Converters.h
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.idl b/src/modules/cmdpal/Microsoft.Terminal.UI/Converters.idl
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/Converters.idl
rename to src/modules/cmdpal/Microsoft.Terminal.UI/Converters.idl
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/IDirectKeyListener.idl b/src/modules/cmdpal/Microsoft.Terminal.UI/IDirectKeyListener.idl
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/IDirectKeyListener.idl
rename to src/modules/cmdpal/Microsoft.Terminal.UI/IDirectKeyListener.idl
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.cpp b/src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.cpp
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.cpp
rename to src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.cpp
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.h b/src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.h
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.h
rename to src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.h
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.idl b/src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.idl
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/IconPathConverter.idl
rename to src/modules/cmdpal/Microsoft.Terminal.UI/IconPathConverter.idl
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Microsoft.Terminal.UI.def b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.def
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/Microsoft.Terminal.UI.def
rename to src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.def
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
similarity index 69%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
rename to src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
index 9717bcc55b..efceefbf82 100644
--- a/src/modules/cmdpal/src/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
+++ b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
@@ -1,8 +1,12 @@
-
-
-
+
+ ..\..\..\..\
+ $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.5.240428000
+ $(PathToRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5
+
+
+
true
true
@@ -182,22 +186,19 @@
-
-
-
-
+
+
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.cpp b/src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.cpp
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.cpp
rename to src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.cpp
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.h b/src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.h
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.h
rename to src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.h
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.idl b/src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.idl
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/ResourceString.idl
rename to src/modules/cmdpal/Microsoft.Terminal.UI/ResourceString.idl
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/init.cpp b/src/modules/cmdpal/Microsoft.Terminal.UI/init.cpp
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/init.cpp
rename to src/modules/cmdpal/Microsoft.Terminal.UI/init.cpp
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/packages.config b/src/modules/cmdpal/Microsoft.Terminal.UI/packages.config
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/packages.config
rename to src/modules/cmdpal/Microsoft.Terminal.UI/packages.config
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/pch.cpp b/src/modules/cmdpal/Microsoft.Terminal.UI/pch.cpp
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/pch.cpp
rename to src/modules/cmdpal/Microsoft.Terminal.UI/pch.cpp
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/pch.h b/src/modules/cmdpal/Microsoft.Terminal.UI/pch.h
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/pch.h
rename to src/modules/cmdpal/Microsoft.Terminal.UI/pch.h
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/til_string.h b/src/modules/cmdpal/Microsoft.Terminal.UI/til_string.h
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/til_string.h
rename to src/modules/cmdpal/Microsoft.Terminal.UI/til_string.h
diff --git a/src/modules/cmdpal/src/Microsoft.Terminal.UI/version.rc b/src/modules/cmdpal/Microsoft.Terminal.UI/version.rc
similarity index 100%
rename from src/modules/cmdpal/src/Microsoft.Terminal.UI/version.rc
rename to src/modules/cmdpal/Microsoft.Terminal.UI/version.rc
diff --git a/src/modules/cmdpal/WindowsCommandPalette.sln b/src/modules/cmdpal/WindowsCommandPalette.sln
index 9f61b540dd..1925615ccf 100644
--- a/src/modules/cmdpal/WindowsCommandPalette.sln
+++ b/src/modules/cmdpal/WindowsCommandPalette.sln
@@ -2,11 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.34929.205
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.UI.Poc", "src\WindowsCommandPalette\Microsoft.CmdPal.UI.Poc.csproj", "{F71CF22B-A5C7-4328-A5B3-F4191AE57314}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.UI.Poc", "WindowsCommandPalette\Microsoft.CmdPal.UI.Poc.csproj", "{F71CF22B-A5C7-4328-A5B3-F4191AE57314}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample Extensions", "Sample Extensions", "{B7FF739F-7716-4FC3-B622-705486187B87}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "src\Microsoft.Terminal.UI\Microsoft.Terminal.UI.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "Microsoft.Terminal.UI\Microsoft.Terminal.UI.vcxproj", "{6515F03F-E56D-4DB4-B23D-AC4FB80DB36F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extension SDK", "Extension SDK", "{FAA24D36-5515-467C-91E7-101A189AAF48}"
EndProject
@@ -14,15 +14,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.CmdPal.Extensions
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "src\Microsoft.CmdPal.Common\Microsoft.CmdPal.Common.csproj", "{05CDE6EE-23AE-42AF-A9F5-E398C382675F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "Microsoft.CmdPal.Common\Microsoft.CmdPal.Common.csproj", "{05CDE6EE-23AE-42AF-A9F5-E398C382675F}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpongebotExtension", "extensions\SpongebotExtension\SpongebotExtension.csproj", "{57617906-DEC8-4D62-A270-6EBE3F8E5C0D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpongebotExtension", "Exts\SpongebotExtension\SpongebotExtension.csproj", "{57617906-DEC8-4D62-A270-6EBE3F8E5C0D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackerNewsExtension", "extensions\HackerNewsExtension\HackerNewsExtension.csproj", "{1A506BBA-06A9-476E-B5D3-1495F299D53F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackerNewsExtension", "Exts\HackerNewsExtension\HackerNewsExtension.csproj", "{1A506BBA-06A9-476E-B5D3-1495F299D53F}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaControlsExtension", "extensions\MediaControlsExtension\MediaControlsExtension.csproj", "{D08AE85F-B6FE-4E1C-8402-DB396B70D6DA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaControlsExtension", "Exts\MediaControlsExtension\MediaControlsExtension.csproj", "{D08AE85F-B6FE-4E1C-8402-DB396B70D6DA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProcessMonitorExtension", "extensions\ProcessMonitorExtension\ProcessMonitorExtension.csproj", "{9456257A-3292-4A8D-AF63-9830EABE7ED2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProcessMonitorExtension", "Exts\ProcessMonitorExtension\ProcessMonitorExtension.csproj", "{9456257A-3292-4A8D-AF63-9830EABE7ED2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Prototype", "Prototype", "{B4B13D2C-8C19-43D0-9FD4-3084F42EA4C2}"
EndProject
diff --git a/src/modules/cmdpal/WindowsCommandPalette/ActionViewModel.cs b/src/modules/cmdpal/WindowsCommandPalette/ActionViewModel.cs
new file mode 100644
index 0000000000..748b300293
--- /dev/null
+++ b/src/modules/cmdpal/WindowsCommandPalette/ActionViewModel.cs
@@ -0,0 +1,17 @@
+// 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.Extensions;
+using Microsoft.UI.Xaml.Controls;
+
+namespace DeveloperCommandPalette;
+
+public sealed class ActionViewModel(ICommand cmd)
+{
+ public ICommand Command => cmd;
+
+ internal bool CanInvoke => cmd is IInvokableCommand;
+
+ internal IconElement IcoElement => Microsoft.Terminal.UI.IconPathConverter.IconMUX(Command.Icon.Icon);
+}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml b/src/modules/cmdpal/WindowsCommandPalette/App.xaml
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/App.xaml
rename to src/modules/cmdpal/WindowsCommandPalette/App.xaml
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/App.xaml.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/App.xaml.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LargeTile.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LargeTile.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/LockScreenLogo.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/LockScreenLogo.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/LockScreenLogo.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SmallTile.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SmallTile.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/SplashScreen.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/SplashScreen.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square150x150Logo.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square150x150Logo.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-16.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-16.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-16.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-16.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-256.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-256.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-256.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-256.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-32.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-32.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-32.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-32.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-48.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-48.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-48.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Square44x44Logo.targetsize-48.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.backup.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.backup.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.backup.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.backup.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/StoreLogo.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/StoreLogo.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-100.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-100.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-100.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-100.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-125.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-125.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-125.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-125.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-150.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-150.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-150.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-150.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-200.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-200.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-200.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-400.png b/src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-400.png
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Assets/Wide310x150Logo.scale-400.png
rename to src/modules/cmdpal/WindowsCommandPalette/Assets/Wide310x150Logo.scale-400.png
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AllAppsPage.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AllAppsPage.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AllAppsPage.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AllAppsPage.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppAction.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppAction.cs
similarity index 95%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppAction.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppAction.cs
index d32dae0a5d..005c3fa723 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppAction.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppAction.cs
@@ -59,9 +59,9 @@ internal sealed class AppAction : InvokableCommand
}
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
_ = Launch();
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppCache.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppCache.cs
similarity index 61%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppCache.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppCache.cs
index 6cbd2e72e2..60ae4b4ade 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppCache.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppCache.cs
@@ -8,7 +8,12 @@ namespace WindowsCommandPalette.BuiltinCommands.AllApps;
public sealed class AppCache
{
- internal IList Win32s = Win32Program.All();
- internal IList UWPs = UWP.All();
+ private readonly IList _win32s = Win32Program.All();
+ private readonly IList _uwps = UWP.All();
+
+ public IList Win32s => _win32s;
+
+ public IList UWPs => _uwps;
+
public static readonly Lazy Instance = new(() => new());
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppItem.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppItem.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppItem.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppItem.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppListItem.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppListItem.cs
similarity index 57%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppListItem.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppListItem.cs
index 078ee4019d..e8a7a3c8f6 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/AppListItem.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/AppListItem.cs
@@ -13,17 +13,28 @@ internal sealed class AppListItem : ListItem
public AppListItem(AppItem app)
: base(new AppAction(app))
{
- this._app = app;
- this.Title = app.Name;
- this.Subtitle = app.Subtitle;
- this.Details = new Details() { Title = this.Title, HeroImage = this.Command.Icon, Body = "### App" };
- this.Tags = [new Tag() { Text = "App" }];
+ _app = app;
+ Title = app.Name;
+ Subtitle = app.Subtitle;
+ Tags = [new Tag() { Text = "App" }];
+
+ Details = new Details()
+ {
+ Title = this.Title,
+ HeroImage = Command?.Icon ?? new(string.Empty),
+ Body = "### App",
+ };
if (string.IsNullOrEmpty(app.UserModelId))
{
// Win32 exe or other non UWP app
MoreCommands = [
- new CommandContextItem(new OpenPathAction(app.DirPath) { Name = "Open location", Icon = new("\ue838") })
+ new CommandContextItem(
+ new OpenPathAction(app.DirPath)
+ {
+ Name = "Open location",
+ Icon = new("\ue838"),
+ })
];
}
else
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs
similarity index 90%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs
index 4a75315bfd..bfcf29da2a 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/OpenPathAction.cs
@@ -20,10 +20,10 @@ internal sealed class OpenPathAction(string target) : InvokableCommand
});
}
- public override ActionResult Invoke()
+ public override CommandResult Invoke()
{
LaunchTarget(_target).Start();
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/AppxFactory.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/AppxFactory.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/AppxFactory.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/AppxFactory.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/AppxPackageHelper.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/AppxPackageHelper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/AppxPackageHelper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/AppxPackageHelper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IApplicationActivationManager.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IApplicationActivationManager.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IApplicationActivationManager.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IApplicationActivationManager.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxFactory.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxFactory.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxFactory.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxFactory.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplication.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplication.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplication.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplication.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplicationsEnumerator.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplicationsEnumerator.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplicationsEnumerator.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestApplicationsEnumerator.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestProperties.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestProperties.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestProperties.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestProperties.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestReader.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestReader.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestReader.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IAppxManifestReader.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IPackage.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IPackage.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IPackage.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IPackage.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IPackageManager.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IPackageManager.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IPackageManager.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IPackageManager.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IProgram.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IProgram.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IProgram.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IProgram.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IShellLinkHelper.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IShellLinkHelper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/IShellLinkHelper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/IShellLinkHelper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/LogoType.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/LogoType.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/LogoType.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/LogoType.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/Native.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/Native.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/Native.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/Native.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/PackageManagerWrapper.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/PackageManagerWrapper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/PackageManagerWrapper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/PackageManagerWrapper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/PackageWrapper.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/PackageWrapper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/PackageWrapper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/PackageWrapper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/ProgramSource.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/ProgramSource.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/ProgramSource.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/ProgramSource.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/ShellLinkHelper.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/ShellLinkHelper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/ShellLinkHelper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/ShellLinkHelper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/UWP.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/UWP.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/UWP.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/UWP.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/UWPApplication.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/UWPApplication.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/UWPApplication.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/UWPApplication.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/Win32Program.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/Win32Program.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/Apps/Programs/Win32Program.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/Apps/Programs/Win32Program.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs
similarity index 95%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs
index 2cdfafbc94..29dcc4194f 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitAction.cs
@@ -20,7 +20,7 @@ public class QuitAction : InvokableCommand, IFallbackHandler
public override ICommandResult Invoke()
{
QuitRequested?.Invoke(this, new());
- return ActionResult.KeepOpen();
+ return CommandResult.KeepOpen();
}
public void UpdateQuery(string query)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitActionProvider.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitCommandProvider.cs
similarity index 95%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitActionProvider.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitCommandProvider.cs
index 3aefec8d92..c1d2fb31f3 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/QuitAction/QuitActionProvider.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/QuitAction/QuitCommandProvider.cs
@@ -8,7 +8,7 @@ using Windows.Foundation;
namespace WindowsCommandPalette.BuiltinCommands;
-public class QuitActionProvider : ICommandProvider
+public class QuitCommandProvider : ICommandProvider
{
public string DisplayName => string.Empty;
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs
similarity index 95%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs
index 97c35e252b..aaf1c7258e 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsAction.cs
@@ -17,7 +17,7 @@ public class ReloadExtensionsAction : InvokableCommand, IFallbackHandler
public override ICommandResult Invoke()
{
- return ActionResult.GoHome();
+ return CommandResult.GoHome();
}
public void UpdateQuery(string query)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsActionProvider.cs b/src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsCommandProvider.cs
similarity index 93%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsActionProvider.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsCommandProvider.cs
index b458d8e92b..ec89f2bd88 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Builtins/ReloadExtensionsActionProvider.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Builtins/ReloadExtensionsCommandProvider.cs
@@ -8,7 +8,7 @@ using Windows.Foundation;
namespace WindowsCommandPalette.BuiltinCommands;
-public class ReloadExtensionsActionProvider : ICommandProvider
+public class ReloadExtensionsCommandProvider : ICommandProvider
{
public string DisplayName => string.Empty;
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/ContextItemViewModel.cs b/src/modules/cmdpal/WindowsCommandPalette/ContextItemViewModel.cs
similarity index 65%
rename from src/modules/cmdpal/src/WindowsCommandPalette/ContextItemViewModel.cs
rename to src/modules/cmdpal/WindowsCommandPalette/ContextItemViewModel.cs
index 62dc5bc827..b63bfe85ea 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/ContextItemViewModel.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/ContextItemViewModel.cs
@@ -2,31 +2,15 @@
// 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.Collections.ObjectModel;
using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Runtime.InteropServices.WindowsRuntime;
-using Microsoft.Terminal.UI;
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Controls.Primitives;
-using Microsoft.UI.Xaml.Data;
-using Microsoft.UI.Xaml.Input;
-using Microsoft.UI.Xaml.Media;
-using Microsoft.UI.Xaml.Navigation;
using Microsoft.CmdPal.Extensions;
-using Windows.ApplicationModel.AppExtensions;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
+using Microsoft.UI.Xaml.Controls;
namespace DeveloperCommandPalette;
public sealed class ContextItemViewModel : INotifyPropertyChanged
{
- internal ICommand Command;
+ public ICommand Command { get; set; }
internal string Name => Command.Name;
@@ -38,9 +22,9 @@ public sealed class ContextItemViewModel : INotifyPropertyChanged
internal IconElement IcoElement => Microsoft.Terminal.UI.IconPathConverter.IconMUX(Icon.Icon);
- public ContextItemViewModel(ICommand action)
+ public ContextItemViewModel(ICommand cmd)
{
- this.Command = action;
+ this.Command = cmd;
this.Command.PropChanged += Action_PropertyChanged;
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/FilteredListSection.cs b/src/modules/cmdpal/WindowsCommandPalette/FilteredListSection.cs
similarity index 98%
rename from src/modules/cmdpal/src/WindowsCommandPalette/FilteredListSection.cs
rename to src/modules/cmdpal/WindowsCommandPalette/FilteredListSection.cs
index 8f72c7cd37..a856d99bbe 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/FilteredListSection.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/FilteredListSection.cs
@@ -6,10 +6,10 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using CmdPal.Models;
-using Microsoft.UI.Dispatching;
-using Microsoft.UI.Xaml;
using Microsoft.CmdPal.Extensions;
using Microsoft.CmdPal.Extensions.Helpers;
+using Microsoft.UI.Dispatching;
+using Microsoft.UI.Xaml;
using WindowsCommandPalette.Views;
namespace DeveloperCommandPalette;
@@ -29,7 +29,7 @@ public sealed class FilteredListSection : ISection, INotifyCollectionChanged
public ObservableCollection TopLevelItems { get; set; }
// Apps, from the apps built in command.
- private IEnumerable AllApps => _mainViewModel.apps.GetItems().First().Items;
+ private IEnumerable AllApps => _mainViewModel.Apps.GetItems().First().Items;
// Results from the last searched text
private IEnumerable? lastSearchResults;
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/ListItemViewModel.cs b/src/modules/cmdpal/WindowsCommandPalette/ListItemViewModel.cs
similarity index 96%
rename from src/modules/cmdpal/src/WindowsCommandPalette/ListItemViewModel.cs
rename to src/modules/cmdpal/WindowsCommandPalette/ListItemViewModel.cs
index 34be829198..91cc77074d 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/ListItemViewModel.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/ListItemViewModel.cs
@@ -5,9 +5,9 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using CmdPal.Models;
+using Microsoft.CmdPal.Extensions;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml.Controls;
-using Microsoft.CmdPal.Extensions;
using WindowsCommandPalette.Views;
namespace DeveloperCommandPalette;
@@ -24,9 +24,9 @@ public sealed class ListItemViewModel : INotifyPropertyChanged, IDisposable
internal string Icon { get; private set; }
- internal Lazy _Details;
+ private readonly Lazy _details;
- internal DetailsViewModel? Details => _Details.Value;
+ internal DetailsViewModel? Details => _details.Value;
public event PropertyChangedEventHandler? PropertyChanged;
@@ -70,7 +70,7 @@ public sealed class ListItemViewModel : INotifyPropertyChanged, IDisposable
internal bool HasMoreCommands => AllCommands.Any();
- internal TagViewModel[] Tags = [];
+ public TagViewModel[] Tags { get; set; } = [];
internal bool HasTags => Tags.Length > 0;
@@ -111,7 +111,7 @@ public sealed class ListItemViewModel : INotifyPropertyChanged, IDisposable
this.Tags = model.Tags.Select(t => new TagViewModel(t)).ToArray();
}
- this._Details = new(() =>
+ this._details = new(() =>
{
try
{
diff --git a/src/modules/cmdpal/WindowsCommandPalette/MainListItem.cs b/src/modules/cmdpal/WindowsCommandPalette/MainListItem.cs
new file mode 100644
index 0000000000..e24385e0b1
--- /dev/null
+++ b/src/modules/cmdpal/WindowsCommandPalette/MainListItem.cs
@@ -0,0 +1,55 @@
+// 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.Extensions;
+using Microsoft.CmdPal.Extensions.Helpers;
+
+namespace DeveloperCommandPalette;
+
+public sealed class MainListItem : ListItem
+{
+ public IListItem Item { get; set; }
+
+ internal MainListItem(IListItem listItem)
+ : base(listItem.Command)
+ {
+ Item = listItem;
+
+ Title = Item.Title ?? Item.Command.Name;
+ Subtitle = Item.Subtitle;
+ MoreCommands = Item.MoreCommands;
+ FallbackHandler = Item.FallbackHandler;
+ Tags = Item.Tags;
+
+ if (Command != null)
+ {
+ Command.PropChanged += Action_PropertyChanged;
+ }
+
+ Item.PropChanged += Action_PropertyChanged;
+ }
+
+ private void Action_PropertyChanged(object sender, PropChangedEventArgs args)
+ {
+ if (args.PropertyName == "Name")
+ {
+ Title = !string.IsNullOrEmpty(Item.Title) ? Item.Title : Command?.Name ?? string.Empty;
+ OnPropertyChanged(nameof(Title));
+ }
+ else if (args.PropertyName == nameof(Title))
+ {
+ Title = Item.Title;
+ }
+ else if (args.PropertyName == nameof(Subtitle))
+ {
+ Subtitle = Item.Subtitle;
+ }
+ else if (args.PropertyName == nameof(MoreCommands))
+ {
+ MoreCommands = Item.MoreCommands;
+ }
+
+ OnPropertyChanged(args.PropertyName);
+ }
+}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/MainListPage.cs b/src/modules/cmdpal/WindowsCommandPalette/MainListPage.cs
similarity index 92%
rename from src/modules/cmdpal/src/WindowsCommandPalette/MainListPage.cs
rename to src/modules/cmdpal/WindowsCommandPalette/MainListPage.cs
index 122d0f8d16..660b9c145d 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/MainListPage.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/MainListPage.cs
@@ -68,7 +68,7 @@ public sealed class MainListPage : DynamicListPage
// Eh, it's fine to be unsafe here, we're probably tossing MainListItem
if (!_mainViewModel.Recent.Contains(listItem))
{
- _mainSection._Items.Add(new MainListItem(listItem.Unsafe));
+ _mainSection.TopLevelItems.Add(new MainListItem(listItem.Unsafe));
}
_filteredSection.TopLevelItems.Add(new MainListItem(listItem.Unsafe));
@@ -81,11 +81,11 @@ public sealed class MainListPage : DynamicListPage
{
if (item is ExtensionObject listItem)
{
- foreach (var mainListItem in _mainSection._Items)
+ foreach (var mainListItem in _mainSection.TopLevelItems)
{
if (mainListItem.Item == listItem)
{
- _mainSection._Items.Remove(mainListItem);
+ _mainSection.TopLevelItems.Remove(mainListItem);
break;
}
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/MainListSection.cs b/src/modules/cmdpal/WindowsCommandPalette/MainListSection.cs
similarity index 74%
rename from src/modules/cmdpal/src/WindowsCommandPalette/MainListSection.cs
rename to src/modules/cmdpal/WindowsCommandPalette/MainListSection.cs
index 11bed52b32..08de9e027b 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/MainListSection.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/MainListSection.cs
@@ -4,12 +4,8 @@
using System.Collections.ObjectModel;
using System.Collections.Specialized;
-using System.Linq;
-using CmdPal.Models;
-using Microsoft.UI.Dispatching;
-using Microsoft.UI.Xaml;
using Microsoft.CmdPal.Extensions;
-using Microsoft.CmdPal.Extensions.Helpers;
+using Microsoft.UI.Dispatching;
using WindowsCommandPalette.Views;
namespace DeveloperCommandPalette;
@@ -25,7 +21,7 @@ public sealed class MainListSection : ISection, INotifyCollectionChanged
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
// Top-level list items, from builtin commands and extensions
- internal ObservableCollection _Items { get; set; }
+ public ObservableCollection TopLevelItems { get; set; }
// Things we should enumerate over, depending on the search query.
// This is either
@@ -33,8 +29,7 @@ public sealed class MainListSection : ISection, INotifyCollectionChanged
// * OR one of:
// * Just the top-level actions (if there's no query)
// * OR the top-level actions AND the apps (if there's a query)
- private IEnumerable itemsToEnumerate =>
- _Items.Where(i => i != null && (!_mainViewModel.IsRecentCommand(i)));
+ private IEnumerable TopLevelItemsToEnumerate => TopLevelItems.Where(i => i != null && (!_mainViewModel.IsRecentCommand(i)));
// Watch out future me!
//
@@ -45,18 +40,18 @@ public sealed class MainListSection : ISection, INotifyCollectionChanged
//
// instead run the query once when the action query changes, and store the
// results.
- public IListItem[] Items => itemsToEnumerate.ToArray();
+ public IListItem[] Items => TopLevelItemsToEnumerate.ToArray();
public MainListSection(MainViewModel viewModel)
{
this._mainViewModel = viewModel;
- _Items = new(_mainViewModel.TopLevelCommands.Select(w => w.Unsafe).Where(li => li != null).Select(li => new MainListItem(li!)));
- _Items.CollectionChanged += Bubble_CollectionChanged;
+ TopLevelItems = new(_mainViewModel.TopLevelCommands.Select(w => w.Unsafe).Where(li => li != null).Select(li => new MainListItem(li!)));
+ TopLevelItems.CollectionChanged += Bubble_CollectionChanged;
}
internal void UpdateQuery(string query)
{
- var fallbacks = _Items.Select(i => i?.FallbackHandler).Where(fb => fb != null).Select(fb => fb!);
+ var fallbacks = TopLevelItems.Select(i => i?.FallbackHandler).Where(fb => fb != null).Select(fb => fb!);
foreach (var fb in fallbacks)
{
fb.UpdateQuery(query);
@@ -73,6 +68,6 @@ public sealed class MainListSection : ISection, INotifyCollectionChanged
internal void Reset()
{
- _Items.Clear();
+ TopLevelItems.Clear();
}
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml
rename to src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs
similarity index 88%
rename from src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs
index afe2bee15e..37c70cff72 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/MainWindow.xaml.cs
@@ -27,20 +27,24 @@ namespace DeveloperCommandPalette;
///
public sealed partial class MainWindow : Window
{
- private readonly AppWindow m_AppWindow;
+ private readonly AppWindow _appWindow;
- private MainViewModel _mainViewModel { get; init; }
+ private readonly MainViewModel _mainViewModel;
private readonly HWND hwnd;
- private const uint DOT_KEY = 0xBE;
- private const uint WM_HOTKEY = 0x0312;
private WNDPROC? origPrc;
private WNDPROC? hotKeyPrc;
- private Windows.Win32.Foundation.LRESULT HotKeyPrc(Windows.Win32.Foundation.HWND hwnd,
- uint uMsg,
- Windows.Win32.Foundation.WPARAM wParam,
- Windows.Win32.Foundation.LPARAM lParam)
+#pragma warning disable SA1310 // Field names should not contain underscore
+ private const uint DOT_KEY = 0xBE;
+ private const uint WM_HOTKEY = 0x0312;
+#pragma warning restore SA1310 // Field names should not contain underscore
+
+ private LRESULT HotKeyPrc(
+ HWND hwnd,
+ uint uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
{
if (uMsg == WM_HOTKEY)
{
@@ -71,8 +75,8 @@ public sealed partial class MainWindow : Window
public MainWindow()
{
- this.InitializeComponent();
- this._mainViewModel = MainPage.ViewModel;
+ InitializeComponent();
+ _mainViewModel = MainPage.ViewModel;
hwnd = new Windows.Win32.Foundation.HWND(WinRT.Interop.WindowNative.GetWindowHandle(this).ToInt32());
@@ -80,7 +84,7 @@ public sealed partial class MainWindow : Window
// Assumes "this" is a XAML Window. In projects that don't use
// WinUI 3 1.3 or later, use interop APIs to get the AppWindow.
- m_AppWindow = this.AppWindow;
+ _appWindow = AppWindow;
Activated += MainWindow_Activated;
AppTitleBar.SizeChanged += AppTitleBar_SizeChanged;
@@ -88,10 +92,10 @@ public sealed partial class MainWindow : Window
ExtendsContentIntoTitleBar = true;
// Hide our titlebar. We'll make the sides draggable later
- m_AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Collapsed;
+ _appWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Collapsed;
AppTitleTextBlock.Text = AppInfo.Current.DisplayInfo.DisplayName;
- m_AppWindow.Title = AppTitleTextBlock.Text;
+ _appWindow.Title = AppTitleTextBlock.Text;
Application.Current.GetService().SaveSettingAsync("ThisIsAVeryBizarreString", true);
@@ -101,7 +105,7 @@ public sealed partial class MainWindow : Window
_mainViewModel.QuitRequested += (s, e) =>
{
- this.Close();
+ Close();
// Application.Current.Exit();
};
@@ -120,8 +124,8 @@ public sealed partial class MainWindow : Window
private void PositionCentered()
{
- m_AppWindow.Resize(new SizeInt32 { Width = 860, Height = 512 });
- DisplayArea displayArea = DisplayArea.GetFromWindowId(m_AppWindow.Id, DisplayAreaFallback.Nearest);
+ _appWindow.Resize(new SizeInt32 { Width = 860, Height = 512 });
+ DisplayArea displayArea = DisplayArea.GetFromWindowId(_appWindow.Id, DisplayAreaFallback.Nearest);
if (displayArea is not null)
{
var centeredPosition = AppWindow.Position;
@@ -134,7 +138,7 @@ public sealed partial class MainWindow : Window
private void PositionForStartMenu()
{
- m_AppWindow.Resize(new Windows.Graphics.SizeInt32(768, 768));
+ _appWindow.Resize(new Windows.Graphics.SizeInt32(768, 768));
// now put the window in the right place
//
@@ -168,22 +172,22 @@ public sealed partial class MainWindow : Window
// react appropriately
}
- Microsoft.UI.Windowing.DisplayArea displayArea = Microsoft.UI.Windowing.DisplayArea.GetFromWindowId(m_AppWindow.Id, Microsoft.UI.Windowing.DisplayAreaFallback.Nearest);
+ Microsoft.UI.Windowing.DisplayArea displayArea = Microsoft.UI.Windowing.DisplayArea.GetFromWindowId(_appWindow.Id, Microsoft.UI.Windowing.DisplayAreaFallback.Nearest);
if (displayArea is not null)
{
- var centeredPosition = m_AppWindow.Position;
+ var centeredPosition = _appWindow.Position;
if (onLeft)
{
centeredPosition.X = 16;
- centeredPosition.Y = displayArea.WorkArea.Height - m_AppWindow.Size.Height - 16;
+ centeredPosition.Y = displayArea.WorkArea.Height - _appWindow.Size.Height - 16;
}
else
{
- centeredPosition.X = (displayArea.WorkArea.Width - m_AppWindow.Size.Width) / 2;
- centeredPosition.Y = displayArea.WorkArea.Height - m_AppWindow.Size.Height - 16;
+ centeredPosition.X = (displayArea.WorkArea.Width - _appWindow.Size.Width) / 2;
+ centeredPosition.Y = displayArea.WorkArea.Height - _appWindow.Size.Height - 16;
}
- m_AppWindow.Move(centeredPosition);
+ _appWindow.Move(centeredPosition);
}
}
@@ -215,8 +219,8 @@ public sealed partial class MainWindow : Window
// Specify the interactive regions of the title bar.
var scaleAdjustment = AppTitleBar.XamlRoot.RasterizationScale;
- RightPaddingColumn.Width = new GridLength(m_AppWindow.TitleBar.RightInset / scaleAdjustment);
- LeftPaddingColumn.Width = new GridLength(m_AppWindow.TitleBar.LeftInset / scaleAdjustment);
+ RightPaddingColumn.Width = new GridLength(_appWindow.TitleBar.RightInset / scaleAdjustment);
+ LeftPaddingColumn.Width = new GridLength(_appWindow.TitleBar.LeftInset / scaleAdjustment);
//// Get the rectangle around the content
GeneralTransform transform = MainPage.TransformToVisual(null);
@@ -317,7 +321,7 @@ public sealed partial class MainWindow : Window
return modifierString + keyString;
}
- private static (VirtualKey key, VirtualKeyModifiers modifiers) StringToKeybinding(string keybinding)
+ private static (VirtualKey Key, VirtualKeyModifiers Modifiers) StringToKeybinding(string keybinding)
{
var parts = keybinding.Split('+');
var modifiers = VirtualKeyModifiers.None;
@@ -351,9 +355,10 @@ public sealed partial class MainWindow : Window
return (key, modifiers);
}
- private static (uint vk, Windows.Win32.UI.Input.KeyboardAndMouse.HOT_KEY_MODIFIERS mod) UwpToWin32(VirtualKey key, VirtualKeyModifiers modifiers)
+ private static (uint Vk, Windows.Win32.UI.Input.KeyboardAndMouse.HOT_KEY_MODIFIERS Mod) UwpToWin32(VirtualKey key, VirtualKeyModifiers modifiers)
{
- Windows.Win32.UI.Input.KeyboardAndMouse.HOT_KEY_MODIFIERS mod = new();
+ Windows.Win32.UI.Input.KeyboardAndMouse.HOT_KEY_MODIFIERS mod = default;
+
if (modifiers.HasFlag(VirtualKeyModifiers.Control))
{
mod |= Windows.Win32.UI.Input.KeyboardAndMouse.HOT_KEY_MODIFIERS.MOD_CONTROL;
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj b/src/modules/cmdpal/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj
similarity index 95%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj
rename to src/modules/cmdpal/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj
index c1acc8cdd9..c54f812f98 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj
+++ b/src/modules/cmdpal/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj
@@ -1,5 +1,5 @@
-
+
WinExe
WindowsCommandPalette
@@ -9,7 +9,6 @@
true
enable
enable
- False
@@ -68,7 +67,7 @@
-
+
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Models/ExtensionObject`1.cs b/src/modules/cmdpal/WindowsCommandPalette/Models/ExtensionObject`1.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Models/ExtensionObject`1.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Models/ExtensionObject`1.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Models/ExtensionWrapper.cs b/src/modules/cmdpal/WindowsCommandPalette/Models/ExtensionWrapper.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Models/ExtensionWrapper.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Models/ExtensionWrapper.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/NativeMethods.txt b/src/modules/cmdpal/WindowsCommandPalette/NativeMethods.txt
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/NativeMethods.txt
rename to src/modules/cmdpal/WindowsCommandPalette/NativeMethods.txt
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Package.appxmanifest b/src/modules/cmdpal/WindowsCommandPalette/Package.appxmanifest
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Package.appxmanifest
rename to src/modules/cmdpal/WindowsCommandPalette/Package.appxmanifest
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/PageViewModel.cs b/src/modules/cmdpal/WindowsCommandPalette/PageViewModel.cs
similarity index 85%
rename from src/modules/cmdpal/src/WindowsCommandPalette/PageViewModel.cs
rename to src/modules/cmdpal/WindowsCommandPalette/PageViewModel.cs
index 99065255ee..5c6350f324 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/PageViewModel.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/PageViewModel.cs
@@ -9,11 +9,9 @@ namespace DeveloperCommandPalette;
public class PageViewModel
{
- private bool nested;
+ public bool Nested { get; set; }
- public bool Nested { get => nested; set => nested = value; }
-
- protected IPage pageAction { get; }
+ public IPage PageAction { get; }
// public IPage PageAction { get => pageAction; set => pageAction = value; }
public ActionViewModel Command { get; }
@@ -26,8 +24,8 @@ public class PageViewModel
protected PageViewModel(IPage page)
{
- this.pageAction = page;
- this.Command = new(page);
+ PageAction = page;
+ Command = new(page);
}
public void DoAction(ActionViewModel action)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Program.cs b/src/modules/cmdpal/WindowsCommandPalette/Program.cs
similarity index 96%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Program.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Program.cs
index 2f2464a74b..507e295804 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Program.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Program.cs
@@ -13,7 +13,7 @@ namespace DeveloperCommandPalette;
// cribbed heavily from
//
// https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/AppLifecycle/Instancing/cs2/cs-winui-packaged/CsWinUiDesktopInstancing
-sealed class Program
+internal sealed class Program
{
private static App? app;
@@ -21,7 +21,7 @@ sealed class Program
//
// Main cannot be async. If it is, then the clipboard won't work, and neither will narrator.
[STAThread]
- static int Main(string[] args)
+ private static int Main(string[] args)
{
WinRT.ComWrappersSupport.InitializeComWrappers();
var isRedirect = DecideRedirection();
diff --git a/src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-x86.pubxml b/src/modules/cmdpal/WindowsCommandPalette/Properties/PublishProfiles/win-x64.pubxml
similarity index 77%
rename from src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-x86.pubxml
rename to src/modules/cmdpal/WindowsCommandPalette/Properties/PublishProfiles/win-x64.pubxml
index 4ed30a5eed..fb069f3e3d 100644
--- a/src/modules/cmdpal/extensions/TemplateExtension/Properties/PublishProfiles/win-x86.pubxml
+++ b/src/modules/cmdpal/WindowsCommandPalette/Properties/PublishProfiles/win-x64.pubxml
@@ -5,15 +5,15 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
FileSystem
- x86
- win-x86
- win10-x86
+ x64
+ win-x64
+ win10-x64
bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
true
False
False
True
False
- True
+ False
-
\ No newline at end of file
+
diff --git a/src/modules/cmdpal/WindowsCommandPalette/Properties/launchSettings.json b/src/modules/cmdpal/WindowsCommandPalette/Properties/launchSettings.json
new file mode 100644
index 0000000000..2043707ea3
--- /dev/null
+++ b/src/modules/cmdpal/WindowsCommandPalette/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "WindowsCommandPalette (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "WindowsCommandPalette (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/RecentsListSection.cs b/src/modules/cmdpal/WindowsCommandPalette/RecentsListSection.cs
similarity index 70%
rename from src/modules/cmdpal/src/WindowsCommandPalette/RecentsListSection.cs
rename to src/modules/cmdpal/WindowsCommandPalette/RecentsListSection.cs
index 8983549e9e..6bfc2ee452 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/RecentsListSection.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/RecentsListSection.cs
@@ -4,12 +4,9 @@
using System.Collections.ObjectModel;
using System.Collections.Specialized;
-using System.Linq;
-using CmdPal.Models;
-using Microsoft.UI.Dispatching;
-using Microsoft.UI.Xaml;
using Microsoft.CmdPal.Extensions;
using Microsoft.CmdPal.Extensions.Helpers;
+using Microsoft.UI.Dispatching;
using WindowsCommandPalette.Views;
namespace DeveloperCommandPalette;
@@ -21,26 +18,27 @@ public sealed class RecentsListSection : ListSection, INotifyCollectionChanged
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
private readonly MainViewModel _mainViewModel;
- internal ObservableCollection _Items { get; set; } = [];
+ private readonly ObservableCollection _items = [];
private bool loadedApps;
public RecentsListSection(MainViewModel viewModel)
{
- this.Title = "Recent";
- this._mainViewModel = viewModel;
+ Title = "Recent";
+ _mainViewModel = viewModel;
var recent = _mainViewModel.RecentActions;
Reset();
- _Items.CollectionChanged += Bubble_CollectionChanged;
+ _items.CollectionChanged += Bubble_CollectionChanged;
- _mainViewModel.AppsReady += _mainViewModel_AppsReady;
+ _mainViewModel.AppsReady += MainViewModel_AppsReady;
}
- private void _mainViewModel_AppsReady(object sender, object? args)
+ private void MainViewModel_AppsReady(object sender, object? args)
{
loadedApps = true;
- _mainViewModel.AppsReady -= _mainViewModel_AppsReady;
+ _mainViewModel.AppsReady -= MainViewModel_AppsReady;
+
AddApps();
}
@@ -52,11 +50,11 @@ public sealed class RecentsListSection : ListSection, INotifyCollectionChanged
});
}
- public override IListItem[] Items => _Items.ToArray();
+ public override IListItem[] Items => _items.ToArray();
internal void Reset()
{
- _Items.Clear();
+ _items.Clear();
if (loadedApps)
{
AddApps();
@@ -68,7 +66,7 @@ public sealed class RecentsListSection : ListSection, INotifyCollectionChanged
var apps = _mainViewModel.Recent;
foreach (var app in apps)
{
- _Items.Add(new MainListItem(app.Unsafe)); // we know these are all local
+ _items.Add(new MainListItem(app.Unsafe)); // we know these are all local
}
}
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Services/ExtensionService.cs b/src/modules/cmdpal/WindowsCommandPalette/Services/ExtensionService.cs
similarity index 97%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Services/ExtensionService.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Services/ExtensionService.cs
index 5adb899259..038b6216c7 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Services/ExtensionService.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Services/ExtensionService.cs
@@ -6,8 +6,8 @@ using CmdPal.Models;
using Microsoft.CmdPal.Common.Contracts;
using Microsoft.CmdPal.Common.Extensions;
using Microsoft.CmdPal.Common.Services;
-using Microsoft.UI.Xaml;
using Microsoft.CmdPal.Extensions;
+using Microsoft.UI.Xaml;
using Windows.ApplicationModel;
using Windows.ApplicationModel.AppExtensions;
using Windows.Foundation.Collections;
@@ -125,7 +125,7 @@ public class ExtensionService : IExtensionService, IDisposable
return false;
}
- private static async Task<(IPropertySet?, List)> GetCmdPalExtensionPropertiesAsync(AppExtension extension)
+ private static async Task<(IPropertySet? CmdPalProvider, List ClassIds)> GetCmdPalExtensionPropertiesAsync(AppExtension extension)
{
var classIds = new List();
var properties = await extension.GetExtensionPropertiesAsync();
@@ -168,8 +168,9 @@ public class ExtensionService : IExtensionService, IDisposable
var extensions = await GetInstalledAppExtensionsAsync();
foreach (var extension in extensions)
{
- var (CmdPalProvider, classIds) = await GetCmdPalExtensionPropertiesAsync(extension);
- if (CmdPalProvider == null || classIds.Count == 0)
+ var (cmdPalProvider, classIds) = await GetCmdPalExtensionPropertiesAsync(extension);
+
+ if (cmdPalProvider == null || classIds.Count == 0)
{
continue;
}
@@ -178,7 +179,7 @@ public class ExtensionService : IExtensionService, IDisposable
{
var extensionWrapper = new ExtensionWrapper(extension, classId);
- var supportedInterfaces = GetSubPropertySet(CmdPalProvider, "SupportedInterfaces");
+ var supportedInterfaces = GetSubPropertySet(cmdPalProvider, "SupportedInterfaces");
if (supportedInterfaces is not null)
{
foreach (var supportedInterface in supportedInterfaces)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/SubmitFormArgs.cs b/src/modules/cmdpal/WindowsCommandPalette/SubmitFormArgs.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/SubmitFormArgs.cs
rename to src/modules/cmdpal/WindowsCommandPalette/SubmitFormArgs.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/TagViewModel.cs b/src/modules/cmdpal/WindowsCommandPalette/TagViewModel.cs
similarity index 67%
rename from src/modules/cmdpal/src/WindowsCommandPalette/TagViewModel.cs
rename to src/modules/cmdpal/WindowsCommandPalette/TagViewModel.cs
index a58a2283c8..5b1678069e 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/TagViewModel.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/TagViewModel.cs
@@ -3,20 +3,20 @@
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
+using Microsoft.CmdPal.Extensions;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
-using Microsoft.CmdPal.Extensions;
using Windows.UI;
namespace DeveloperCommandPalette;
public sealed class TagViewModel : INotifyPropertyChanged
{
- internal ITag Tag;
+ private readonly ITag _tag;
- internal IconDataType Icon => Tag.Icon;
+ internal IconDataType Icon => _tag.Icon;
- internal string Text => Tag.Text;
+ internal string Text => _tag.Text;
public event PropertyChangedEventHandler? PropertyChanged;
@@ -25,15 +25,15 @@ public sealed class TagViewModel : INotifyPropertyChanged
internal IconElement IcoElement => Microsoft.Terminal.UI.IconPathConverter.IconMUX(Icon?.Icon ?? string.Empty, 10);
// TODO! VV These guys should have proper theme-aware lookups for default values
- internal Brush BorderBrush => new SolidColorBrush(Tag.Color);
+ internal Brush BorderBrush => new SolidColorBrush(_tag.Color);
- internal Brush TextBrush => new SolidColorBrush(Tag.Color.A == 0 ? Color.FromArgb(255, 255, 255, 255) : Tag.Color);
+ internal Brush TextBrush => new SolidColorBrush(_tag.Color.A == 0 ? Color.FromArgb(255, 255, 255, 255) : _tag.Color);
- internal Brush BackgroundBrush => new SolidColorBrush(Tag.Color.A == 0 ? Tag.Color : Color.FromArgb((byte)(Tag.Color.A / 4), Tag.Color.R, Tag.Color.G, Tag.Color.B));
+ internal Brush BackgroundBrush => new SolidColorBrush(_tag.Color.A == 0 ? _tag.Color : Color.FromArgb((byte)(_tag.Color.A / 4), _tag.Color.R, _tag.Color.G, _tag.Color.B));
public TagViewModel(ITag tag)
{
- this.Tag = tag;
+ this._tag = tag;
// this.Tag.PropChanged += Tag_PropertyChanged;
}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Themes/Generic.xaml b/src/modules/cmdpal/WindowsCommandPalette/Themes/Generic.xaml
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Themes/Generic.xaml
rename to src/modules/cmdpal/WindowsCommandPalette/Themes/Generic.xaml
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/ActionsProviderWrapper.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/CommandProviderWrapper.cs
similarity index 64%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/ActionsProviderWrapper.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/CommandProviderWrapper.cs
index 6e660dc965..ffd70b7aa5 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Views/ActionsProviderWrapper.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/CommandProviderWrapper.cs
@@ -2,46 +2,32 @@
// 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.ObjectModel;
-using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.WindowsRuntime;
-using CmdPal.Models;
-using DeveloperCommandPalette;
-using Microsoft.CmdPal.Common.Extensions;
using Microsoft.CmdPal.Common.Services;
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Input;
-using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.CmdPal.Extensions;
-using Microsoft.CmdPal.Extensions.Helpers;
-using Windows.Foundation;
using Windows.Win32;
-using WindowsCommandPalette.BuiltinCommands;
-using WindowsCommandPalette.BuiltinCommands.AllApps;
namespace WindowsCommandPalette.Views;
-internal sealed class ActionsProviderWrapper
+public sealed class CommandProviderWrapper
{
public bool IsExtension => extensionWrapper != null;
private readonly bool isValid;
- private ICommandProvider ActionProvider { get; }
+ private ICommandProvider CommandProvider { get; }
private readonly IExtensionWrapper? extensionWrapper;
private IListItem[] _topLevelItems = [];
public IListItem[] TopLevelItems => _topLevelItems;
- public ActionsProviderWrapper(ICommandProvider provider)
+ public CommandProviderWrapper(ICommandProvider provider)
{
- ActionProvider = provider;
+ CommandProvider = provider;
isValid = true;
}
- public ActionsProviderWrapper(IExtensionWrapper extension)
+ public CommandProviderWrapper(IExtensionWrapper extension)
{
extensionWrapper = extension;
var extensionImpl = extension.GetExtensionObject();
@@ -50,7 +36,7 @@ internal sealed class ActionsProviderWrapper
throw new ArgumentException("extension didn't actually implement ICommandProvider");
}
- ActionProvider = provider;
+ CommandProvider = provider;
isValid = true;
}
@@ -61,7 +47,7 @@ internal sealed class ActionsProviderWrapper
return;
}
- var t = new Task(() => ActionProvider.TopLevelCommands());
+ var t = new Task(() => CommandProvider.TopLevelCommands());
t.Start();
var commands = await t.ConfigureAwait(false);
@@ -86,7 +72,7 @@ internal sealed class ActionsProviderWrapper
}
}
- public override bool Equals(object? obj) => obj is ActionsProviderWrapper wrapper && isValid == wrapper.isValid;
+ public override bool Equals(object? obj) => obj is CommandProviderWrapper wrapper && isValid == wrapper.isValid;
public override int GetHashCode()
{
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsControl.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsControl.xaml
rename to src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsControl.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsControl.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/DetailsControl.xaml.cs
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsViewModel.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsViewModel.xaml.cs
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsViewModel.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/DetailsViewModel.xaml.cs
index e068351d8c..1868264ec9 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Views/DetailsViewModel.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/DetailsViewModel.xaml.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.UI.Xaml.Controls;
using Microsoft.CmdPal.Extensions;
+using Microsoft.UI.Xaml.Controls;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
diff --git a/src/modules/cmdpal/WindowsCommandPalette/Views/ErrorListItem.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/ErrorListItem.xaml.cs
new file mode 100644
index 0000000000..5078115cda
--- /dev/null
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/ErrorListItem.xaml.cs
@@ -0,0 +1,17 @@
+// 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.Extensions.Helpers;
+
+namespace WindowsCommandPalette.Views;
+
+public sealed class ErrorListItem : ListItem
+{
+ public ErrorListItem(Exception ex)
+ : base(new NoOpAction())
+ {
+ Title = "Error in extension:";
+ Subtitle = ex.Message;
+ }
+}
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPage.xaml b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml
similarity index 100%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPage.xaml
rename to src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPage.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml.cs
similarity index 96%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPage.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml.cs
index 95fdc6feef..d28c1d6ffb 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPage.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPage.xaml.cs
@@ -14,8 +14,9 @@ namespace WindowsCommandPalette.Views;
public sealed partial class FormPage : Page
{
- private readonly AdaptiveCardRenderer Renderer = new();
- private FormPageViewModel? ViewModel;
+ private readonly AdaptiveCardRenderer _renderer = new();
+
+ public FormPageViewModel? ViewModel { get; set; }
public FormPage()
{
@@ -26,12 +27,12 @@ public sealed partial class FormPage : Page
// yep it's this dumb
var foreground = settings.GetColorValue(UIColorType.Foreground);
var lightTheme = foreground.R < 128;
- Renderer.HostConfig = AdaptiveHostConfig.FromJsonString(lightTheme ? LightHostConfig : DarkHostConfig).HostConfig;
+ _renderer.HostConfig = AdaptiveHostConfig.FromJsonString(lightTheme ? LightHostConfig : DarkHostConfig).HostConfig;
}
private void AddCardElement(FormViewModel form)
{
- form.RenderToXaml(Renderer);
+ form.RenderToXaml(_renderer);
}
protected override void OnNavigatedTo(NavigationEventArgs e)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs
similarity index 71%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs
index e4e005999a..6be6722daa 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/FormPageViewModel.xaml.cs
@@ -2,30 +2,17 @@
// 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.ObjectModel;
-using System.ComponentModel;
-using AdaptiveCards.ObjectModel.WinUI3;
-using AdaptiveCards.Rendering.WinUI3;
-using AdaptiveCards.Templating;
using DeveloperCommandPalette;
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Input;
-using Microsoft.UI.Xaml.Navigation;
using Microsoft.CmdPal.Extensions;
-using Microsoft.CmdPal.Extensions.Helpers;
-using Windows.Foundation;
-using Windows.System;
-using Windows.UI.ViewManagement;
namespace WindowsCommandPalette.Views;
public sealed class FormPageViewModel : PageViewModel
{
- internal IFormPage Page => (IFormPage)this.pageAction;
+ internal IFormPage Page => (IFormPage)this.PageAction;
- internal ObservableCollection Forms = new();
+ public ObservableCollection Forms { get; set; } = new();
public FormPageViewModel(IFormPage page)
: base(page)
diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormViewModel.xaml.cs b/src/modules/cmdpal/WindowsCommandPalette/Views/FormViewModel.xaml.cs
similarity index 66%
rename from src/modules/cmdpal/src/WindowsCommandPalette/Views/FormViewModel.xaml.cs
rename to src/modules/cmdpal/WindowsCommandPalette/Views/FormViewModel.xaml.cs
index ad1b95318c..fb400d5cd0 100644
--- a/src/modules/cmdpal/src/WindowsCommandPalette/Views/FormViewModel.xaml.cs
+++ b/src/modules/cmdpal/WindowsCommandPalette/Views/FormViewModel.xaml.cs
@@ -7,62 +7,63 @@ using AdaptiveCards.ObjectModel.WinUI3;
using AdaptiveCards.Rendering.WinUI3;
using AdaptiveCards.Templating;
using DeveloperCommandPalette;
-using Microsoft.UI.Xaml;
using Microsoft.CmdPal.Extensions;
+using Microsoft.UI.Xaml;
using Windows.Foundation;
using Windows.System;
namespace WindowsCommandPalette.Views;
-public sealed class FormViewModel : System.ComponentModel.INotifyPropertyChanged
+public sealed class FormViewModel : INotifyPropertyChanged
{
- internal readonly IForm form;
- internal AdaptiveCardParseResult? card;
- internal RenderedAdaptiveCard? RenderedAdaptiveCard;
- internal string TemplateJson = "{}";
- internal string DataJson = "{}";
+ private readonly IForm _form;
+ private AdaptiveCardParseResult? _card;
+ private RenderedAdaptiveCard? _renderedAdaptiveCard;
+ private string _templateJson = "{}";
+ private string _dataJson = "{}";
public event TypedEventHandler