mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Revert "Option to Notify Workspace Owner When Usage Limit is Reached" (#17391)
Reverts openai/codex#16969 #sev3-2026-04-10-accountscheckversion-500s-for-openai-workspace-7300
This commit is contained in:
committed by
GitHub
Unverified
parent
a3be74143a
commit
930e5adb7e
@@ -4796,10 +4796,6 @@ async fn submission_loop(sess: Arc<Session>, config: Arc<Config>, rx_sub: Receiv
|
||||
handlers::set_thread_name(&sess, sub.id.clone(), name).await;
|
||||
false
|
||||
}
|
||||
Op::SendAddCreditsNudgeEmail => {
|
||||
handlers::send_add_credits_nudge_email(&sess, &config, sub.id.clone()).await;
|
||||
false
|
||||
}
|
||||
Op::RunUserShellCommand { command } => {
|
||||
handlers::run_user_shell_command(&sess, sub.id.clone(), command).await;
|
||||
false
|
||||
@@ -4896,8 +4892,6 @@ mod handlers {
|
||||
use crate::tasks::execute_user_shell_command;
|
||||
use codex_mcp::collect_mcp_snapshot_from_manager;
|
||||
use codex_mcp::compute_auth_statuses;
|
||||
use codex_protocol::protocol::AddCreditsNudgeEmailResponseEvent;
|
||||
use codex_protocol::protocol::AddCreditsNudgeEmailStatus;
|
||||
use codex_protocol::protocol::CodexErrorInfo;
|
||||
use codex_protocol::protocol::ErrorEvent;
|
||||
use codex_protocol::protocol::Event;
|
||||
@@ -4942,48 +4936,6 @@ mod handlers {
|
||||
sess.close_unified_exec_processes().await;
|
||||
}
|
||||
|
||||
pub async fn send_add_credits_nudge_email(
|
||||
sess: &Arc<Session>,
|
||||
config: &Config,
|
||||
sub_id: String,
|
||||
) {
|
||||
match crate::send_add_credits_nudge_email(config, &sess.services.auth_manager).await {
|
||||
Ok(status) => {
|
||||
sess.send_event_raw(Event {
|
||||
id: sub_id,
|
||||
msg: EventMsg::AddCreditsNudgeEmailResponse(
|
||||
AddCreditsNudgeEmailResponseEvent {
|
||||
result: Ok(add_credits_nudge_email_status_to_event(status)),
|
||||
},
|
||||
),
|
||||
})
|
||||
.await;
|
||||
}
|
||||
Err(err) => {
|
||||
sess.send_event_raw(Event {
|
||||
id: sub_id,
|
||||
msg: EventMsg::AddCreditsNudgeEmailResponse(
|
||||
AddCreditsNudgeEmailResponseEvent {
|
||||
result: Err(err.to_string()),
|
||||
},
|
||||
),
|
||||
})
|
||||
.await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn add_credits_nudge_email_status_to_event(
|
||||
status: crate::AddCreditsNudgeEmailStatus,
|
||||
) -> AddCreditsNudgeEmailStatus {
|
||||
match status {
|
||||
crate::AddCreditsNudgeEmailStatus::Sent => AddCreditsNudgeEmailStatus::Sent,
|
||||
crate::AddCreditsNudgeEmailStatus::CooldownActive => {
|
||||
AddCreditsNudgeEmailStatus::CooldownActive
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn realtime_conversation_list_voices(sess: &Session, sub_id: String) {
|
||||
sess.send_event_raw(Event {
|
||||
id: sub_id,
|
||||
@@ -7290,7 +7242,6 @@ fn realtime_text_for_event(msg: &EventMsg) -> Option<String> {
|
||||
| EventMsg::GetHistoryEntryResponse(_)
|
||||
| EventMsg::McpListToolsResponse(_)
|
||||
| EventMsg::ListSkillsResponse(_)
|
||||
| EventMsg::AddCreditsNudgeEmailResponse(_)
|
||||
| EventMsg::RealtimeConversationListVoicesResponse(_)
|
||||
| EventMsg::SkillsUpdateAvailable
|
||||
| EventMsg::PlanUpdate(_)
|
||||
|
||||
Reference in New Issue
Block a user