fix: 修复实时日志与数据库切换可靠性
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Sync LobeHub models / sync (push) Has been cancelled
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Sync LobeHub models / sync (push) Has been cancelled
This commit is contained in:
1 parent
2efaa4fb35
commit
ce0f41c973
30 files changed
+814
-461
No files matched your search
@@ -4,7 +4,7 @@ use std::path::PathBuf;
|
||||
use theseus::logs::LogType;
|
||||
use theseus::logs::{
|
||||
self, CensoredString, CrashAnalysis, CrashAnalysisAiExplanation,
|
||||
CrashAnalysisAiSettings, LatestLogCursor, Logs,
|
||||
CrashAnalysisAiSettings, LatestLogCursor, LiveLogSnapshot, Logs,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -26,8 +26,7 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
logs_delete_logs,
|
||||
logs_delete_logs_by_filename,
|
||||
logs_get_latest_log_cursor,
|
||||
logs_get_minecraft_latest_log_cursor,
|
||||
logs_get_live_log_buffer,
|
||||
logs_get_live_log_snapshot,
|
||||
logs_clear_live_log_buffer,
|
||||
logs_analyze_crash,
|
||||
logs_get_crash_analysis_ai_settings,
|
||||
@@ -95,24 +94,12 @@ pub async fn logs_get_latest_log_cursor(
|
||||
Ok(logs::get_latest_log_cursor(instance_id, cursor).await?)
|
||||
}
|
||||
|
||||
/// Get Minecraft's logs/latest.log from a cursor.
|
||||
#[tauri::command]
|
||||
pub async fn logs_get_minecraft_latest_log_cursor(
|
||||
instance_id: &str,
|
||||
cursor: u64, // 0 to start at beginning of file
|
||||
) -> Result<LatestLogCursor> {
|
||||
Ok(
|
||||
logs::get_generic_live_log_cursor(instance_id, "latest.log", cursor)
|
||||
.await?,
|
||||
)
|
||||
}
|
||||
|
||||
/// Get all buffered live log lines for an instance.
|
||||
#[tauri::command]
|
||||
pub async fn logs_get_live_log_buffer(
|
||||
pub async fn logs_get_live_log_snapshot(
|
||||
instance_id: &str,
|
||||
) -> Result<CensoredString> {
|
||||
Ok(logs::get_live_log_buffer(instance_id).await?)
|
||||
) -> Result<LiveLogSnapshot> {
|
||||
Ok(logs::get_live_log_snapshot(instance_id).await?)
|
||||
}
|
||||
|
||||
/// Clear the live log buffer for an instance.
|
||||
|
||||
Reference in new issue
Block a user