mirror of
https://github.com/openai/codex.git
synced 2026-11-04 00:24:43 +00:00
Prefer the Codex home socket for Unix IDE context (#32302)
## What changed - Look for the Unix IDE context socket at `CODEX_HOME/ipc/ipc.sock` first. - Fall back to the existing per-user temp-directory socket paths, including both legacy paths for UID 0. - Apply one request deadline across all connection attempts, and stop fallback after a timeout or a protocol error on a connected socket. ## Testing - Added coverage for socket path selection, primary preference, legacy fallbacks, and timeout and protocol-error behavior. GitOrigin-RevId: 560c827ad3d446a82ec503779995757096ac33e0
This commit is contained in:
1 parent
076a110eb8
commit
dfefd8aa8b
2 files changed
+285
-19
No files matched your search
@@ -69,7 +69,7 @@ impl ChatWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
match crate::ide_context::fetch_ide_context(&self.config.cwd) {
|
||||
match crate::ide_context::fetch_ide_context(&self.config.cwd, &self.config.codex_home) {
|
||||
Ok(context) => {
|
||||
self.ide_context.mark_available();
|
||||
self.sync_ide_context_status_indicator();
|
||||
@@ -95,7 +95,7 @@ impl ChatWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
match crate::ide_context::fetch_ide_context(&self.config.cwd) {
|
||||
match crate::ide_context::fetch_ide_context(&self.config.cwd, &self.config.codex_home) {
|
||||
Ok(context) => {
|
||||
self.ide_context.mark_available();
|
||||
self.sync_ide_context_status_indicator();
|
||||
|
||||
Reference in new issue
Block a user