mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
fix: carry weather and fire freshness into tool answers
get_weather dropped the proxy's stale status and get_active_fires dropped FIRMS staleness and failed satellite sources, so answers and the HUD caption read them as current. Both now report them, and the caption context marks such sections stale or degraded.
This commit is contained in:
1 parent
dd8ba562d2
commit
56f0d2e203
4 files changed
+80
-6
No files matched your search
@@ -104,9 +104,18 @@ export const getWeather = defineTool({
|
||||
signal,
|
||||
});
|
||||
const row = weatherRow(payload?.weather);
|
||||
// The proxy answers from its cache, marked stale, when a refresh fails.
|
||||
const stale = payload?.status === 'stale';
|
||||
return {
|
||||
summary: `Weather at ${point.label}: ${describeWeather(row)}.`,
|
||||
data: { location: point, weather: row },
|
||||
summary:
|
||||
`Weather at ${point.label}: ${describeWeather(row)}` +
|
||||
(stale ? ' (data may be stale).' : '.'),
|
||||
data: {
|
||||
location: point,
|
||||
weather: row,
|
||||
stale,
|
||||
retrieved_at: payload?.retrievedAt ?? null,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user