update the ToS agree message

This commit is contained in:
b1ek 2024-10-22 11:35:42 +10:00
parent 8add7ff0ff
commit fa9a151d85
Signed by: blek
GPG Key ID: A622C22C9BC616B2
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
use crate::{RED, BLUE, WARN, RESET};
use crate::{RED, BLUE, WARN, RESET, GRAY};
use std::{env, error::Error, fs, io, path::PathBuf, process::exit};
@ -59,9 +59,13 @@ impl Config {
pub fn check_tos(&self) -> () {
if ! self.tos {
eprintln!("{RED}You need to agree to duckduckgo AI chat TOS to continue.{RESET}");
eprintln!("{RED}Visit it on this URL: {RESET}{BLUE}https://duckduckgo.com/?q=duckduckgo+ai+chat&ia=chat{RESET}");
eprintln!("Once you read it, pass --agree-tos parameter to agree.");
eprintln!("{RED}You need to agree to DuckDuckgo AI Chat TOS to continue.{RESET}");
eprintln!("{GRAY}Visit it on this URL: {RESET}{BLUE}https://duck.ai{RESET}");
eprintln!();
eprintln!("{GRAY}If it doesnt pop up, open the URL in a private window.{RESET}");
eprintln!("{GRAY}Running this command is equivalent to clicking \"I Agree\" in the ToS window:{RESET}");
eprintln!("{BLUE} {} --agree-tos{RESET}", std::env::current_exe().unwrap().display());
eprintln!();
eprintln!("{WARN}Note: if you want to, modify `tos` parameter in {}{RESET}", Config::get_path::<PathBuf>().join(Config::get_file_name::<String>()).display());
exit(3);
}

View File

@ -17,6 +17,7 @@ pub const RED: &str = "\x1b[1;31m";
pub const BLUE: &str = "\x1b[34m";
pub const WARN: &str = "\x1b[33m";
pub const RESET: &str = "\x1b[0m";
pub const GRAY: &str = "\x1b[30m";
#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]