From f770011d7f19219cbf69d54afc2bee76a37e9abe Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Wed, 17 Sep 2025 01:56:48 -0600 Subject: [PATCH] Add WIP zeta2 request types --- .../src/wip_requests.rs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 crates/edit_prediction_context/src/wip_requests.rs diff --git a/crates/edit_prediction_context/src/wip_requests.rs b/crates/edit_prediction_context/src/wip_requests.rs new file mode 100644 index 0000000000000000000000000000000000000000..9189587929725c8e1e4369fe5bd24cc641d6afab --- /dev/null +++ b/crates/edit_prediction_context/src/wip_requests.rs @@ -0,0 +1,35 @@ +// To discuss: What to send to the new endpoint? Thinking it'd make sense to put `prompt.rs` from +// `zeta_context.rs` in cloud. +// +// * Run excerpt selection at several different sizes, send the largest size with offsets within for +// the smaller sizes. +// +// * Longer event history. +// +// * Many more snippets than could fit in model context - allows ranking experimentation. + +pub struct Zeta2Request { + pub event_history: Vec, + pub excerpt: String, + pub excerpt_subsets: Vec, + /// Within `excerpt` + pub cursor_position: usize, + pub signatures: Vec, + pub retrieved_declarations: Vec, +} + +pub struct Zeta2ExcerptSubset { + /// Within `excerpt` text. + pub excerpt_range: Range, + /// Within `signatures`. + pub parent_signatures: Vec, +} + +pub struct ReferencedDeclaration { + pub text: Arc, + /// Range within `text` + pub signature_range: Range, + /// Indices within `signatures`. + pub parent_signatures: Vec, + // A bunch of score metrics +}