File tree Expand file tree Collapse file tree
settings-ui/Settings.UI.Library Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ extends:
102102 useManagedIdentity : $(SigningUseManagedIdentity)
103103 clientId : $(SigningOriginalClientId)
104104 # Have msbuild use the release nuget config profile
105- additionalBuildOptions : /p:RestoreConfigFile="$(Build.SourcesDirectory)\.pipelines\release-nuget.config" /p:EnableCmdPalAOT=true
105+ additionalBuildOptions : /p:RestoreConfigFile="$(Build.SourcesDirectory)\.pipelines\release-nuget.config" /p:EnableCmdPalAOT=true /p:PhiSilicaLafToken=$(PhiSilicaLafToken) /p:PhiSilicaLafAttestation="$(PhiSilicaLafAttestation)"
106106 beforeBuildSteps :
107107 # Sets versions for all PowerToy created DLLs
108108 - pwsh : |-
Original file line number Diff line number Diff line change 33 <RepoRoot >$(MSBuildThisFileDirectory)</RepoRoot >
44 </PropertyGroup >
55 <Import Project =" $(RepoRoot)src\Version.props" />
6+ <Import Project =" $(RepoRoot)src\PhiSilicaLaf.props" />
67 <PropertyGroup >
78 <Copyright >Copyright (C) Microsoft Corporation. All rights reserved.</Copyright >
89 <AssemblyCopyright >Copyright (C) Microsoft Corporation. All rights reserved.</AssemblyCopyright >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <Project ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+ <PropertyGroup >
4+ <!-- Phi Silica Limited Access Feature credentials.
5+ Local dev defaults below; overridden by /p: in release pipelines. -->
6+ <PhiSilicaLafToken Condition =" '$(PhiSilicaLafToken)'==''" >RmToMMYJHZkQSrKP5lWesA==</PhiSilicaLafToken >
7+ <PhiSilicaLafAttestation Condition =" '$(PhiSilicaLafAttestation)'==''" >djwsxzxb4ksa8 has registered their use of com.microsoft.windows.ai.languagemodel with Microsoft and agrees to the terms of use.</PhiSilicaLafAttestation >
8+ </PropertyGroup >
9+ </Project >
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library;
1111public static class PhiSilicaLafHelper
1212{
1313 private const string FeatureId = "com.microsoft.windows.ai.languagemodel" ;
14- private const string Token = "RmToMMYJHZkQSrKP5lWesA==" ;
15- private const string Attestation = "djwsxzxb4ksa8 has registered their use of com.microsoft.windows.ai.languagemodel with Microsoft and agrees to the terms of use." ;
1614
1715 private static readonly object _lock = new ( ) ;
1816 private static bool _attempted ;
@@ -38,8 +36,8 @@ public static bool TryUnlock()
3836 {
3937 var access = LimitedAccessFeatures . TryUnlockFeature (
4038 FeatureId ,
41- Token ,
42- Attestation ) ;
39+ PhiSilicaLafCredentials . Token ,
40+ PhiSilicaLafCredentials . Attestation ) ;
4341
4442 _unlocked = access . Status == LimitedAccessFeatureStatus . Available
4543 || access . Status == LimitedAccessFeatureStatus . AvailableWithoutToken ;
Original file line number Diff line number Diff line change 4242 </EmbeddedResource >
4343 </ItemGroup >
4444
45+ <!-- Generate PhiSilicaLafCredentials.g.cs from MSBuild properties (overridable via /p: in release pipelines) -->
46+ <Target Name =" GeneratePhiSilicaLafCredentials" BeforeTargets =" BeforeCompile;CoreCompile" Inputs =" $(MSBuildProjectFile)" Outputs =" $(IntermediateOutputPath)PhiSilicaLafCredentials.g.cs" >
47+ <PropertyGroup >
48+ <PhiSilicaLafCredentialsPath >$(IntermediateOutputPath)PhiSilicaLafCredentials.g.cs</PhiSilicaLafCredentialsPath >
49+ </PropertyGroup >
50+ <WriteLinesToFile File =" $(PhiSilicaLafCredentialsPath)" Overwrite =" true" Lines =" // < auto-generated/> namespace Microsoft.PowerToys.Settings.UI.Library%3B internal static class PhiSilicaLafCredentials { internal const string Token = " $(PhiSilicaLafToken)" %3B internal const string Attestation = " $(PhiSilicaLafAttestation)" %3B }" />
51+ <ItemGroup >
52+ <Compile Include =" $(PhiSilicaLafCredentialsPath)" Condition =" !@(Compile->AnyHaveMetadataValue('Identity', '$(PhiSilicaLafCredentialsPath)'))" />
53+ </ItemGroup >
54+ </Target >
55+
4556</Project >
You can’t perform that action at this time.
0 commit comments