Move context graph route conversion into bridge
This commit is contained in:
parent
0503ca1c5c
commit
3a57868bf1
6 changed files with 54 additions and 24 deletions
|
|
@ -39,7 +39,9 @@ use crate::error::EpiphanyBridgeError;
|
|||
use crate::error::Result as BridgeResult;
|
||||
use crate::jobs::map_epiphany_jobs;
|
||||
use crate::pressure::derive_epiphany_pressure;
|
||||
use crate::protocol_edge::protocol_context_params_to_core;
|
||||
use crate::protocol_edge::protocol_distill_params_to_core;
|
||||
use crate::protocol_edge::protocol_graph_query_to_core;
|
||||
use crate::protocol_edge::protocol_job_from_surface;
|
||||
use crate::protocol_edge::protocol_pressure_from_core;
|
||||
use crate::protocol_edge::protocol_reorient_decision;
|
||||
|
|
@ -113,6 +115,16 @@ pub fn map_epiphany_context_response(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn map_thread_epiphany_context_response(
|
||||
params: ThreadEpiphanyContextParams,
|
||||
loaded: bool,
|
||||
state: Option<&EpiphanyThreadState>,
|
||||
) -> ThreadEpiphanyContextResponse {
|
||||
let thread_id = params.thread_id.clone();
|
||||
let core_params = protocol_context_params_to_core(¶ms);
|
||||
map_epiphany_context_response(thread_id, loaded, state, &core_params)
|
||||
}
|
||||
|
||||
pub fn map_epiphany_graph_query_response(
|
||||
thread_id: String,
|
||||
loaded: bool,
|
||||
|
|
@ -138,6 +150,16 @@ pub fn map_epiphany_graph_query_response(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn map_thread_epiphany_graph_query_response(
|
||||
params: ThreadEpiphanyGraphQueryParams,
|
||||
loaded: bool,
|
||||
state: Option<&EpiphanyThreadState>,
|
||||
) -> ThreadEpiphanyGraphQueryResponse {
|
||||
let thread_id = params.thread_id.clone();
|
||||
let core_query = protocol_graph_query_to_core(¶ms.query);
|
||||
map_epiphany_graph_query_response(thread_id, loaded, state, &core_query)
|
||||
}
|
||||
|
||||
pub struct EpiphanyViewResponseInput<'a> {
|
||||
pub thread_id: String,
|
||||
pub lenses: Vec<EpiphanyViewLens>,
|
||||
|
|
|
|||
Reference in a new issue