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
Copy file name to clipboardExpand all lines: workers/src/orchestrate.ts
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1372,13 +1372,18 @@ async function runSearch(
1372
1372
: undefined;
1373
1373
1374
1374
if(hits.length===0){
1375
+
constnoMatchResult: Record<string,unknown>={
1376
+
status: "NO_MATCH",
1377
+
docs_considered: index.entries.length,
1378
+
hits: [],
1379
+
};
1380
+
if(resolvedGrouping==="grouped"){
1381
+
noMatchResult.overlay_hits=[];
1382
+
noMatchResult.baseline_hits=[];
1383
+
}
1375
1384
return{
1376
1385
action: "search",
1377
-
result: {
1378
-
status: "NO_MATCH",
1379
-
docs_considered: index.entries.length,
1380
-
hits: [],
1381
-
},
1386
+
result: noMatchResult,
1382
1387
state: updatedState,
1383
1388
assistant_text: `Searched ${index.stats.total} documents but found no matches for "${input}". Try rephrasing or ask with action "catalog" to see available documentation.`,
0 commit comments