huskies: merge 1023

This commit is contained in:
dave
2026-05-14 11:19:15 +00:00
parent 8e996e2bd3
commit c64deca7c2
4 changed files with 263 additions and 17 deletions
+12 -1
View File
@@ -16,9 +16,20 @@ pub(crate) fn tool_get_server_logs(args: &Value) -> Result<String, String> {
let lines_count = args
.get("lines")
.and_then(|v| v.as_u64())
.map(|n| n.min(1000) as usize)
.map(|n| n.min(10_000) as usize)
.unwrap_or(100);
let filter = args.get("filter").and_then(|v| v.as_str());
let from_file = args
.get("from_file")
.and_then(|v| v.as_bool())
.unwrap_or(false);
if from_file {
let offset = args.get("offset").and_then(|v| v.as_u64()).unwrap_or(0) as usize;
let lines = log_buffer::global().read_from_disk(filter, offset, lines_count);
return Ok(lines.join("\n"));
}
let severity = args
.get("severity")
.and_then(|v| v.as_str())