fix(tauri): replace silent let _ = with structured logging across 20 modules
Replace error-swallowing let _ = patterns with tracing::warn! in browser, classroom, gateway, intelligence, memory, pipeline, secure_storage, and viking command handlers. Ensures errors are observable in production logs.
This commit is contained in:
@@ -47,6 +47,7 @@ pub struct ClassroomChatCmdRequest {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Send a message in the classroom chat and get multi-agent responses.
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn classroom_chat(
|
||||
store: State<'_, ClassroomStore>,
|
||||
@@ -107,6 +108,7 @@ pub async fn classroom_chat(
|
||||
}
|
||||
|
||||
/// Retrieve chat history for a classroom
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn classroom_chat_history(
|
||||
chat_store: State<'_, ChatStore>,
|
||||
|
||||
@@ -32,6 +32,7 @@ pub struct ClassroomExportResponse {
|
||||
// Command
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// @reserved: 暂无前端集成
|
||||
#[tauri::command]
|
||||
pub async fn classroom_export(
|
||||
store: State<'_, ClassroomStore>,
|
||||
|
||||
@@ -88,6 +88,7 @@ fn stage_name(stage: &GenerationStage) -> &'static str {
|
||||
/// Start classroom generation (4-stage pipeline).
|
||||
/// Progress events are emitted via `classroom:progress`.
|
||||
/// Supports cancellation between stages by removing the task from GenerationTasks.
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn classroom_generate(
|
||||
app: AppHandle,
|
||||
@@ -232,6 +233,7 @@ pub async fn classroom_generate(
|
||||
}
|
||||
|
||||
/// Get current generation progress for a topic
|
||||
// @reserved: 暂无前端集成
|
||||
#[tauri::command]
|
||||
pub async fn classroom_generation_progress(
|
||||
tasks: State<'_, GenerationTasks>,
|
||||
@@ -248,6 +250,7 @@ pub async fn classroom_generation_progress(
|
||||
}
|
||||
|
||||
/// Cancel an active generation
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn classroom_cancel_generation(
|
||||
tasks: State<'_, GenerationTasks>,
|
||||
@@ -259,6 +262,7 @@ pub async fn classroom_cancel_generation(
|
||||
}
|
||||
|
||||
/// Retrieve a generated classroom by ID
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn classroom_get(
|
||||
store: State<'_, ClassroomStore>,
|
||||
@@ -271,6 +275,7 @@ pub async fn classroom_get(
|
||||
}
|
||||
|
||||
/// List all generated classrooms (id + title only)
|
||||
// @reserved: 暂无前端集成
|
||||
#[tauri::command]
|
||||
pub async fn classroom_list(
|
||||
store: State<'_, ClassroomStore>,
|
||||
|
||||
Reference in New Issue
Block a user