Added chroot support.

This commit is contained in:
Micheal Smith
2025-08-11 19:31:38 -05:00
parent ce426c3218
commit b86e46fe00
4 changed files with 28 additions and 4 deletions

View File

@@ -23,6 +23,14 @@ pub(crate) struct Args {
/// Base URL for the LLM API to use.
pub(crate) base_url: Option<String>,
/// Directory to use for chroot (recommended).
#[arg(long)]
pub(crate) chroot_dir: Option<String>,
/// Root directory for file based command structure.
#[arg(long)]
pub(crate) command_dir: Option<String>,
#[arg(long)]
/// Instructions to the model on how to behave.
pub(crate) intruct: Option<String>,
@@ -93,6 +101,8 @@ pub async fn init() -> Result<Setup> {
// but a derive macro could do this a bit better if this becomes too large.
.set_override_option("api-key", args.api_key.clone())?
.set_override_option("base-url", args.base_url.clone())?
.set_override_option("chroot-dir", args.chroot_dir.clone())?
.set_override_option("command-path", args.command_dir.clone())?
.set_override_option("model", args.model.clone())?
.set_override_option("instruct", args.model.clone())?
.set_override_option("channels", args.channels.clone())?