You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(cache,search): address PR review findings
- cache: normalize cleanupIntervalMs (NaN/<=0 -> 60s default) so a bad value
can't create a hot-loop cleanup interval
- cache: purge expired entries before LFU eviction so a stale-but-frequently-hit
entry can no longer survive over a fresh valid one
- search: build the /config-unavailable warning/note from the filters actually
supplied, so a categories-only or engines-only call no longer names both
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
constunavailableWarning=`${unavailableFilterLabel[0].toUpperCase()}${unavailableFilterLabel.slice(1)} were not validated or normalized because SearXNG /config is unavailable.`;
143
+
constunavailableNote=`Note: ${unavailableFilterLabel} were not validated or normalized (SearXNG /config unavailable).`;
144
+
139
145
letknownCategories: Set<string>|null|undefined;
140
146
letknownEngines: Set<string>|null|undefined;
141
147
@@ -145,7 +151,8 @@ async function normalizeSearchFilters(
145
151
return{
146
152
categories: effectiveCategories,
147
153
engines: effectiveEngines,
148
-
validationWarning: FILTER_VALIDATION_WARNING,
154
+
validationWarning: unavailableWarning,
155
+
validationNote: unavailableNote,
149
156
};
150
157
}
151
158
}
@@ -156,7 +163,8 @@ async function normalizeSearchFilters(
156
163
return{
157
164
categories: effectiveCategories,
158
165
engines: effectiveEngines,
159
-
validationWarning: FILTER_VALIDATION_WARNING,
166
+
validationWarning: unavailableWarning,
167
+
validationNote: unavailableNote,
160
168
};
161
169
}
162
170
}
@@ -185,7 +193,8 @@ async function normalizeSearchFilters(
185
193
return{
186
194
categories: effectiveCategories,
187
195
engines: effectiveEngines,
188
-
validationWarning: FILTER_VALIDATION_WARNING,
196
+
validationWarning: unavailableWarning,
197
+
validationNote: unavailableNote,
189
198
};
190
199
}
191
200
@@ -455,7 +464,7 @@ export async function performWebSearch(
0 commit comments