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

Method build_options

atomic-cli/src/commands/record/provenance.rs:168–194  ·  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 .apply_after_record(!self.dry_run)
176 .save_to_store(!self.dry_run);
177
178 // Add specific files if provided
179 if !self.files.is_empty() {
180 options = options.paths(self.files.clone());
181 }
182
183 // Set max size if provided
184 if let Some(max_size) = self.max_size {
185 options = options.with_max_file_size(max_size);
186 }
187
188 // Add AI provenance if enabled
189 if let Some(provenance) = self.build_provenance() {
190 options = options.add_provenance(provenance);
191 }
192
193 Ok(options)
194 }
195}

Calls 12

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
add_provenanceMethod · 0.45