chore: cargo fmt --all — clean up research.rs formatting
This commit is contained in:
@@ -111,8 +111,7 @@ pub async fn list_topics(
|
||||
State(state): State<AppState>,
|
||||
Authed(user): Authed,
|
||||
) -> Result<Json<Vec<TopicListItem>>, ApiError> {
|
||||
let rows =
|
||||
cm_db::repo::research_topics::list(&state.pool, user.workspace_id.as_uuid()).await?;
|
||||
let rows = cm_db::repo::research_topics::list(&state.pool, user.workspace_id.as_uuid()).await?;
|
||||
Ok(Json(
|
||||
rows.into_iter()
|
||||
.map(|t| TopicListItem {
|
||||
@@ -296,9 +295,7 @@ pub async fn refine_wizard(
|
||||
system: REFINE_SYSTEM.into(),
|
||||
messages: vec![ChatMessage {
|
||||
role: ChatRole::User,
|
||||
parts: vec![ContentPart::Text {
|
||||
text: user_message,
|
||||
}],
|
||||
parts: vec![ContentPart::Text { text: user_message }],
|
||||
}],
|
||||
tools: Vec::new(),
|
||||
model: state.runtime.model().to_string(),
|
||||
@@ -307,7 +304,10 @@ pub async fn refine_wizard(
|
||||
};
|
||||
|
||||
let provider = state.runtime.provider();
|
||||
let mut stream = provider.stream(request).await.map_err(|_| ApiError::Internal)?;
|
||||
let mut stream = provider
|
||||
.stream(request)
|
||||
.await
|
||||
.map_err(|_| ApiError::Internal)?;
|
||||
let mut buf = String::new();
|
||||
while let Some(event) = stream.next().await {
|
||||
match event.map_err(|_| ApiError::Internal)? {
|
||||
|
||||
Reference in New Issue
Block a user