mirror of
https://github.com/openai/codex.git
synced 2026-06-02 11:22:01 +00:00
fix(core): keep runtime workspace base layer buildable
This commit is contained in:
@@ -831,6 +831,7 @@ fn sample_permissions_approval_request(request_id: i64) -> ServerRequest {
|
||||
}),
|
||||
file_system: None,
|
||||
},
|
||||
workspace_mutation: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1441,6 +1441,8 @@ impl Session {
|
||||
.map(|configuration| configuration.thread_config_snapshot())
|
||||
}
|
||||
|
||||
// Used by the model workspace-mutation tools introduced in a follow-up layer.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) async fn update_runtime_workspace(
|
||||
&self,
|
||||
turn_context: &TurnContext,
|
||||
|
||||
@@ -73,6 +73,8 @@ impl RuntimeWorkspaceState {
|
||||
self.snapshot.read().await.clone()
|
||||
}
|
||||
|
||||
// Used by the model workspace-mutation tools introduced in a follow-up layer.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) async fn replace(&self, snapshot: RuntimeWorkspaceSnapshot) {
|
||||
*self.snapshot.write().await = snapshot;
|
||||
}
|
||||
@@ -413,6 +415,8 @@ impl TurnContext {
|
||||
}
|
||||
}
|
||||
|
||||
// Used by the model workspace-mutation tools introduced in a follow-up layer.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn to_turn_context_item_with_runtime_workspace(
|
||||
&self,
|
||||
runtime_workspace: &RuntimeWorkspaceSnapshot,
|
||||
|
||||
@@ -496,6 +496,7 @@ mod tests {
|
||||
"network": { "enabled": null }
|
||||
}))
|
||||
.expect("valid permissions"),
|
||||
workspace_mutation: None,
|
||||
},
|
||||
}),
|
||||
None
|
||||
|
||||
@@ -2553,6 +2553,7 @@ async fn inactive_thread_permissions_approval_preserves_file_system_permissions(
|
||||
entries: None,
|
||||
}),
|
||||
},
|
||||
workspace_mutation: None,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -295,6 +295,7 @@ fn app_server_request_permissions_preserves_file_system_permissions() {
|
||||
entries: None,
|
||||
}),
|
||||
},
|
||||
workspace_mutation: None,
|
||||
});
|
||||
|
||||
assert_eq!(
|
||||
|
||||
@@ -185,6 +185,7 @@ async fn guardian_approved_request_permissions_renders_request_summary() {
|
||||
)),
|
||||
..RequestPermissionProfile::default()
|
||||
},
|
||||
workspace_mutation: None,
|
||||
};
|
||||
|
||||
chat.on_guardian_assessment(GuardianAssessmentEvent {
|
||||
|
||||
Reference in New Issue
Block a user