mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
Expose loaded thread environments in app-server responses (#42386)
## What changed - Add the experimental `Thread.environments` field with each selected environment's ID, working directory, and runtime workspace roots. - Populate the field from live thread state in start, resume, read, list, and unarchive responses. Use `null` for unloaded threads and an empty list when a loaded thread has no environment selection. - Document that the field reports selection rather than connection status and does not affect executor selection or resume behavior. ## Testing - Cover selection updates, unloaded and resumed threads, loaded pathless unarchives, and clients that subscribe after environment connection notifications. GitOrigin-RevId: a6daa06aff7089d7c5a1e4c7d03109b41f12fa3c
This commit is contained in:
committed by
copyberry
parent
cff76fa96f
commit
2b554fd3f9
@@ -351,6 +351,7 @@ async fn resume_lookup_model_providers_filters_only_last_lookup() {
|
||||
#[test]
|
||||
fn turn_items_for_thread_returns_matching_turn_items() {
|
||||
let thread = AppServerThread {
|
||||
environments: None,
|
||||
id: "thread-1".to_string(),
|
||||
extra: None,
|
||||
session_id: "thread-1".to_string(),
|
||||
@@ -841,6 +842,7 @@ async fn session_configured_from_thread_response_preserves_parent_thread_id() {
|
||||
fn sample_thread_start_response() -> ThreadStartResponse {
|
||||
ThreadStartResponse {
|
||||
thread: codex_app_server_protocol::Thread {
|
||||
environments: None,
|
||||
id: "67e55044-10b1-426f-9247-bb680e5fe0c8".to_string(),
|
||||
extra: None,
|
||||
session_id: "67e55044-10b1-426f-9247-bb680e5fe0c7".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user