mirror of
https://github.com/openai/codex.git
synced 2026-04-30 03:12:20 +03:00
chore: add small debug client (#8894)
Small debug client, do not use in production
This commit is contained in:
28
codex-rs/debug-client/src/state.rs
Normal file
28
codex-rs/debug-client/src/state.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use codex_app_server_protocol::RequestId;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct State {
|
||||
pub pending: HashMap<RequestId, PendingRequest>,
|
||||
pub thread_id: Option<String>,
|
||||
pub known_threads: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum PendingRequest {
|
||||
Start,
|
||||
Resume,
|
||||
List,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ReaderEvent {
|
||||
ThreadReady {
|
||||
thread_id: String,
|
||||
},
|
||||
ThreadList {
|
||||
thread_ids: Vec<String>,
|
||||
next_cursor: Option<String>,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user