diff --git a/Cargo.lock b/Cargo.lock index 82a142fa..e1365e9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -963,11 +963,10 @@ dependencies = [ [[package]] name = "half" -version = "2.3.1" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ - "cfg-if", "crunchy", ] @@ -1313,6 +1312,7 @@ dependencies = [ "clap", "color-eyre", "env_logger", + "is-terminal", "llm", "log", "num_cpus", diff --git a/binaries/llm-cli/Cargo.toml b/binaries/llm-cli/Cargo.toml index bb5ab08b..1cd6c34d 100644 --- a/binaries/llm-cli/Cargo.toml +++ b/binaries/llm-cli/Cargo.toml @@ -31,6 +31,10 @@ tracing-subscriber = {workspace = true } tracing = { workspace = true} tracing-appender = "0.2.2" +# TEMPORARY: This was introduced in Rust 1.70, but our MSRV is below this. +# Remove this once we bump our MSRV to 1.70. +is-terminal = "0.4" + [dev-dependencies] rusty-hook = "^0.11.2" diff --git a/binaries/llm-cli/src/main.rs b/binaries/llm-cli/src/main.rs index 73b7e061..f6377516 100644 --- a/binaries/llm-cli/src/main.rs +++ b/binaries/llm-cli/src/main.rs @@ -1,12 +1,13 @@ use std::{ convert::Infallible, fs::File, - io::{BufReader, BufWriter, IsTerminal}, + io::{BufReader, BufWriter}, }; use clap::Parser; use cli_args::Args; use color_eyre::eyre::{self, Context, ContextCompat}; +use is_terminal::IsTerminal; mod cli_args; mod interactive; diff --git a/crates/llm-base/Cargo.toml b/crates/llm-base/Cargo.toml index 51a0949e..0216525f 100644 --- a/crates/llm-base/Cargo.toml +++ b/crates/llm-base/Cargo.toml @@ -21,7 +21,7 @@ thiserror = { workspace = true } partial_sort = "0.2.0" serde_bytes = "0.11" memmap2 = { workspace = true } -half = "2.2.1" +half = "=2.2.1" tokenizers = {version="0.13.3", default-features=false, features=["onig"]} regex = "1.8" tracing = { workspace = true }