pub struct ReviewInput {
pub code_file_count: usize,
pub diff_line_count: usize,
pub truncated: bool,
pub model_input: String,
pub model_input_units: usize,
}Expand description
What:
The sizes the entry reports and the text the model receives.
Why:
model_input is cut at the unit cap, while model_input_units is the length the script prints: the cut length.
In TS you’d write (pseudocode):
type ReviewInput = { codeFileCount: number; diffLineCount: number; truncated: boolean; modelInput: string; modelInputUnits: number };Fields§
§code_file_count: usizeCode files in the commit.
diff_line_count: usizeLines of the whole patch (a final newline counts as one more, empty, line).
truncated: boolWhether the patch is over CAP_LINES.
model_input: StringThe text sent to the model.
model_input_units: usizeThe reported length of model_input in UTF-16 units.
Trait Implementations§
Source§impl Clone for ReviewInput
impl Clone for ReviewInput
Source§impl Debug for ReviewInput
impl Debug for ReviewInput
impl Eq for ReviewInput
Source§impl PartialEq for ReviewInput
impl PartialEq for ReviewInput
impl StructuralPartialEq for ReviewInput
Auto Trait Implementations§
impl Freeze for ReviewInput
impl RefUnwindSafe for ReviewInput
impl Send for ReviewInput
impl Sync for ReviewInput
impl Unpin for ReviewInput
impl UnsafeUnpin for ReviewInput
impl UnwindSafe for ReviewInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more