agentswitch 0.6.0

一个通用的 Code Agent 工具配置切换器,支持将任意 OpenAI/Anthropic 协议模型接入到主流 Code Agent CLI 工具中
use thiserror::Error;

/// 补全错误类型
#[derive(Error, Debug)]
pub enum CompletionError {
    #[error("不支持的 Shell 类型: {0}")]
    UnsupportedShell(String),

    #[error("无法确定 Shell 类型")]
    CannotDetectShell,

    #[error("Shell 配置文件不存在: {0}")]
    ShellConfigNotFound(String),

    #[error("写入 Shell 配置文件失败: {0}")]
    CannotWriteShellConfig(String),

    #[error("补全脚本生成失败: {0}")]
    GenerationFailed(String),

    #[error("IO 错误: {0}")]
    Io(#[from] std::io::Error),
}