pub struct RepositoryView<C = CommitInfo> {
pub versions: Option<VersionInfo>,
pub explanation: FieldExplanation,
pub working_directory: WorkingDirectoryInfo,
pub remotes: Vec<RemoteInfo>,
pub ai: AiInfo,
pub branch_info: Option<BranchInfo>,
pub pr_template: Option<String>,
pub pr_template_location: Option<String>,
pub branch_prs: Option<Vec<PullRequest>>,
pub commits: Vec<C>,
}Expand description
Root node of the YAML output produced by view, info, check, and the branch
subcommands.
Field presence is runtime-dependent: optional fields are populated only when the
active command and repository state require them, and the embedded
FieldExplanation reports which fields are actually present in this serialization.
See ADR-0013 for the field-presence contract.
Generic over the commit type so the same shape serves both human-facing output
(CommitInfo) and AI-facing output (RepositoryViewForAI, using CommitInfoForAI).
Fields§
§versions: Option<VersionInfo>Version information for the omni-dev tool.
explanation: FieldExplanationExplanation of field meanings and structure.
working_directory: WorkingDirectoryInfoWorking directory status information.
remotes: Vec<RemoteInfo>List of remote repositories and their main branches.
ai: AiInfoAI-related information.
branch_info: Option<BranchInfo>Branch information (only present when using branch commands).
pr_template: Option<String>Pull request template content (only present in branch commands when template exists).
pr_template_location: Option<String>Location of the pull request template file (only present when pr_template exists).
branch_prs: Option<Vec<PullRequest>>Pull requests created from the current branch (only present in branch commands).
commits: Vec<C>List of analyzed commits with metadata and analysis.
Implementations§
Source§impl RepositoryView
impl RepositoryView
Sourcepub fn update_field_presence(&mut self)
pub fn update_field_presence(&mut self)
Updates the present field for all field documentation entries based on actual data.
Sourcepub fn to_yaml_output(&mut self) -> Result<String>
pub fn to_yaml_output(&mut self) -> Result<String>
Serializes this view to YAML, calling update_field_presence first.
Use this instead of calling update_field_presence followed by
crate::data::to_yaml separately. Keeping the two steps together
prevents the explanation section from being stale in the output.
Sourcepub fn single_commit_view(&self, commit: &CommitInfo) -> Self
pub fn single_commit_view(&self, commit: &CommitInfo) -> Self
Creates a minimal view containing a single commit for parallel dispatch.
Strips metadata not relevant to per-commit AI analysis (versions,
working directory status, remotes, PR templates) to reduce prompt size.
Only retains branch_info (for scope context) and the single commit.
Source§impl<C> RepositoryView<C>
impl<C> RepositoryView<C>
Sourcepub fn map_commits<D>(
self,
f: impl FnMut(C) -> Result<D>,
) -> Result<RepositoryView<D>>
pub fn map_commits<D>( self, f: impl FnMut(C) -> Result<D>, ) -> Result<RepositoryView<D>>
Transforms commits while preserving all other fields.
Source§impl RepositoryView<CommitInfoForAI>
impl RepositoryView<CommitInfoForAI>
Sourcepub fn from_repository_view(repo_view: RepositoryView) -> Result<Self>
pub fn from_repository_view(repo_view: RepositoryView) -> Result<Self>
Converts from basic RepositoryView by loading diff content for all commits.
Sourcepub fn from_repository_view_with_options(
repo_view: RepositoryView,
fresh: bool,
) -> Result<Self>
pub fn from_repository_view_with_options( repo_view: RepositoryView, fresh: bool, ) -> Result<Self>
Converts from basic RepositoryView with options.
If fresh is true, clears original commit messages to force AI to generate
new messages based solely on the diff content.
Trait Implementations§
Source§impl<C: Clone> Clone for RepositoryView<C>
impl<C: Clone> Clone for RepositoryView<C>
Source§fn clone(&self) -> RepositoryView<C>
fn clone(&self) -> RepositoryView<C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C: Debug> Debug for RepositoryView<C>
impl<C: Debug> Debug for RepositoryView<C>
Source§impl<'de, C> Deserialize<'de> for RepositoryView<C>where
C: Deserialize<'de>,
impl<'de, C> Deserialize<'de> for RepositoryView<C>where
C: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<C> Freeze for RepositoryView<C>
impl<C> RefUnwindSafe for RepositoryView<C>where
C: RefUnwindSafe,
impl<C> Send for RepositoryView<C>where
C: Send,
impl<C> Sync for RepositoryView<C>where
C: Sync,
impl<C> Unpin for RepositoryView<C>where
C: Unpin,
impl<C> UnsafeUnpin for RepositoryView<C>
impl<C> UnwindSafe for RepositoryView<C>where
C: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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