Skip to content

Commit baeb877

Browse files
chore: rename --non-interactive back to --no-interactive, preserving alias for both (#371)
1 parent 62b5371 commit baeb877

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

crates/chat-cli/src/cli/chat/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ pub struct ChatArgs {
177177
#[arg(long, value_delimiter = ',', value_name = "TOOL_NAMES")]
178178
pub trust_tools: Option<Vec<String>>,
179179
/// Whether the command should run without expecting user input
180-
#[arg(long, alias = "no-interactive")]
181-
pub non_interactive: bool,
180+
#[arg(long, alias = "non-interactive")]
181+
pub no_interactive: bool,
182182
/// The first question to ask
183183
pub input: Option<String>,
184184
}
@@ -187,7 +187,7 @@ impl ChatArgs {
187187
pub async fn execute(self, os: &mut Os) -> Result<ExitCode> {
188188
let mut input = self.input;
189189

190-
if self.non_interactive && input.is_none() {
190+
if self.no_interactive && input.is_none() {
191191
if !std::io::stdin().is_terminal() {
192192
let mut buffer = String::new();
193193
match std::io::stdin().read_to_string(&mut buffer) {
@@ -277,7 +277,7 @@ impl ChatArgs {
277277
.prompt_list_sender(prompt_response_sender)
278278
.prompt_list_receiver(prompt_request_receiver)
279279
.conversation_id(&conversation_id)
280-
.build(os, Box::new(std::io::stderr()), !self.non_interactive)
280+
.build(os, Box::new(std::io::stderr()), !self.no_interactive)
281281
.await?;
282282
let tool_config = tool_manager.load_tools(os, &mut stderr).await?;
283283
let mut tool_permissions = ToolPermissions::new(tool_config.len());
@@ -320,7 +320,7 @@ impl ChatArgs {
320320
model_id,
321321
tool_config,
322322
tool_permissions,
323-
!self.non_interactive,
323+
!self.no_interactive,
324324
)
325325
.await?
326326
.spawn(os)

crates/chat-cli/src/cli/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ mod test {
355355
model: None,
356356
trust_all_tools: false,
357357
trust_tools: None,
358-
non_interactive: false
358+
no_interactive: false
359359
})),
360360
verbose: 2,
361361
help_all: false,
@@ -394,7 +394,7 @@ mod test {
394394
model: None,
395395
trust_all_tools: false,
396396
trust_tools: None,
397-
non_interactive: false
397+
no_interactive: false
398398
})
399399
);
400400
}
@@ -410,7 +410,7 @@ mod test {
410410
model: None,
411411
trust_all_tools: false,
412412
trust_tools: None,
413-
non_interactive: false
413+
no_interactive: false
414414
})
415415
);
416416
}
@@ -426,7 +426,7 @@ mod test {
426426
model: None,
427427
trust_all_tools: true,
428428
trust_tools: None,
429-
non_interactive: false
429+
no_interactive: false
430430
})
431431
);
432432
}
@@ -442,7 +442,7 @@ mod test {
442442
model: None,
443443
trust_all_tools: false,
444444
trust_tools: None,
445-
non_interactive: true
445+
no_interactive: true
446446
})
447447
);
448448
assert_parse!(
@@ -454,7 +454,7 @@ mod test {
454454
model: None,
455455
trust_all_tools: false,
456456
trust_tools: None,
457-
non_interactive: true
457+
no_interactive: true
458458
})
459459
);
460460
}
@@ -470,7 +470,7 @@ mod test {
470470
model: None,
471471
trust_all_tools: true,
472472
trust_tools: None,
473-
non_interactive: false
473+
no_interactive: false
474474
})
475475
);
476476
}
@@ -486,7 +486,7 @@ mod test {
486486
model: None,
487487
trust_all_tools: false,
488488
trust_tools: Some(vec!["".to_string()]),
489-
non_interactive: false
489+
no_interactive: false
490490
})
491491
);
492492
}
@@ -502,7 +502,7 @@ mod test {
502502
model: None,
503503
trust_all_tools: false,
504504
trust_tools: Some(vec!["fs_read".to_string(), "fs_write".to_string()]),
505-
non_interactive: false
505+
no_interactive: false
506506
})
507507
);
508508
}

0 commit comments

Comments
 (0)