mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Add safety check notification and error handling (#19055)
Adds a new app-server notification that fires when a user account has been flagged for potential safety reasons.
This commit is contained in:
committed by
GitHub
Unverified
parent
02170996e6
commit
bbff4ee61a
@@ -292,6 +292,7 @@ impl EventProcessor for EventProcessorWithHumanOutput {
|
||||
);
|
||||
CodexStatus::Running
|
||||
}
|
||||
ServerNotification::ModelVerification(_) => CodexStatus::Running,
|
||||
ServerNotification::ThreadTokenUsageUpdated(notification) => {
|
||||
self.last_total_token_usage = Some(notification.token_usage);
|
||||
CodexStatus::Running
|
||||
|
||||
@@ -489,6 +489,7 @@ impl EventProcessorWithJsonOutput {
|
||||
}));
|
||||
CodexStatus::Running
|
||||
}
|
||||
ServerNotification::ModelVerification(_) => CodexStatus::Running,
|
||||
ServerNotification::ThreadTokenUsageUpdated(notification) => {
|
||||
self.last_total_token_usage = Some(notification.token_usage);
|
||||
CodexStatus::Running
|
||||
|
||||
@@ -1138,6 +1138,9 @@ fn should_process_notification(
|
||||
ServerNotification::ModelRerouted(notification) => {
|
||||
notification.thread_id == thread_id && notification.turn_id == turn_id
|
||||
}
|
||||
ServerNotification::ModelVerification(notification) => {
|
||||
notification.thread_id == thread_id && notification.turn_id == turn_id
|
||||
}
|
||||
ServerNotification::ThreadTokenUsageUpdated(notification) => {
|
||||
notification.thread_id == thread_id && notification.turn_id == turn_id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user