mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix: report stale and partial data in more tool answers
A sweep for the same pattern found more answers presented as current and complete: launches and satellite orbits served from a stale proxy cache, a regional aircraft fallback read as worldwide, license plate cameras trimmed or partly loaded, and a radio directory of popular stations read as every station. The launch and satellite sources now report the proxies' stale markers, and each answer says what it covers.
This commit is contained in:
1 parent
6a45a8f6a2
commit
e779432925
10 files changed
+185
-25
No files matched your search
@@ -116,7 +116,8 @@ export const findRadioStations = defineTool({
|
||||
name: 'find_radio_stations',
|
||||
title: 'Radio stations',
|
||||
description:
|
||||
'Internet radio stations from the Radio Browser directory, by area and/or ' +
|
||||
'Internet radio stations from a directory of popular Radio Browser ' +
|
||||
'stations, not every station, by area and/or ' +
|
||||
'a search term matched against name, tags, language and country. Each ' +
|
||||
"result includes the broadcaster's public stream URL.",
|
||||
inputSchema: {
|
||||
@@ -186,9 +187,20 @@ export const findRadioStations = defineTool({
|
||||
if (center) rows.sort((a, b) => a.distance_km - b.distance_km);
|
||||
const where = area ? ` in ${area.label}` : '';
|
||||
const what = args.query ? ` matching "${args.query}"` : '';
|
||||
// The directory is a selection of popular stations, not every station.
|
||||
const notes = [
|
||||
`from a directory of ${directory.stations.length} popular stations`,
|
||||
...(directory.stale ? ['the directory may be stale'] : []),
|
||||
...(directory.degraded ? ['the directory is incomplete right now'] : []),
|
||||
];
|
||||
return {
|
||||
summary: `${countNoun(rows.length, 'radio station')}${what}${where}.`,
|
||||
data: capRows(rows, args.limit),
|
||||
summary: `${countNoun(rows.length, 'radio station')}${what}${where} (${notes.join('; ')}).`,
|
||||
data: {
|
||||
...capRows(rows, args.limit),
|
||||
directory_size: directory.stations.length,
|
||||
stale: directory.stale === true,
|
||||
degraded: directory.degraded === true,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user