codex: fix CI failure on PR #20824

This commit is contained in:
Ahmed Ibrahim
2026-05-03 03:10:45 +03:00
parent 5e65baf411
commit c765487b6d
4 changed files with 9 additions and 4 deletions

View File

@@ -54,6 +54,12 @@ pub(crate) enum SlashCommandAction {
ServiceTier(ServiceTierCommand),
}
impl From<SlashCommand> for SlashCommandAction {
fn from(command: SlashCommand) -> Self {
Self::Builtin(command)
}
}
pub(crate) fn command_name(action: &SlashCommandAction) -> &str {
match action {
SlashCommandAction::Builtin(command) => command.command(),

View File

@@ -111,7 +111,8 @@ impl ChatWidget {
self.request_side_conversation(parent_thread_id, /*user_message*/ None);
}
pub(super) fn dispatch_command(&mut self, cmd: SlashCommandAction) {
pub(super) fn dispatch_command(&mut self, cmd: impl Into<SlashCommandAction>) {
let cmd = cmd.into();
if !self.ensure_slash_command_allowed_in_side_conversation(&cmd) {
return;
}

View File

@@ -148,8 +148,6 @@ pub(super) use codex_protocol::approvals::GuardianUserAuthorization;
pub(super) use codex_protocol::config_types::CollaborationMode;
pub(super) use codex_protocol::config_types::ModeKind;
pub(super) use codex_protocol::config_types::Personality;
pub(super) use codex_protocol::config_types::SERVICE_TIER_PRIORITY;
pub(super) use codex_protocol::config_types::ServiceTier;
pub(super) use codex_protocol::config_types::Settings;
pub(super) use codex_protocol::models::FileSystemPermissions;
pub(super) use codex_protocol::models::MessagePhase;

View File

@@ -182,7 +182,7 @@ pub(super) async fn make_chatwidget_manual(
};
let current_collaboration_mode = base_mode;
let active_collaboration_mask = collaboration_modes::default_mask(model_catalog.as_ref());
let effective_service_tier = cfg.service_tier;
let effective_service_tier = cfg.service_tier.clone();
let mut widget = ChatWidget {
app_event_tx,
codex_op_target: super::CodexOpTarget::Direct(op_tx),