[review-mirror] Advanced Paste additional customizations and PhiSilica provider - #4
[review-mirror] Advanced Paste additional customizations and PhiSilica provider#4yeelam-gordon wants to merge 109 commits into
Conversation
_SECURE_SCL is still present in deps/vcpkg-overlays/spdlog/msvc-14.51-stdext-checked-array-iterator.patch, so dropping SCL from expect.txt made check-spelling fail on the unrecognized word. Restore the entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds new Advanced Paste capabilities across Settings UI + module runtime: per-action provider selection, a new “Fix spelling and grammar” action with an optional coaching hotkey/preview, and a Phi Silica (on-device) AI provider with sparse-package based availability/provisioning flow. Also updates packaging/build/pipelines/installer and dev docs to support Phi Silica’s limited-access + WinRT metadata requirements.
Changes:
- Adds Phi Silica provider support end-to-end (service type registry + Settings UI probe/prepare UX + module provider implementation).
- Adds additional action customizations (Fix Spelling & Grammar prompts/system prompts, coaching mode + coaching hotkey, per-action provider selection).
- Updates packaging/installer/pipelines to include required WinRT metadata and support sparse identity/dev registration.
Reviewed changes
Copilot reviewed 55 out of 55 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/settings-ui/Settings.UI/ViewModels/AdvancedPasteViewModel.cs | Syncs provider “active” UI flags; adds default-provider action; updates hotkey/conflict tracking for coaching hotkey |
| src/settings-ui/Settings.UI/Strings/en-us/Resources.resw | Adds Settings UI strings for new action customization, provider UX, and Phi Silica states |
| src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml.cs | Adds Phi Silica availability probing + prepare flow via AdvancedPaste subprocess; adds provider defaulting and UI helpers |
| src/settings-ui/Settings.UI/SettingsXAML/Views/AdvancedPastePage.xaml | Adds UI for default provider badge/menu item; adds Fix Spelling & Grammar expander with coaching + provider selectors |
| src/settings-ui/Settings.UI.Library/AIServiceTypeRegistry.cs | Registers Phi Silica metadata (display name/icon/legal label) |
| src/settings-ui/Settings.UI.Library/AIServiceTypeExtensions.cs | Adds Phi Silica string mappings/normalization |
| src/settings-ui/Settings.UI.Library/AIServiceType.cs | Adds PhiSilica enum member |
| src/settings-ui/Settings.UI.Library/AdvancedPasteSettings.cs | Aligns hotkey accessor order with runner; adds Fix Spelling & Grammar and coaching hotkey accessor |
| src/settings-ui/Settings.UI.Library/AdvancedPasteDefaultPrompts.cs | Introduces shared default prompts for built-in AI actions |
| src/settings-ui/Settings.UI.Library/AdvancedPasteCustomAction.cs | Adds per-custom-action provider selection persistence (provider-id) |
| src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalActions.cs | Adds Fix Spelling & Grammar additional action to settings schema |
| src/settings-ui/Settings.UI.Library/AdvancedPasteAdditionalAction.cs | Adds prompts/system prompts, provider ids, and coaching settings/shortcut to additional actions schema |
| src/PhiSilicaLaf.props | Adds MSBuild properties for Phi Silica LAF token/attestation |
| src/PackageIdentity/BuildSparsePackage.ps1 | Adds unregister/dev-register helpers for sparse package dev workflows and cert trust setup |
| src/PackageIdentity/AppxManifest.xml | Adds sparse-package application entry for PowerToys.AdvancedPaste.exe |
| src/modules/AdvancedPaste/custom.props | Adds XES versioning properties for Advanced Paste |
| src/modules/AdvancedPaste/AdvancedPasteModuleInterface/dllmain.cpp | Registers coaching hotkey; adds Fix Spelling action ordering; applies auto-copy-selection to all hotkeys |
| src/modules/AdvancedPaste/AdvancedPasteModuleInterface/AdvancedPasteProcessManager.cpp | Adjusts process launch path and increases pipe client connection timeout |
| src/modules/AdvancedPaste/AdvancedPasteModuleInterface/AdvancedPasteModuleInterface.vcxproj | Minor formatting change |
| src/modules/AdvancedPaste/AdvancedPasteModuleInterface/AdvancedPaste.base.rc | Removes embedded VERSIONINFO resource block |
| src/modules/AdvancedPaste/AdvancedPaste/ViewModels/OptionsViewModel.cs | Adds per-format provider id routing; adds coaching explanation generation + preview forcing |
| src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw | Adds strings for Fix Spelling and coaching explanation title |
| src/modules/AdvancedPaste/AdvancedPaste/Services/PasteFormatExecutor.cs | Adds Fix Spelling execution path; passes provider override into AI transforms |
| src/modules/AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs | Adds optional providerIdOverride parameter |
| src/modules/AdvancedPaste/AdvancedPaste/Services/IKernelService.cs | Adds optional providerIdOverride parameter |
| src/modules/AdvancedPaste/AdvancedPaste/Services/IAICredentialsProvider.cs | Adds per-provider credential lookup API |
| src/modules/AdvancedPaste/AdvancedPaste/Services/EnhancedVaultCredentialsProvider.cs | Implements per-provider key lookup; ensures password is retrieved from vault |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/SemanticKernelPasteProvider.cs | Tweaks OpenAI/Azure OpenAI execution settings (reasoning effort) |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/PhiSilicaPasteProvider.cs | Adds Phi Silica provider implementation using Windows AI LanguageModel APIs |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/PasteAIProviderFactory.cs | Registers Phi Silica provider |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/ICustomActionTransformService.cs | Adds system prompt + provider override parameters |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/CustomActionTransformService.cs | Adds provider selection routing and system prompt override |
| src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActionKernelQueryCacheService.cs | Injects localization delegate for testability |
| src/modules/AdvancedPaste/AdvancedPaste/Program.cs | Adds --check-phi-silica / --prepare-phi-silica non-UI entrypoints; returns exit codes |
| src/modules/AdvancedPaste/AdvancedPaste/PhiSilicaLafHelper.cs | Adds LAF unlock helper with diagnostics caching semantics |
| src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormats.cs | Adds FixSpellingAndGrammar format metadata |
| src/modules/AdvancedPaste/AdvancedPaste/Models/PasteFormat.cs | Adds per-format ProviderId support |
| src/modules/AdvancedPaste/AdvancedPaste/Helpers/UserSettings.cs | Plumbs Fix Spelling & coaching settings from settings schema into runtime settings |
| src/modules/AdvancedPaste/AdvancedPaste/Helpers/NativeMethods.cs | Removes unused System.Windows.Point conversion operator |
| src/modules/AdvancedPaste/AdvancedPaste/Helpers/IUserSettings.cs | Adds Fix Spelling & coaching settings surface to runtime |
| src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/Controls/PromptBox.xaml | Adds coaching explanation UI panel in preview |
| src/modules/AdvancedPaste/AdvancedPaste/AdvancedPasteXAML/App.xaml.cs | Adds coaching IPC key parsing (-coaching) and forces coaching execution path |
| src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.prod.manifest | Adds prod app manifest for sparse identity metadata |
| src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.dev.manifest | Adds dev app manifest for sparse identity metadata |
| src/modules/AdvancedPaste/AdvancedPaste/AdvancedPaste.csproj | Adds AI package ref; introduces dev/prod manifests; generates Phi Silica LAF credential source; versioning adjustments |
| src/modules/AdvancedPaste/AdvancedPaste.UnitTests/ServicesTests/CustomActionKernelQueryCacheServiceTests.cs | Updates tests to inject localizer delegate |
| src/modules/AdvancedPaste/AdvancedPaste.UnitTests/Mocks/IntegrationTestUserSettings.cs | Updates mock settings for new Fix Spelling/coaching properties |
| installer/PowerToysSetupVNext/generateAllFileComponents.ps1 | Includes *.winmd in installer harvest and excludes CmdPal winmd to avoid WiX conflicts |
| doc/devdocs/modules/advancedpaste.md | Documents debugging and sparse package identity setup for Phi Silica |
| doc/devdocs/modules/advancedpaste-phisilica-local-testing.md | Adds detailed Phi Silica local testing/troubleshooting guide |
| Directory.Build.props | Imports Phi Silica LAF MSBuild properties globally |
| .pipelines/v2/templates/job-build-project.yml | Ensures versioning setup order accounts for Advanced Paste custom.props vs CmdPal |
| .pipelines/v2/release.yml | Passes Phi Silica LAF secrets via MSBuild properties in release pipeline |
| .github/actions/spell-check/patterns.txt | Allows Phi Silica token/ID patterns for spell-check |
| .github/actions/spell-check/allow/code.txt | Adds Phi Silica/LAF related terms to allowlist |
| <!-- Phi Silica Limited Access Feature credentials. | ||
| Local dev defaults below; overridden by /p: in release pipelines. --> | ||
| <PhiSilicaLafToken Condition="'$(PhiSilicaLafToken)'==''">RmToMMYJHZkQSrKP5lWesA==</PhiSilicaLafToken> | ||
| <PhiSilicaLafAttestation Condition="'$(PhiSilicaLafAttestation)'==''">djwsxzxb4ksa8</PhiSilicaLafAttestation> | ||
| </PropertyGroup> |
There was a problem hiding this comment.
Escalating for human review: these are LAF dev credentials/attestation values intentionally documented as local-dev defaults, while prod is injected by CI. Moving or removing them changes the Phi Silica dev/prod credential flow, so this should be decided by the feature owners rather than auto-fixed in the sandbox mirror.
This comment has been minimized.
This comment has been minimized.
Preserve custom action provider selections through direct and Advanced AI action paths, fix bool-to-Visibility XAML bindings, and observe redirected child process tasks on timeout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR review owner verdict — NEEDS_HUMAN_REVIEWBuild/test: PASS
Fixes pushed:
Open human escalations / findings:
Copilot convergence: not fully converged. All fix/decline-owned threads were replied/resolved; 1 escalation remains open. Copilot has not posted a review on new HEAD Manual validation checklist:
|
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (85)These words are not needed and should be removedATRIOX Autorun Dedup Gotchas intput MTND NONELEVATED NOTXORPEN nullability pfo ssf TILLSON Unsubscribes Uptool VISEGRADRELAY WKSGTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:yeelam-gordon/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/yeelam-gordon/PowerToys/actions/runs/29162237463/attempts/1' &&
git commit -m 'Update check-spelling metadata'OR To have the bot accept them for you, comment in the PR quoting the following line: Forbidden patterns 🙅 (7)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Articles generally shouldn't be used without a noun and a verb
Should be
|
| ❌ Errors and Notices | Count |
|---|---|
| ℹ️ candidate-pattern | 3 |
| ❌ check-file-path | 4 |
| ❌ forbidden-pattern | 19 |
See ❌ Event descriptions for more information.
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
Review sandbox mirror of microsoft#46727 (branch
gleb/advanced-paste).Opened by PR-autopilot to run Copilot Code Review + local build validation in the fork. Not for merge.