mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
progress
This commit is contained in:
@@ -225,7 +225,7 @@ impl ContextManager {
|
||||
}
|
||||
|
||||
fn process_item(&self, item: &ResponseItem, policy: TruncationPolicy) -> ResponseItem {
|
||||
let policy_with_serialization_budget = policy * 1.2;
|
||||
let policy_with_serialization_budget = policy.mul(1.2);
|
||||
match item {
|
||||
ResponseItem::FunctionCallOutput { call_id, output } => {
|
||||
let truncated =
|
||||
|
||||
@@ -173,17 +173,3 @@ sequenceDiagram
|
||||
task2->>user: Event::TurnCompleted
|
||||
task2->>-user: Event::TaskCompleted
|
||||
```
|
||||
|
||||
## Key Events
|
||||
|
||||
### SessionConfigured
|
||||
|
||||
`Event::SessionConfigured` is emitted once after `Op::ConfigureSession`.
|
||||
|
||||
Notable fields:
|
||||
- `session_id`: the backend-assigned session identifier (historically named `session_id` for
|
||||
backwards compatibility).
|
||||
- `model_family`: model metadata for the model family selected for the session. This matches the
|
||||
`/models` payload shape; the selected model slug is `model_family.slug`.
|
||||
- `approval_policy`, `sandbox_policy`, `cwd`: the effective execution and sandbox settings for the
|
||||
session.
|
||||
|
||||
@@ -1344,6 +1344,17 @@ pub enum TruncationPolicy {
|
||||
Tokens(usize),
|
||||
}
|
||||
|
||||
// Allow core to pass model-family truncation policies (defined in openai_models)
|
||||
// into the TurnContext payload (defined in protocol) via `.into()`.
|
||||
impl From<crate::openai_models::TruncationPolicy> for TruncationPolicy {
|
||||
fn from(value: crate::openai_models::TruncationPolicy) -> Self {
|
||||
match value {
|
||||
crate::openai_models::TruncationPolicy::Bytes(bytes) => Self::Bytes(bytes),
|
||||
crate::openai_models::TruncationPolicy::Tokens(tokens) => Self::Tokens(tokens),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, JsonSchema)]
|
||||
pub struct RolloutLine {
|
||||
pub timestamp: String,
|
||||
|
||||
Reference in New Issue
Block a user