MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build_options

Method build_options

atomic-cli/src/commands/record/provenance.rs:168–195  ·  view source on GitHub ↗

Build RecordOptions from command-line arguments.

(&self)

Source from the content-addressed store, hash-verified

166
167 /// Build RecordOptions from command-line arguments.
168 pub(super) fn build_options(&self) -> CliResult<RecordOptions> {
169 let algorithm = self.parse_algorithm()?;
170
171 let mut options = RecordOptions::new()
172 .with_all(self.all)
173 .with_algorithm(algorithm)
174 .with_skip_binary(self.skip_binary)
175 .allow_conflict_markers(self.allow_conflict_markers)
176 .apply_after_record(!self.dry_run)
177 .save_to_store(!self.dry_run);
178
179 // Add specific files if provided
180 if !self.files.is_empty() {
181 options = options.paths(self.files.clone());
182 }
183
184 // Set max size if provided
185 if let Some(max_size) = self.max_size {
186 options = options.with_max_file_size(max_size);
187 }
188
189 // Add AI provenance if enabled
190 if let Some(provenance) = self.build_provenance() {
191 options = options.add_provenance(provenance);
192 }
193
194 Ok(options)
195 }
196}

Calls 13

save_to_storeMethod · 0.80
apply_after_recordMethod · 0.80
build_provenanceMethod · 0.80
parse_algorithmMethod · 0.45
with_skip_binaryMethod · 0.45
with_algorithmMethod · 0.45
with_allMethod · 0.45
is_emptyMethod · 0.45
pathsMethod · 0.45
cloneMethod · 0.45
with_max_file_sizeMethod · 0.45