mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
add session ID everywhere
This commit is contained in:
@@ -2931,6 +2931,7 @@ impl CodexMessageProcessor {
|
||||
);
|
||||
|
||||
let response = ThreadStartResponse {
|
||||
session_id: session_configured.session_id.to_string(),
|
||||
thread: thread.clone(),
|
||||
model: config_snapshot.model,
|
||||
model_provider: config_snapshot.model_provider_id,
|
||||
@@ -4472,6 +4473,7 @@ impl CodexMessageProcessor {
|
||||
);
|
||||
|
||||
let response = ThreadResumeResponse {
|
||||
session_id: session_configured.session_id.to_string(),
|
||||
thread,
|
||||
model: session_configured.model,
|
||||
model_provider: session_configured.model_provider_id,
|
||||
@@ -8477,8 +8479,10 @@ async fn handle_pending_thread_resume_request(
|
||||
let sandbox = thread_response_sandbox_policy(&permission_profile, cwd.as_path());
|
||||
let active_permission_profile =
|
||||
thread_response_active_permission_profile(active_permission_profile);
|
||||
let session_id = conversation.session_configured().session_id.to_string();
|
||||
|
||||
let response = ThreadResumeResponse {
|
||||
session_id,
|
||||
thread,
|
||||
model,
|
||||
model_provider: model_provider_id,
|
||||
|
||||
@@ -263,7 +263,10 @@ async fn thread_resume_tracks_thread_initialized_analytics() -> Result<()> {
|
||||
mcp.read_stream_until_response_message(RequestId::Integer(resume_id)),
|
||||
)
|
||||
.await??;
|
||||
let ThreadResumeResponse { thread, .. } = to_response::<ThreadResumeResponse>(resume_resp)?;
|
||||
let ThreadResumeResponse {
|
||||
session_id, thread, ..
|
||||
} = to_response::<ThreadResumeResponse>(resume_resp)?;
|
||||
assert!(!session_id.is_empty(), "session id should not be empty");
|
||||
|
||||
let payload = wait_for_analytics_payload(&server, DEFAULT_READ_TIMEOUT).await?;
|
||||
let event = thread_initialized_event(&payload)?;
|
||||
|
||||
@@ -78,10 +78,12 @@ async fn thread_start_creates_thread_and_emits_started() -> Result<()> {
|
||||
.await??;
|
||||
let resp_result = resp.result.clone();
|
||||
let ThreadStartResponse {
|
||||
session_id,
|
||||
thread,
|
||||
model_provider,
|
||||
..
|
||||
} = to_response::<ThreadStartResponse>(resp)?;
|
||||
assert!(!session_id.is_empty(), "session id should not be empty");
|
||||
assert!(!thread.id.is_empty(), "thread id should not be empty");
|
||||
assert!(
|
||||
thread.preview.is_empty(),
|
||||
|
||||
Reference in New Issue
Block a user