ito_core/harness/
github_copilot.rs1use super::streaming_cli::CliHarness;
2use super::types::{HarnessName, HarnessRunConfig};
3
4#[derive(Debug, Default)]
18pub struct GitHubCopilotHarness;
19
20impl CliHarness for GitHubCopilotHarness {
21 fn harness_name(&self) -> HarnessName {
22 HarnessName::GithubCopilot
23 }
24
25 fn binary(&self) -> &str {
26 "copilot"
27 }
28
29 fn build_args(&self, config: &HarnessRunConfig) -> Vec<String> {
30 let mut args = Vec::new();
31 if let Some(model) = config.model.as_deref() {
32 args.push("--model".to_string());
33 args.push(model.to_string());
34 }
35 if config.allow_all {
36 args.push("--yolo".to_string());
37 }
38 args.push("-p".to_string());
39 args.push(config.prompt.clone());
40 args
41 }
42}
43
44#[cfg(test)]
45#[path = "github_copilot_tests.rs"]
46mod github_copilot_tests;