Fix integration tests for claude (#35212)

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga 2025-07-28 13:18:01 -03:00 committed by GitHub
parent 5e2da042ef
commit fd68265efd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 73 additions and 16 deletions

View file

@ -438,7 +438,7 @@ impl ClaudeAgentSession {
}
}
}
SdkMessage::System { .. } => {}
SdkMessage::System { .. } | SdkMessage::ControlResponse { .. } => {}
}
}
@ -642,6 +642,8 @@ enum SdkMessage {
request_id: String,
request: ControlRequest,
},
/// Response to a control request
ControlResponse { response: ControlResponse },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@ -651,6 +653,12 @@ enum ControlRequest {
Interrupt,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct ControlResponse {
request_id: String,
subtype: ResultErrorType,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
enum ResultErrorType {
@ -707,7 +715,7 @@ pub(crate) mod tests {
use super::*;
use serde_json::json;
crate::common_e2e_tests!(ClaudeCode);
crate::common_e2e_tests!(ClaudeCode, allow_option_id = "allow");
pub fn local_command() -> AgentServerCommand {
AgentServerCommand {