mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Just fix
This commit is contained in:
@@ -111,7 +111,8 @@ pub async fn find_conversation_path_by_id_str(
|
||||
}
|
||||
|
||||
let limit = NonZero::new(1).ok_or_else(|| io::Error::other("search limit must be non-zero"))?;
|
||||
let threads = NonZero::new(2).ok_or_else(|| io::Error::other("thread pool size must be non-zero"))?;
|
||||
let threads =
|
||||
NonZero::new(2).ok_or_else(|| io::Error::other("thread pool size must be non-zero"))?;
|
||||
let cancel = Arc::new(AtomicBool::new(false));
|
||||
let exclude: Vec<String> = Vec::new();
|
||||
let compute_indices = false;
|
||||
|
||||
@@ -560,13 +560,6 @@ impl Session {
|
||||
startup_errors,
|
||||
..
|
||||
} = bootstrap;
|
||||
let post_session_configured_error_events: Vec<Event> = startup_errors
|
||||
.into_iter()
|
||||
.map(|message| Event {
|
||||
id: INITIAL_SUBMIT_ID.to_owned(),
|
||||
msg: EventMsg::Error(ErrorEvent { message }),
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Create the mutable state for the Session.
|
||||
let state = SessionState::new();
|
||||
@@ -599,7 +592,10 @@ impl Session {
|
||||
rollout_path,
|
||||
}),
|
||||
})
|
||||
.chain(post_session_configured_error_events.into_iter());
|
||||
.chain(startup_errors.into_iter().map(|message| Event {
|
||||
id: INITIAL_SUBMIT_ID.to_owned(),
|
||||
msg: EventMsg::Error(ErrorEvent { message }),
|
||||
}));
|
||||
for event in events {
|
||||
sess.send_event(event).await;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,12 @@ async fn user_info_returns_email_from_auth_json() {
|
||||
let codex_home = TempDir::new().expect("create tempdir");
|
||||
|
||||
let auth_path = get_auth_file(codex_home.path());
|
||||
let mut id_token = IdTokenInfo::default();
|
||||
id_token.email = Some("user@example.com".to_string());
|
||||
id_token.raw_jwt = encode_id_token_with_email("user@example.com").expect("encode id token");
|
||||
let raw_jwt = encode_id_token_with_email("user@example.com").expect("encode id token");
|
||||
let id_token = IdTokenInfo {
|
||||
email: Some("user@example.com".to_string()),
|
||||
raw_jwt,
|
||||
..IdTokenInfo::default()
|
||||
};
|
||||
|
||||
let auth = AuthDotJson {
|
||||
openai_api_key: None,
|
||||
|
||||
@@ -590,8 +590,10 @@ mod tests {
|
||||
AuthMode::ChatGPT => {
|
||||
// Minimal valid JWT payload: header.payload.signature (all base64url, no padding)
|
||||
const FAKE_JWT: &str = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.e30.c2ln"; // {"alg":"none","typ":"JWT"}.{}."sig"
|
||||
let mut id_info = IdTokenInfo::default();
|
||||
id_info.raw_jwt = FAKE_JWT.to_string();
|
||||
let id_info = IdTokenInfo {
|
||||
raw_jwt: FAKE_JWT.to_string(),
|
||||
..IdTokenInfo::default()
|
||||
};
|
||||
let auth = AuthDotJson {
|
||||
openai_api_key: None,
|
||||
tokens: Some(TokenData {
|
||||
|
||||
Reference in New Issue
Block a user