[codex] Support remote exec cwd in TUI startup (#17142)

When running with remote executor the cwd is the remote path. Today we
check for existence of a local directory on startup and attempt to load
config from it.

For remote executors don't do that.
This commit is contained in:
pakrym-oai
2026-04-08 13:09:28 -07:00
committed by GitHub
parent f383cc980d
commit e4d6702b87
11 changed files with 128 additions and 21 deletions

View File

@@ -69,6 +69,11 @@ impl EnvironmentManager {
self.exec_server_url.as_deref()
}
/// Returns true when this manager is configured to use a remote exec server.
pub fn is_remote(&self) -> bool {
self.exec_server_url.is_some()
}
/// Returns the cached environment, creating it on first access.
pub async fn current(&self) -> Result<Option<Arc<Environment>>, ExecServerError> {
self.current_environment
@@ -227,6 +232,7 @@ mod tests {
assert!(!manager.disabled);
assert_eq!(manager.exec_server_url(), None);
assert!(!manager.is_remote());
}
#[test]
@@ -235,6 +241,15 @@ mod tests {
assert!(manager.disabled);
assert_eq!(manager.exec_server_url(), None);
assert!(!manager.is_remote());
}
#[test]
fn environment_manager_reports_remote_url() {
let manager = EnvironmentManager::new(Some("ws://127.0.0.1:8765".to_string()));
assert!(manager.is_remote());
assert_eq!(manager.exec_server_url(), Some("ws://127.0.0.1:8765"));
}
#[tokio::test]