mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-04 08:03:21 +01:00
* Fix some bugs in capture of EP examples from running app
* Tweak markdown format for EP examples
* Store repo and revision in TOML front matter
* Represent cursor position using a comment line
* Allow multiple expected patches in evals
* Remove line-based scoring criteria for evals
* Add a `synthesize` subcommand to the EP cli that generates examples
from git commits
Release Notes:
- N/A
18 lines
421 B
Rust
18 lines
421 B
Rust
use anyhow::Result;
|
|
use std::mem;
|
|
|
|
use crate::example::Example;
|
|
|
|
pub async fn run_distill(example: &mut Example) -> Result<()> {
|
|
let predictions = mem::take(&mut example.predictions)
|
|
.into_iter()
|
|
.map(|p| p.actual_patch)
|
|
.collect();
|
|
|
|
example.spec.expected_patches = predictions;
|
|
example.prompt = None;
|
|
example.predictions = Vec::new();
|
|
example.score = Vec::new();
|
|
Ok(())
|
|
}
|