cargo fmt
This commit is contained in:
@@ -197,10 +197,7 @@ impl ClaudeApi {
|
||||
|
||||
// Get tools from the executor if still alive
|
||||
let executor = self.tool_executor.upgrade();
|
||||
let tools = executor
|
||||
.as_ref()
|
||||
.map(|te| te.tools())
|
||||
.unwrap_or_default();
|
||||
let tools = executor.as_ref().map(|te| te.tools()).unwrap_or_default();
|
||||
let mut messages = vec![MessageContent::user(prompt)];
|
||||
|
||||
info!("Claude request: {}", prompt);
|
||||
|
||||
@@ -22,7 +22,10 @@ use http::{Method, Request, Response, StatusCode};
|
||||
use http_body::Body;
|
||||
use http_body_util::BodyExt;
|
||||
use prometheus_http_client::{AlertStatus, ExtractLabels};
|
||||
use std::{fmt::Write, net::SocketAddr, path::PathBuf, sync::Arc, sync::Mutex, sync::OnceLock, sync::Weak, time::Duration};
|
||||
use std::{
|
||||
fmt::Write, net::SocketAddr, path::PathBuf, sync::Arc, sync::Mutex, sync::OnceLock, sync::Weak,
|
||||
time::Duration,
|
||||
};
|
||||
use tokio::{
|
||||
join,
|
||||
sync::mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel},
|
||||
|
||||
@@ -479,10 +479,9 @@ mod tests {
|
||||
#[test]
|
||||
fn test_log_filter_combined() {
|
||||
// msg_contains AND module_equals must both match
|
||||
let filter: LogFilter = serde_json::from_str(
|
||||
r#"{"msg_contains": "error", "module_equals": "test::module"}"#,
|
||||
)
|
||||
.unwrap();
|
||||
let filter: LogFilter =
|
||||
serde_json::from_str(r#"{"msg_contains": "error", "module_equals": "test::module"}"#)
|
||||
.unwrap();
|
||||
assert!(filter.matches(&make_log_msg("an error occurred")));
|
||||
|
||||
// Wrong module
|
||||
|
||||
Reference in New Issue
Block a user