mirror of
https://github.com/openai/codex.git
synced 2026-04-30 03:12:20 +03:00
19 lines
561 B
Rust
19 lines
561 B
Rust
use codex_core::protocol::Event;
|
|
use codex_core::protocol::EventMsg;
|
|
|
|
use crate::event_processor::CodexStatus;
|
|
use crate::event_processor::EventProcessor;
|
|
|
|
pub(crate) struct EventProcessorNoop {}
|
|
|
|
impl EventProcessor for EventProcessorNoop {
|
|
fn process_event(&mut self, event: Event) -> CodexStatus {
|
|
let Event { id: _, msg } = event;
|
|
match msg {
|
|
EventMsg::ShutdownComplete => CodexStatus::Shutdown,
|
|
EventMsg::TaskComplete(_) => CodexStatus::InitiateShutdown,
|
|
_ => CodexStatus::Running,
|
|
}
|
|
}
|
|
}
|