Remove pressure protocol helper
This commit is contained in:
parent
2bf0506167
commit
27f88bfaef
5 changed files with 7 additions and 10 deletions
|
|
@ -1,4 +1,3 @@
|
|||
use codex_app_server_protocol::ThreadEpiphanyPressure;
|
||||
use epiphany_core::EpiphanyPressure;
|
||||
use epiphany_core::EpiphanyPressureLevel as CoreEpiphanyPressureLevel;
|
||||
use epiphany_core::EpiphanyPressureStatus as CoreEpiphanyPressureStatus;
|
||||
|
|
@ -7,18 +6,11 @@ use epiphany_core::derive_pressure_view;
|
|||
|
||||
use crate::launch::epiphany_agent_prompt_with_memory;
|
||||
use crate::launch::epiphany_specialist_prompt_config;
|
||||
use crate::protocol_edge::protocol_pressure_from_core;
|
||||
|
||||
pub fn derive_epiphany_pressure(snapshot: Option<&EpiphanyTokenUsageSnapshot>) -> EpiphanyPressure {
|
||||
derive_pressure_view(snapshot)
|
||||
}
|
||||
|
||||
pub fn map_epiphany_pressure(
|
||||
snapshot: Option<&EpiphanyTokenUsageSnapshot>,
|
||||
) -> ThreadEpiphanyPressure {
|
||||
protocol_pressure_from_core(derive_epiphany_pressure(snapshot))
|
||||
}
|
||||
|
||||
pub fn should_run_epiphany_pre_compaction_checkpoint_intervention(
|
||||
pressure: &EpiphanyPressure,
|
||||
) -> bool {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ use crate::cultnet::EpiphanySurfaceSource;
|
|||
use crate::jobs::map_epiphany_jobs;
|
||||
use crate::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID;
|
||||
use crate::pressure::derive_epiphany_pressure;
|
||||
use crate::pressure::map_epiphany_pressure;
|
||||
use crate::protocol_edge::protocol_job_from_surface;
|
||||
use crate::protocol_edge::protocol_pressure_from_core;
|
||||
use crate::protocol_edge::protocol_reorient_decision;
|
||||
use crate::protocol_edge::protocol_reorient_finding;
|
||||
use crate::protocol_edge::protocol_reorient_result_status;
|
||||
|
|
@ -169,7 +169,8 @@ pub async fn map_epiphany_view_response(
|
|||
let needs_reorientation_inputs = epiphany_view_needs_reorientation_inputs(&lenses);
|
||||
let needs_pressure = epiphany_view_needs_pressure(&lenses);
|
||||
let core_pressure = needs_pressure.then(|| derive_epiphany_pressure(token_usage_info));
|
||||
let pressure = needs_pressure.then(|| map_epiphany_pressure(token_usage_info));
|
||||
let pressure = needs_pressure
|
||||
.then(|| protocol_pressure_from_core(derive_epiphany_pressure(token_usage_info)));
|
||||
let core_freshness = needs_reorientation_inputs
|
||||
.then(|| derive_epiphany_freshness_view(state, retrieval_override, watcher_snapshot));
|
||||
let (state_revision, core_reorient_state_status, core_reorient_decision) =
|
||||
|
|
|
|||
Reference in a new issue