Keep distill request core-shaped
This commit is contained in:
parent
13731f632f
commit
b7185d7cfd
5 changed files with 25 additions and 15 deletions
|
|
@ -562,26 +562,9 @@ pub async fn map_epiphany_reorient_result_response(
|
|||
|
||||
pub fn map_epiphany_distill_response(
|
||||
expected_revision: u64,
|
||||
params: ThreadEpiphanyDistillParams,
|
||||
input: EpiphanyDistillInput,
|
||||
) -> std::result::Result<ThreadEpiphanyDistillResponse, String> {
|
||||
let ThreadEpiphanyDistillParams {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
..
|
||||
} = params;
|
||||
let proposal = distill_observation(EpiphanyDistillInput {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
})
|
||||
.map_err(|err| err.to_string())?;
|
||||
let proposal = distill_observation(input).map_err(|err| err.to_string())?;
|
||||
|
||||
Ok(ThreadEpiphanyDistillResponse {
|
||||
expected_revision,
|
||||
|
|
@ -593,6 +576,28 @@ pub fn map_epiphany_distill_response(
|
|||
})
|
||||
}
|
||||
|
||||
pub fn map_core_epiphany_distill_input(
|
||||
params: ThreadEpiphanyDistillParams,
|
||||
) -> EpiphanyDistillInput {
|
||||
let ThreadEpiphanyDistillParams {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
..
|
||||
} = params;
|
||||
EpiphanyDistillInput {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map_epiphany_propose_response(
|
||||
state: EpiphanyThreadState,
|
||||
observation_ids: Vec<String>,
|
||||
|
|
|
|||
Reference in a new issue