# ep: Editable context collectors and metrics \(\#58400\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ade2b219f7881e19f674762cac12df6e98d51326)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ade2b219f7881e19f674762cac12df6e98d51326

Requested commit: ade2b219f7881e19f674762cac12df6e98d51326

Commit: ade2b219f7881e19f674762cac12df6e98d51326

Tree: 4f04edb14e1fbe792d2a7e510b7e231a857ad05f

Author: Oleksiy Syvokon

Committer: GitHub

## Message

```
ep: Editable context collectors and metrics (#58400)

This change adds metrics for evaluating editable context collectors and
the collectors themselves:

- `cursor excerpt`: small area around the cursor.
- `current-file`: the full file that contains the cursor.
- `edit-history`: excerpts around edit history edits.
- `edit-history-file`: full files referenced by the edit history.
- `git-log`: files related to the cursor file according to recent git
co-change history.
- `oracle-file`: full files referenced by the expected patches. This is
an oracle/evaluation-only source because it uses the target patch.

Individual collectors can be enabled by passing a comma-separated list
like this: `ep context --type=edit-history,current-file`. There's also a
preset, `--type=editable`, which will enable all collectors except
oracle.

This change also adds the
`.prompt_input.related_files[0].excerpts[0].context_source` field.

Editable context is only accessible via ep-cli for now.

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
```

## Parents

- [74180d86fee64d671d0924e04fac58f774319ac8](https://git.cafe/gitcafe/zed/commit/74180d86fee64d671d0924e04fac58f774319ac8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ade2b219f7881e19f674762cac12df6e98d51326?format=markdown)
