generated from hack-ink/rust-initializer
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f78bcf
commit 0439701
Showing
14 changed files
with
230 additions
and
163 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
[package] | ||
authors = ["Xavier Lau <[email protected]>"] | ||
build = "build.rs" | ||
description = "AI with Rust." | ||
edition = "2021" | ||
homepage = "https://hack.ink/air" | ||
|
@@ -23,9 +22,10 @@ inherits = "dev" | |
inherits = "release" | ||
lto = true | ||
|
||
[build-dependencies] | ||
# crates.io | ||
vergen = { version = "8.2", features = ["build", "cargo", "git", "gitcl"] } | ||
[features] | ||
default = [] | ||
dev = [] | ||
tokenizer = ["llm_utils"] | ||
|
||
[dependencies] | ||
# crates.io | ||
|
@@ -40,15 +40,15 @@ enigo = { version = "0.2" } | |
futures = { version = "0.3" } | ||
get-selected-text = { version = "0.1" } | ||
global-hotkey = { version = "0.5" } | ||
# TODO?: remove it since it requires libxml2. | ||
llm_utils = { version = "0.0.6" } | ||
llm_utils = { version = "0.0.6", optional = true } | ||
reqwew = { version = "0.2" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
thiserror = { version = "1.0" } | ||
tokio = { version = "1.38", features = ["rt-multi-thread"] } | ||
toml = { version = "0.8" } | ||
tracing = { version = "0.1" } | ||
tracing-subscriber = { version = "0.3" } | ||
tracing-appender = { version = "0.2" } | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
|
||
[target.'cfg(target_os = "macos")'.dependencies] | ||
# accessibility = { version = "0.1" } | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
// std | ||
use std::{fs, path::PathBuf}; | ||
// crates.io | ||
use app_dirs2::{AppDataType, AppInfo}; | ||
use app_dirs2::AppDataType; | ||
use async_openai::config::OPENAI_API_BASE; | ||
use eframe::egui::WidgetText; | ||
use serde::{Deserialize, Serialize}; | ||
// self | ||
use super::openai::Model; | ||
use crate::prelude::*; | ||
|
||
const APP: AppInfo = AppInfo { name: "AiR", author: "[email protected]" }; | ||
use crate::{prelude::*, APP_INFO}; | ||
|
||
#[derive(Debug, Default, Serialize, Deserialize)] | ||
#[serde(rename_all = "kebab-case")] | ||
|
@@ -20,7 +18,7 @@ pub struct Setting { | |
} | ||
impl Setting { | ||
pub fn path() -> Result<PathBuf> { | ||
Ok(app_dirs2::get_app_root(AppDataType::UserConfig, &APP).map(|p| p.join(".airrc"))?) | ||
Ok(app_dirs2::get_app_root(AppDataType::UserConfig, &APP_INFO).map(|p| p.join(".airrc"))?) | ||
} | ||
|
||
pub fn load() -> Result<Self> { | ||
|
@@ -57,7 +55,6 @@ impl Default for General { | |
} | ||
} | ||
|
||
// TODO: support Google Gemini. | ||
#[derive(Clone, Debug, Serialize, Deserialize)] | ||
#[serde(rename_all = "kebab-case")] | ||
pub struct Ai { | ||
|
Oops, something went wrong.