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

Function request

atomic-cli/src/commands/review/incremental.rs:69–94  ·  view source on GitHub ↗
(args: &IncrementalArgs)

Source from the content-addressed store, hash-verified

67}
68
69pub(super) fn request(args: &IncrementalArgs) -> CliResult<ReviewRequest> {
70 let session_id = if args.view.is_none() && args.from.is_none() && args.to.is_none() {
71 match std::env::var("ATOMIC_SESSION_ID") {
72 Ok(value) => Some(value),
73 Err(std::env::VarError::NotPresent) => None,
74 Err(_) => {
75 return Err(CliError::InvalidArgument {
76 message: "ATOMIC_SESSION_ID is not valid Unicode".into(),
77 })
78 }
79 }
80 } else {
81 None
82 };
83 Ok(ReviewRequest {
84 turn: args.turn.clone(),
85 intent: args.intent.clone(),
86 change: args.change.clone(),
87 view: args.view.clone(),
88 from: args.from.clone(),
89 to: args.to.clone(),
90 session_id,
91 findings: input(args.findings.as_deref(), 1024 * 1024)?,
92 risk_profile: input(args.risk_profile.as_deref(), 64 * 1024)?,
93 })
94}
95
96pub fn resolve(repo: &Repository, args: &IncrementalArgs) -> CliResult<ReviewReport> {
97 libatomic::review::incremental::resolve(repo, &request(args)?).map_err(Into::into)

Callers 3

resolveFunction · 0.70
runFunction · 0.70
request_with_reconnectFunction · 0.50

Calls 3

is_noneMethod · 0.80
inputFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected