agent_ui: Route agent thread feedback through Cloud (#49324)

This PR updates the `Agent Thread Rated` event to be routed through
Cloud instead of the normal telemetry pipeline.

Closes CLO-223.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2026-02-17 11:41:30 -05:00
committed by GitHub
parent aaea63cf7c
commit 9e02da90cf
5 changed files with 57 additions and 7 deletions
@@ -181,6 +181,31 @@ impl CloudApiClient {
}
}
}
pub async fn submit_agent_feedback(&self, body: SubmitAgentThreadFeedbackBody) -> Result<()> {
let request = self.build_request(
Request::builder().method(Method::POST).uri(
self.http_client
.build_zed_cloud_url("/client/feedback/agent_thread")?
.as_ref(),
),
AsyncBody::from(serde_json::to_string(&body)?),
)?;
let mut response = self.http_client.send(request).await?;
if !response.status().is_success() {
let mut body = String::new();
response.body_mut().read_to_string(&mut body).await?;
anyhow::bail!(
"Failed to submit agent feedback.\nStatus: {:?}\nBody: {body}",
response.status()
)
}
Ok(())
}
}
fn build_request(