mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
Preserve Guardian user answers from current history (#41857)
## What changed Match recorded user-input tool calls against both the current conversation and retained review history when collecting Guardian review evidence. This keeps answers available when their original tool call exists in either history. GitOrigin-RevId: e511e2d252d31fa8658c34db19f0151699e9a34a
This commit is contained in:
@@ -95,14 +95,14 @@ impl GuardianReviewEvidence {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns bounded answers whose original, host-observed tool calls remain in review history.
|
||||
/// Returns bounded answers whose original tool calls remain in current or retained history.
|
||||
pub fn user_input_fragments(&self, history: &dyn ConversationHistorySnapshot) -> Vec<String> {
|
||||
let state = self.0.lock().unwrap_or_else(PoisonError::into_inner);
|
||||
state
|
||||
.user_inputs
|
||||
.iter()
|
||||
.filter(|(recorded_call_id, _)| {
|
||||
history.review_items().any(|item| {
|
||||
history.items().chain(history.review_items()).any(|item| {
|
||||
matches!(
|
||||
item,
|
||||
ResponseItem::FunctionCall { call_id, .. }
|
||||
|
||||
Reference in New Issue
Block a user