mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
chore(format): prettier sweep across develop
Mostly table column normalisation under docs/audit/ + planning, object- literal expansion in src/lib/ai/coach/snapshot.ts after the W4 F6 Apple Health metric block landed, and small wrap/unwrap line adjustments in the device + APNs routes / tests touched across W3/W4/W5 sessions. No behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5dcd3954a0
commit
f1e6630958
70 files changed
+899
-660
No files matched your search
@@ -52,7 +52,9 @@ describe("getStrictInsightsSystemPrompt — EN", () => {
|
||||
});
|
||||
|
||||
it("documents the additive sourceMetric tokens in the OUTPUT FORMAT", () => {
|
||||
expect(prompt).toMatch(/hrv \| sleep \| resting_hr \| steps \| active_energy/);
|
||||
expect(prompt).toMatch(
|
||||
/hrv \| sleep \| resting_hr \| steps \| active_energy/,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -70,6 +72,8 @@ describe("getStrictInsightsSystemPrompt — DE", () => {
|
||||
});
|
||||
|
||||
it("documents the additive sourceMetric tokens in the German OUTPUT FORMAT", () => {
|
||||
expect(prompt).toMatch(/hrv \| sleep \| resting_hr \| steps \| active_energy/);
|
||||
expect(prompt).toMatch(
|
||||
/hrv \| sleep \| resting_hr \| steps \| active_energy/,
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -523,15 +523,60 @@ export async function buildCoachSnapshot(
|
||||
// Apple Health source maps to exactly one MeasurementType (BP is
|
||||
// the only fan-out and lives in its own legacy block above).
|
||||
const appleHealthBlocks: AppleHealthBlock[] = [
|
||||
{ metric: "hrv", snapshotKey: "heartRateVariability", type: "HEART_RATE_VARIABILITY", enabled: sources.has("hrv") },
|
||||
{ metric: "sleep", snapshotKey: "sleep", type: "SLEEP_DURATION", enabled: sources.has("sleep") },
|
||||
{ metric: "resting_hr", snapshotKey: "restingHeartRate", type: "RESTING_HEART_RATE", enabled: sources.has("resting_hr") },
|
||||
{ metric: "steps", snapshotKey: "steps", type: "ACTIVITY_STEPS", enabled: sources.has("steps") },
|
||||
{ metric: "active_energy", snapshotKey: "activeEnergy", type: "ACTIVE_ENERGY_BURNED", enabled: sources.has("active_energy") },
|
||||
{ metric: "flights", snapshotKey: "flightsClimbed", type: "FLIGHTS_CLIMBED", enabled: sources.has("flights") },
|
||||
{ metric: "distance", snapshotKey: "walkingRunningDistance", type: "WALKING_RUNNING_DISTANCE", enabled: sources.has("distance") },
|
||||
{ metric: "vo2_max", snapshotKey: "vo2Max", type: "VO2_MAX", enabled: sources.has("vo2_max") },
|
||||
{ metric: "body_temp", snapshotKey: "bodyTemperature", type: "BODY_TEMPERATURE", enabled: sources.has("body_temp") },
|
||||
{
|
||||
metric: "hrv",
|
||||
snapshotKey: "heartRateVariability",
|
||||
type: "HEART_RATE_VARIABILITY",
|
||||
enabled: sources.has("hrv"),
|
||||
},
|
||||
{
|
||||
metric: "sleep",
|
||||
snapshotKey: "sleep",
|
||||
type: "SLEEP_DURATION",
|
||||
enabled: sources.has("sleep"),
|
||||
},
|
||||
{
|
||||
metric: "resting_hr",
|
||||
snapshotKey: "restingHeartRate",
|
||||
type: "RESTING_HEART_RATE",
|
||||
enabled: sources.has("resting_hr"),
|
||||
},
|
||||
{
|
||||
metric: "steps",
|
||||
snapshotKey: "steps",
|
||||
type: "ACTIVITY_STEPS",
|
||||
enabled: sources.has("steps"),
|
||||
},
|
||||
{
|
||||
metric: "active_energy",
|
||||
snapshotKey: "activeEnergy",
|
||||
type: "ACTIVE_ENERGY_BURNED",
|
||||
enabled: sources.has("active_energy"),
|
||||
},
|
||||
{
|
||||
metric: "flights",
|
||||
snapshotKey: "flightsClimbed",
|
||||
type: "FLIGHTS_CLIMBED",
|
||||
enabled: sources.has("flights"),
|
||||
},
|
||||
{
|
||||
metric: "distance",
|
||||
snapshotKey: "walkingRunningDistance",
|
||||
type: "WALKING_RUNNING_DISTANCE",
|
||||
enabled: sources.has("distance"),
|
||||
},
|
||||
{
|
||||
metric: "vo2_max",
|
||||
snapshotKey: "vo2Max",
|
||||
type: "VO2_MAX",
|
||||
enabled: sources.has("vo2_max"),
|
||||
},
|
||||
{
|
||||
metric: "body_temp",
|
||||
snapshotKey: "bodyTemperature",
|
||||
type: "BODY_TEMPERATURE",
|
||||
enabled: sources.has("body_temp"),
|
||||
},
|
||||
];
|
||||
for (const block of appleHealthBlocks) {
|
||||
if (!block.enabled) continue;
|
||||
|
||||
Reference in new issue
Block a user