mirror of
https://github.com/openai/codex.git
synced 2026-10-25 23:57:40 +00:00
change collaboration mode to struct (#9793)
Shouldn't cause behavioral change
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::tools::context::ToolPayload;
|
||||
use crate::tools::handlers::parse_arguments;
|
||||
use crate::tools::registry::ToolHandler;
|
||||
use crate::tools::registry::ToolKind;
|
||||
use codex_protocol::config_types::CollaborationMode;
|
||||
use codex_protocol::config_types::ModeKind;
|
||||
use codex_protocol::request_user_input::RequestUserInputArgs;
|
||||
|
||||
pub struct RequestUserInputHandler;
|
||||
@@ -36,9 +36,9 @@ impl ToolHandler for RequestUserInputHandler {
|
||||
}
|
||||
};
|
||||
|
||||
let disallowed_mode = match session.collaboration_mode().await {
|
||||
CollaborationMode::Execute(_) => Some("Execute"),
|
||||
CollaborationMode::Custom(_) => Some("Custom"),
|
||||
let disallowed_mode = match session.collaboration_mode().await.mode {
|
||||
ModeKind::Execute => Some("Execute"),
|
||||
ModeKind::Custom => Some("Custom"),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(mode_name) = disallowed_mode {
|
||||
|
||||
Reference in New Issue
Block a user