logicaffeine_web/ui/pages/contact/
content.rs1use std::sync::LazyLock;
10
11
12pub const TEAM_EMAIL: &str = "[email protected]";
15
16pub const INSTALL_UNIX: &str = "curl -fsSL https://logicaffeine.com/install.sh | sh";
18pub const INSTALL_WINDOWS: &str = "irm https://logicaffeine.com/install.ps1 | iex";
19
20pub const CONTACT_HEADING: &str = "Contact the team";
22
23pub const SEND: &str = "Send";
25
26pub const OPEN_SOURCE_LINE: &str = "LOGOS is open source under the MIT License. Use it for anything, for anyone, at any size.";
28
29pub const LICENSE_URL: &str = "https://github.com/Brahmastra-Labs/logicaffeine/blob/main/LICENSE.md";
30pub const SOURCE_URL: &str = "https://github.com/Brahmastra-Labs/logicaffeine";
31
32pub const ASSISTANT_GUIDE_URL: &str = "https://logicaffeine.com/llms-full.txt";
35
36pub enum Evidence {
38 Suites(&'static [&'static str]),
40}
41
42pub struct Claim {
44 pub text: String,
45 pub evidence: Evidence,
46}
47
48fn proven(text: impl Into<String>, suites: &'static [&'static str]) -> Claim {
49 Claim { text: text.into(), evidence: Evidence::Suites(suites) }
50}
51
52#[derive(PartialEq)]
53pub struct FaqLink {
54 pub text: &'static str,
55 pub href: &'static str,
56}
57
58#[derive(PartialEq)]
59pub struct Faq {
60 pub question: String,
61 pub answer: String,
62 pub link: Option<FaqLink>,
64}
65
66pub fn free_answer() -> String {
68 format!("Yes. {OPEN_SOURCE_LINE}")
69}
70
71pub fn faq() -> &'static [Faq] {
72 static FAQ: LazyLock<Vec<Faq>> = LazyLock::new(|| {
73 let plain = |question: &str, answer: String| Faq { question: question.to_string(), answer, link: None };
74 vec![
75 plain("Is LOGOS free?", free_answer()),
76 Faq {
77 question: "What is the license?".into(),
78 answer: "The MIT License, the whole of it in LICENSE.md.".into(),
79 link: Some(FaqLink { text: "LICENSE.md", href: LICENSE_URL }),
80 },
81 Faq {
82 question: "Where is the source?".into(),
83 answer: "On GitHub: github.com/Brahmastra-Labs/logicaffeine".into(),
84 link: Some(FaqLink { text: "github.com/Brahmastra-Labs/logicaffeine", href: SOURCE_URL }),
85 },
86 plain("How do I reach the team?", format!("Send the form on this page, or write to {TEAM_EMAIL}.")),
87 ]
88 });
89 &FAQ
90}
91
92pub fn every_claim() -> Vec<(String, &'static Evidence)> {
94 static OPEN: LazyLock<Claim> = LazyLock::new(|| proven(OPEN_SOURCE_LINE, &["version_lock"]));
95 vec![(OPEN.text.clone(), &OPEN.evidence)]
96}