mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Restore MCP suppression for replayed reviews
This commit is contained in:
@@ -1242,6 +1242,7 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
fn enter_review_mode_with_hint(&mut self, hint: String, from_replay: bool) {
|
||||
self.skip_mcp_startup_for_review();
|
||||
if self.review.pre_review_token_info.is_none() {
|
||||
self.review.pre_review_token_info = Some(self.token_info.clone());
|
||||
}
|
||||
|
||||
@@ -206,6 +206,23 @@ async fn late_partial_startup_round_after_failed_review_setup_stays_ignored() {
|
||||
assert!(chat.bottom_pane.is_task_running());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn replayed_active_review_rearms_mcp_startup_suppression() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
chat.set_mcp_startup_expected_servers(["alpha".to_string()]);
|
||||
|
||||
replay_entered_review_mode(&mut chat, "current changes");
|
||||
notify_mcp_status(&mut chat, "alpha", McpServerStartupState::Starting);
|
||||
|
||||
assert!(chat.review.is_review_mode);
|
||||
assert!(chat.mcp_startup_status.is_none());
|
||||
|
||||
handle_exited_review_mode(&mut chat);
|
||||
notify_mcp_status(&mut chat, "alpha", McpServerStartupState::Starting);
|
||||
|
||||
assert!(chat.mcp_startup_status.is_some());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn review_command_remains_blocked_during_agent_turn() {
|
||||
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
|
||||
Reference in New Issue
Block a user