use anyhow::Result;
use expect_test::expect;
use sacp::DynComponent;
use sacp_conductor::Conductor;
use symposium_crate_sources_proxy::CrateSourcesProxy;
#[tokio::test]
async fn test_rust_crate_query_with_elizacp() -> Result<()> {
let _ = tracing_subscriber::fmt()
.with_test_writer()
.with_env_filter(
tracing_subscriber::EnvFilter::from_default_env()
.add_directive(tracing::Level::DEBUG.into()),
)
.try_init();
let proxy = CrateSourcesProxy;
let response = yopo::prompt(
Conductor::new(
"test-conductor".to_string(),
vec![
DynComponent::new(proxy),
DynComponent::new(elizacp::ElizaAgent::new()),
],
Default::default(),
),
r#"Use tool rust-crate-query::rust_crate_query with {"crate_name":"serde","prompt":"What is the signature of from_value?"}"#,
)
.await?;
expect![[r#"Hello. How are you feeling today?OK: CallToolResult { content: [Annotated { raw: Text(RawTextContent { text: "{\"result\":[]}", meta: None }), annotations: None }], structured_content: Some(Object {"result": Array []}), is_error: Some(false), meta: None }"#]].assert_eq(&response);
Ok(())
}