pub enum SseEvent {
PermissionAsked(PermissionRequest),
PermissionReplied {
session_id: String,
request_id: String,
reply: String,
},
QuestionAsked(QuestionRequest),
QuestionReplied {
session_id: String,
request_id: String,
answers: Vec<Vec<String>>,
},
QuestionRejected {
session_id: String,
request_id: String,
},
SessionStatus {
session_id: String,
busy: bool,
},
Connected,
Disconnected(Option<String>),
}Expand description
Events received from the OpenCode SSE stream.
Variants§
PermissionAsked(PermissionRequest)
PermissionReplied
QuestionAsked(QuestionRequest)
QuestionReplied
QuestionRejected
SessionStatus
Session status changed (busy/idle/retry).
When the session becomes busy it means the AI has resumed work — any pending permissions or questions must have been answered (possibly by the user interacting directly with the OpenCode TUI).
Fields
Connected
Disconnected(Option<String>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SseEvent
impl RefUnwindSafe for SseEvent
impl Send for SseEvent
impl Sync for SseEvent
impl Unpin for SseEvent
impl UnsafeUnpin for SseEvent
impl UnwindSafe for SseEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more