Skip to content

Commit 4ad3779

Browse files
committed
Remove artificial search result limits
- Remove .take() limit on search results display - Let knowledge base handle its own result limits - Show all results returned by the KB search
1 parent 8ff0ffa commit 4ad3779

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/chat-cli/src/cli/chat/tools/resource.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,16 +342,13 @@ impl Resource {
342342
"No matching indexed resources found.".to_string()
343343
} else {
344344
let mut output = format!("Found {} matching indexed resources:\n", results.len());
345-
for result in results.iter().take(20) {
345+
for result in results.iter() {
346346
// Get full content from payload
347347
let content = result.point.payload.get("content")
348348
.and_then(|v| v.as_str())
349349
.unwrap_or("No content available");
350350
output.push_str(&format!("- {} (distance: {:.2})\n", content, result.distance));
351351
}
352-
if results.len() > 20 {
353-
output.push_str(&format!("... and {} more results\n", results.len() - 20));
354-
}
355352
output
356353
}
357354
},

0 commit comments

Comments
 (0)