use std::path::Path;
use super::{AgentProvider, ProviderKind, ProviderOptions};
pub(crate) struct CopilotProvider;
impl AgentProvider for CopilotProvider {
fn kind(&self) -> ProviderKind {
ProviderKind::Copilot
}
fn build_command(
&self,
_prompt: &str,
working_dir: &Path,
_options: &ProviderOptions,
) -> tokio::process::Command {
let mut cmd = tokio::process::Command::new("sh");
cmd.arg("-c").arg(
"printf 'ccswarm: the `copilot` provider is not supported for code generation.\\n\
`gh copilot suggest` is interactive and returns shell-command strings, not file edits.\\n\
Use `claude` (default) or `codex` instead.\\n' >&2; exit 2",
);
cmd.current_dir(working_dir);
cmd
}
}