unlimited ai usage for affine

This commit is contained in:
2026-11-07 09:20:23 +00:00
parent 75aaa197aa
commit 84dd1616e7
6 changed files with 583 additions and 3 deletions
+4 -3
View File
@@ -14,7 +14,7 @@
openssl,
inputs,
system,
frontendPatches ? [ ./gitea-document-typography.patch ./byok-model-picker.patch ],
frontendPatches ? [ ./gitea-document-typography.patch ./byok-model-picker.patch ./self-hosted-ai-usage.patch ],
}:
let
@@ -188,11 +188,12 @@ let
cp -R packages/frontend/apps/mobile/dist "$out/mobile"
runHook postInstall
'';
} // lib.optionalAttrs (builtins.elem ./byok-model-picker.patch frontendPatches) {
} // lib.optionalAttrs (builtins.elem ./byok-model-picker.patch frontendPatches || builtins.elem ./self-hosted-ai-usage.patch frontendPatches) {
doCheck = true;
checkPhase = ''
runHook preCheck
AFFINE_SOURCE_DIR="$PWD" ${nodejs}/bin/node ${../../test/package/affine/test/model-picker.cjs}
${lib.optionalString (builtins.elem ./byok-model-picker.patch frontendPatches) ''AFFINE_SOURCE_DIR="$PWD" ${nodejs}/bin/node ${../../test/package/affine/test/model-picker.cjs}''}
${lib.optionalString (builtins.elem ./self-hosted-ai-usage.patch frontendPatches) ''AFFINE_SOURCE_DIR="$PWD" ${nodejs}/bin/node ${../../test/package/affine/test/ai-usage.cjs}''}
runHook postCheck
'';
});