Coach auf dem Handy: ueber den gepaarten Server, oder mit eigenem API-Key
Einstellungen → KI-Coach hat zwei Antworten. Ein gepaartes Handy ist ein normales Profil und nimmt die Web-Regel — der Server rechnet mit dem Provider, den sein Admin eingerichtet hat. Ein Handy mit eigenem Key laesst dieselbe Pipeline (api/coach/core) lokal laufen: Payload, Prompt, HTTPS-Adapter, Parser, Validator, eine Reparaturrunde; der Key liegt im sicheren Speicher (Keychain/Keystore), nie in S. Nichts davon wird geladen, bevor ein Modus gewaehlt ist — coach-local ist ein eigener Lazy-Chunk (156 KB), und CoachSetup importiert aus dem Kern nur die Provider-Tabelle und fuenf Kategorienamen. Provider-Aufrufe gehen ueber CapacitorHttp statt durch die WebView (kein CORS), und zwar als expliziter Shim, damit die api()-Aufrufe eines gepaarten Handys unberuehrt bleiben. Ein lokales Tageslimit, weil hier der Nutzer zahlt. 33 neue Strings in zwoelf Packs.
This commit is contained in:
1 parent
7047346da1
commit
1986a507b0
35 files changed
+1254
-56
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/* The data categories the consent screen names (FR-09/10).
|
||||
*
|
||||
* Its own tiny module so a screen that only needs to *say* what would leave — the mobile setup
|
||||
* screen, before anything AI-related has been loaded — can import five strings without pulling
|
||||
* the payload builder and the exercise catalogue behind it. payload.js re-exports it, and
|
||||
* builds from it, so the screen cannot drift from the payload. */
|
||||
export const DATA_CATEGORIES = Object.freeze([
|
||||
'plan', // routines, exercises, sets/reps, schedule, progression settings
|
||||
'training', // logged sets, targets, effort ratings, durations, PRs in the review window
|
||||
'bodyweight', // weigh-ins in the window and your goal weight
|
||||
'profile', // the intake answers you gave the Coach, including any limitations
|
||||
'prefs' // unit, language, effort scale
|
||||
]);
|
||||
@@ -21,13 +21,7 @@ export const MAX_SESSIONS = 60;
|
||||
/* ---------- the data categories the consent screen names (FR-09/10) ----------
|
||||
Kept here, next to the code that acts on it, and rendered by the consent UI from the same
|
||||
list — a screen that drifts from the payload is worse than no screen. */
|
||||
export const DATA_CATEGORIES = [
|
||||
'plan', // routines, exercises, sets/reps, schedule, progression settings
|
||||
'training', // logged sets, targets, effort ratings, durations, PRs in the review window
|
||||
'bodyweight', // weigh-ins in the window and your goal weight
|
||||
'profile', // the intake answers you gave the Coach, including any limitations
|
||||
'prefs' // unit, language, effort scale
|
||||
];
|
||||
export { DATA_CATEGORIES } from './categories.js';
|
||||
|
||||
/* ---------- reading a session the way the engine reads it ----------
|
||||
Duplicated from frontend/src/lib/history.js rather than shared: the two runtimes have no
|
||||
|
||||
Reference in new issue
Block a user