aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/manifest.rs
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-16 14:18:04 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-16 14:18:22 +0800
commit73ddf24b04bf94ee7fa76974e1af55eb94112b93 (patch)
tree421bd2e8af7e720ed5b2fb23e92601cfeecd25ad /src-tauri/src/core/manifest.rs
parenta38e61c30798efa3ab2231f99537828be5d5637b (diff)
downloadDropOut-73ddf24b04bf94ee7fa76974e1af55eb94112b93.tar.gz
DropOut-73ddf24b04bf94ee7fa76974e1af55eb94112b93.zip
feat: integrate AI assistant functionality and configuration management
Implemented new commands for managing the AI assistant, including health checks, chat interactions, and model listings for both Ollama and OpenAI. Enhanced the configuration system to support raw JSON editing and added a dedicated AssistantConfig structure for better management of assistant settings. This update significantly improves the user experience by providing comprehensive control over AI interactions and configurations.
Diffstat (limited to 'src-tauri/src/core/manifest.rs')
-rw-r--r--src-tauri/src/core/manifest.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-tauri/src/core/manifest.rs b/src-tauri/src/core/manifest.rs
index bae87c9..d92ae58 100644
--- a/src-tauri/src/core/manifest.rs
+++ b/src-tauri/src/core/manifest.rs
@@ -45,7 +45,7 @@ pub async fn fetch_version_manifest() -> Result<VersionManifest, Box<dyn Error +
/// # Returns
/// The parsed `GameVersion` if found, or an error if not found.
pub async fn load_local_version(
- game_dir: &PathBuf,
+ game_dir: &std::path::Path,
version_id: &str,
) -> Result<GameVersion, Box<dyn Error + Send + Sync>> {
let json_path = game_dir
@@ -102,7 +102,7 @@ pub async fn fetch_vanilla_version(
/// # Returns
/// A fully resolved `GameVersion` ready for launching.
pub async fn load_version(
- game_dir: &PathBuf,
+ game_dir: &std::path::Path,
version_id: &str,
) -> Result<GameVersion, Box<dyn Error + Send + Sync>> {
// Try loading from local first
@@ -138,7 +138,7 @@ pub async fn load_version(
/// # Returns
/// The path where the JSON was saved.
pub async fn save_local_version(
- game_dir: &PathBuf,
+ game_dir: &std::path::Path,
version: &GameVersion,
) -> Result<PathBuf, Box<dyn Error + Send + Sync>> {
let version_dir = game_dir.join("versions").join(&version.id);
@@ -158,8 +158,9 @@ pub async fn save_local_version(
///
/// # Returns
/// A list of version IDs found in the versions directory.
+#[allow(dead_code)]
pub async fn list_local_versions(
- game_dir: &PathBuf,
+ game_dir: &std::path::Path,
) -> Result<Vec<String>, Box<dyn Error + Send + Sync>> {
let versions_dir = game_dir.join("versions");
let mut versions = Vec::new();