MCPcopy Create free account
hub / github.com/AI45Lab/Code / assemble_dedupes_by_ranking_score

Function assemble_dedupes_by_ranking_score

core/src/context/assembler.rs:391–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389
390 #[test]
391 fn assemble_dedupes_by_ranking_score() {
392 let assembler = ContextAssembler::with_default_budget();
393 let assembly = assembler.assemble(&[result(
394 "test",
395 vec![
396 ContextItem::new("plain", ContextType::Resource, "plain")
397 .with_source("file://auth.rs")
398 .with_relevance(0.7),
399 ContextItem::new("boosted", ContextType::Resource, "boosted")
400 .with_source("file://auth.rs")
401 .with_relevance(0.6)
402 .with_priority(1.0),
403 ],
404 )]);
405
406 assert_eq!(assembly.items.len(), 1);
407 assert_eq!(assembly.items[0].id, "boosted");
408 assert!(assembly.truncated);
409 }
410
411 #[test]
412 fn assemble_respects_item_and_token_budget() {

Callers

nothing calls this directly

Calls 2

resultFunction · 0.85
assembleMethod · 0.80

Tested by

no test coverage detected