Breaking out some portions for integration testing.
This commit is contained in:
34
src/setup.rs
34
src/setup.rs
@@ -8,65 +8,65 @@ use tracing::{info, instrument};
|
||||
// TODO: use [clap(long, short, help_heading = Some(section))]
|
||||
#[derive(Clone, Debug, Parser)]
|
||||
#[command(about, version)]
|
||||
pub(crate) struct Args {
|
||||
pub struct Args {
|
||||
#[arg(short, long)]
|
||||
/// API Key for the LLM in use.
|
||||
pub(crate) api_key: Option<String>,
|
||||
pub api_key: Option<String>,
|
||||
|
||||
#[arg(short, long, default_value = "https://api.openai.com")]
|
||||
/// Base URL for the LLM API to use.
|
||||
pub(crate) base_url: Option<String>,
|
||||
pub base_url: Option<String>,
|
||||
|
||||
/// Directory to use for chroot (recommended).
|
||||
#[arg(long)]
|
||||
pub(crate) chroot_dir: Option<String>,
|
||||
pub chroot_dir: Option<String>,
|
||||
|
||||
/// Root directory for file based command structure.
|
||||
#[arg(long)]
|
||||
pub(crate) command_dir: Option<String>,
|
||||
pub command_dir: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// Instructions to the model on how to behave.
|
||||
pub(crate) instruct: Option<String>,
|
||||
pub instruct: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
pub(crate) model: Option<String>,
|
||||
pub model: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// List of IRC channels to join.
|
||||
pub(crate) channels: Option<Vec<String>>,
|
||||
pub channels: Option<Vec<String>>,
|
||||
|
||||
#[arg(short, long)]
|
||||
/// Custom configuration file location if need be.
|
||||
pub(crate) config_file: Option<PathBuf>,
|
||||
pub config_file: Option<PathBuf>,
|
||||
|
||||
#[arg(short, long, default_value = "irc.libera.chat")]
|
||||
/// IRC server.
|
||||
pub(crate) server: Option<String>,
|
||||
pub server: Option<String>,
|
||||
|
||||
#[arg(short, long, default_value = "6697")]
|
||||
/// Port of the IRC server.
|
||||
pub(crate) port: Option<String>,
|
||||
pub port: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// IRC Nickname.
|
||||
pub(crate) nickname: Option<String>,
|
||||
pub nickname: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// IRC Nick Password
|
||||
pub(crate) nick_password: Option<String>,
|
||||
pub nick_password: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// IRC Username
|
||||
pub(crate) username: Option<String>,
|
||||
pub username: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// Whether or not to use TLS when connecting to the IRC server.
|
||||
pub(crate) use_tls: Option<bool>,
|
||||
pub use_tls: Option<bool>,
|
||||
}
|
||||
|
||||
pub(crate) struct Setup {
|
||||
pub(crate) config: Config,
|
||||
pub struct Setup {
|
||||
pub config: Config,
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
|
||||
Reference in New Issue
Block a user