Move Epiphany retrieval execution into bridge
This commit is contained in:
parent
89514cf147
commit
10a6e7a491
9 changed files with 68 additions and 62 deletions
|
|
@ -19,6 +19,7 @@ use epiphany_codex_bridge::mutation_service::launch_thread_epiphany_job;
|
|||
use epiphany_codex_bridge::pressure::map_epiphany_pressure;
|
||||
use epiphany_codex_bridge::pressure::render_epiphany_pre_compaction_checkpoint_intervention;
|
||||
use epiphany_codex_bridge::pressure::should_run_epiphany_pre_compaction_checkpoint_intervention;
|
||||
use epiphany_codex_bridge::retrieve::thread_epiphany_retrieval_state;
|
||||
use epiphany_codex_bridge::state::runtime_spine_store_path;
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::warn;
|
||||
|
|
@ -38,7 +39,7 @@ pub(crate) async fn maybe_run_epiphany_coordinator_automation_for_turn_boundary(
|
|||
return;
|
||||
};
|
||||
|
||||
let retrieval_override = thread.epiphany_retrieval_state().await;
|
||||
let retrieval_override = thread_epiphany_retrieval_state(thread.as_ref()).await;
|
||||
let config_snapshot = thread.config_snapshot().await;
|
||||
epiphany_invalidation_manager
|
||||
.ensure_thread_watch(&thread_id_text, &config_snapshot.cwd)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ use epiphany_codex_bridge::mutation_service::launch_thread_epiphany_job;
|
|||
use epiphany_codex_bridge::mutation_service::launch_thread_epiphany_reorient;
|
||||
use epiphany_codex_bridge::mutation_service::launch_thread_epiphany_role;
|
||||
use epiphany_codex_bridge::retrieve::index_thread_epiphany_retrieval;
|
||||
use epiphany_codex_bridge::retrieve::thread_epiphany_retrieval_state;
|
||||
use epiphany_core::EpiphanyJobLaunchRequest;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
@ -249,7 +250,7 @@ impl CodexMessageProcessor {
|
|||
}
|
||||
};
|
||||
|
||||
let retrieval_override = loaded_thread.epiphany_retrieval_state().await;
|
||||
let retrieval_override = thread_epiphany_retrieval_state(loaded_thread.as_ref()).await;
|
||||
let config_snapshot = loaded_thread.config_snapshot().await;
|
||||
self.epiphany_invalidation_manager
|
||||
.ensure_thread_watch(&thread_id, &config_snapshot.cwd)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot;
|
|||
use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID;
|
||||
use epiphany_codex_bridge::launch::epiphany_role_binding_id;
|
||||
use epiphany_codex_bridge::retrieve::map_epiphany_retrieve_response;
|
||||
use epiphany_codex_bridge::retrieve::retrieve_thread_epiphany;
|
||||
use epiphany_codex_bridge::retrieve::thread_epiphany_retrieval_state;
|
||||
use epiphany_codex_bridge::state::load_optional_thread_memory_graph_snapshot;
|
||||
use epiphany_codex_bridge::state::runtime_spine_store_path;
|
||||
use epiphany_codex_bridge::view::EpiphanyFreshnessResponseInput;
|
||||
|
|
@ -86,7 +88,7 @@ impl CodexMessageProcessor {
|
|||
.is_none()
|
||||
{
|
||||
if let Some(loaded_thread) = loaded_thread.as_ref() {
|
||||
Some(loaded_thread.epiphany_retrieval_state().await)
|
||||
Some(thread_epiphany_retrieval_state(loaded_thread).await)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
@ -259,7 +261,7 @@ impl CodexMessageProcessor {
|
|||
};
|
||||
|
||||
let retrieval_override = if let Some(loaded_thread) = loaded_thread.as_ref() {
|
||||
Some(loaded_thread.epiphany_retrieval_state().await)
|
||||
Some(thread_epiphany_retrieval_state(loaded_thread).await)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
@ -482,8 +484,7 @@ impl CodexMessageProcessor {
|
|||
}
|
||||
};
|
||||
|
||||
let response = match thread
|
||||
.epiphany_retrieve(query)
|
||||
let response = match retrieve_thread_epiphany(thread.as_ref(), query)
|
||||
.await
|
||||
.and_then(map_epiphany_retrieve_response)
|
||||
{
|
||||
|
|
|
|||
Reference in a new issue