Advanced Paste additional customizations and PhiSilica provider - #46727
Advanced Paste additional customizations and PhiSilica provider#46727Gleb Khmyznikov (khmyznikov) wants to merge 109 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (1)SCL Some files were automatically ignored 🙈These sample patterns would exclude them: You should consider adding them to: File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use To accept these unrecognized words as correct and update file exclusions, you could run the following commands... in a clone of the git@github.com:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/27480011503/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 🙅 (1)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: Should be
|
| ❌ Errors and Warnings | Count |
|---|---|
| 1 | |
| 2 | |
| ❌ forbidden-pattern | 1 |
| 1 |
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.
_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>
Muyuan Li (MuyuanMS)
left a comment
There was a problem hiding this comment.
Review findings for the current head. Two comments include directly applicable suggestions.
|
Muyuan Li (@MuyuanMS) thanks for a review 😊 |
Summary
Adds an on-device Phi Silica (Windows AI) paste provider to Advanced Paste and richer
per-action customization, plus the package-identity plumbing that lets the unpackaged
Advanced Paste app use Windows AI APIs.
Advanced Paste features
CustomActions/PhiSilicaPasteProvider.cs): an on-deviceAI provider backed by the Windows AI Phi Silica language model — no cloud endpoint or API
key required. Registered as a new
AIServiceTypeviaPasteAIProviderFactory/AIServiceTypeRegistry.AdvancedPasteAdditionalAction): user-defined actions withtheir own prompt, system prompt, AI provider, and shortcut — plus an optional "coaching"
prompt/system-prompt/provider/shortcut and shortcut-conflict detection.
AdvancedPasteDefaultPrompts) and updates toAdvancedPasteCustomAction,PasteFormat(s),OptionsViewModel, andPasteFormatExecutorto support per-action provider selection and system prompts.AdvancedPastePage.xaml/.xaml.cs,Resources.resw): configure thePhi Silica provider, choose a provider per action, edit system/coaching prompts, and a
Phi Silica availability/readiness experience — Settings queries the Advanced Paste
executable via
--check-phi-silica, and a "Download model" action triggers--prepare-phi-silicato fetch the model and then re-probes.Package identity for Windows AI (replaces the MSIX-install approach)
with a registered package identity. Advanced Paste runs unpackaged, so it obtains
identity from the existing
Microsoft.PowerToys.SparseAppsparse package(
src/PackageIdentity/): a new<Application Id="PowerToys.AdvancedPasteUI">entry inAppxManifest.xmlmaps it toPowerToys.AdvancedPaste.exe, with matching updates toBuildSparsePackage.ps1.PhiSilicaLafHelper.cs. The token/attestation are baked atbuild time by the
GeneratePhiSilicaLafCredentialsMSBuild target intoPhiSilicaLafCredentials.g.cs— local dev defaults live insrc/PhiSilicaLaf.props(imported from
Directory.Build.props) and the production secret is injected via/p:in the release pipeline.AdvancedPaste.dev.manifest/AdvancedPaste.prod.manifestapplication manifests(selected by
CIBuild) declaring full-trust and the system AI models capability.Build & pipeline
2.2.0line and addedMicrosoft.WindowsAppSDK.AI2.2.3(the Phi Silica APIs). Foundation2.1.0carries thesparse-identity PRI fix, and the stable AI build matches the OS Windows AI runtime.
src/modules/AdvancedPaste/custom.props,XES one-store versioning,
AdvancedPasteVersion). Asteps-setup-versioning.ymlstep isadded for Advanced Paste in
job-build-project.yml, ordered before CmdPal to avoid aversion-collision installer failure (WIX0103).
release.ymlpassesPhiSilicaLafToken/PhiSilicaLafAttestationinto the main build;spell-check allow-list/patterns updated.
Microsoft.Windows.Compatibilityreference and theCommon.UI"force matching DLL versions" hack.Video clip internal
Build internal