refactor(assistant): resolve availability through the existing endpoint

Drops the feature-flags module, the /api/features endpoint and its test in
favour of calling api.assistant.getAvailability() from the root layout, the
same way the layout already calls api.user.getById().

The gate only needs one server-resolved boolean, and getAvailability
already computes exactly that. The separate helper duplicated the enabled /
modelId / api-key-required rule, so the two copies could drift.

A general feature-flag surface is still worth having, but it belongs at
boot time across every optional feature rather than as a per-request
database read introduced alongside the assistant.
This commit is contained in:
Thomas Camlong committed 2026-08-07 17:59:51 +02:00
1 parent f25be7cf1c
commit 7276bdad21
5 files changed
+9 -128

No files matched your search

-1
View File
@@ -15,7 +15,6 @@
"./shared": "./src/shared.ts",
"./open-api": "./src/open-api.ts",
"./assistant": "./src/assistant.ts",
"./features": "./src/features.ts",
"./custom-widget/display-data": "./src/router/custom-widget/display-data.ts",
"./mcp": "./src/mcp.ts"
},