zeta2: Allow provider to suggest edits in different files (#39110)

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
Bennet Bo Fenner
2025-09-29 15:48:58 +00:00
committed by GitHub
co-authored by Agus Zubiaga
parent b7f9fd7d74
commit cda48a3a1c
16 changed files with 689 additions and 318 deletions
@@ -43,15 +43,24 @@ pub struct PredictEditsRequest {
pub prompt_format: PromptFormat,
}
#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize, PartialEq, EnumIter)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, EnumIter)]
pub enum PromptFormat {
#[default]
MarkedExcerpt,
LabeledSections,
/// Prompt format intended for use via zeta_cli
OnlySnippets,
}
impl PromptFormat {
pub const DEFAULT: PromptFormat = PromptFormat::LabeledSections;
}
impl Default for PromptFormat {
fn default() -> Self {
Self::DEFAULT
}
}
impl PromptFormat {
pub fn iter() -> impl Iterator<Item = Self> {
<Self as strum::IntoEnumIterator>::iter()