Skip to content

Commit 07b4376

Browse files
authored
Merge pull request #469 from mediar-ai/pr/await-notifications
fix: await notification calls in execute_sequence
2 parents ff69bf7 + f75479f commit 07b4376

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

crates/terminator-mcp-agent/src/server_sequence.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,20 +1201,22 @@ impl DesktopWrapper {
12011201
"total": total_steps,
12021202
"name": step_name.clone().unwrap_or_else(|| format!("Step {}", current_index + 1)),
12031203
}),
1204-
});
1204+
}).await;
12051205
// Also send progress notification for clients that support it
12061206
if let Some(token) = &client_progress_token {
1207-
let _ = peer.notify_progress(ProgressNotificationParam {
1208-
progress_token: token.clone(),
1209-
progress: (current_index + 1) as f64,
1210-
total: Some(total_steps as f64),
1211-
message: Some(format!(
1212-
"Step {} of {}: {}",
1213-
current_index + 1,
1214-
total_steps,
1215-
step_name.unwrap_or_else(|| format!("Step {}", current_index + 1))
1216-
)),
1217-
});
1207+
let _ = peer
1208+
.notify_progress(ProgressNotificationParam {
1209+
progress_token: token.clone(),
1210+
progress: (current_index + 1) as f64,
1211+
total: Some(total_steps as f64),
1212+
message: Some(format!(
1213+
"Step {} of {}: {}",
1214+
current_index + 1,
1215+
total_steps,
1216+
step_name.unwrap_or_else(|| format!("Step {}", current_index + 1))
1217+
)),
1218+
})
1219+
.await;
12181220
}
12191221

12201222
// 2. Execute with retries

0 commit comments

Comments
 (0)