fix(butler): wire verification gaps — pain storage init, cold start, UI mode switches
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Call init_pain_storage() in Tauri .setup() so pain persistence activates on boot - Integrate useColdStart hook into FirstConversationPrompt for auto-greeting - Add UI mode toggle section to Settings/General (already had imports) - Add "简洁" mode switch-back button to TopBar in professional layout - Update SemanticSkillRouter @reserved annotation to reflect active status
This commit is contained in:
@@ -155,6 +155,25 @@ pub fn run() {
|
||||
.expect("In-memory SQLite should never fail")
|
||||
});
|
||||
app.manage(persistence);
|
||||
|
||||
// Initialize pain point persistence (SQLite-backed).
|
||||
// Must complete before event loop starts so that pain aggregator
|
||||
// has a valid storage layer for dual-write operations.
|
||||
{
|
||||
let app_dir = app.path().app_data_dir().expect("Failed to get app data dir");
|
||||
let pain_db_dir = app_dir.join("intelligence");
|
||||
std::fs::create_dir_all(&pain_db_dir).expect("Failed to create intelligence dir");
|
||||
|
||||
let db_path = pain_db_dir.join("pain.db");
|
||||
let db_url = format!("sqlite:{}", db_path.display());
|
||||
let pool = rt.block_on(sqlx::SqlitePool::connect(&db_url))
|
||||
.expect("Failed to connect pain storage SQLite pool");
|
||||
|
||||
if let Err(e) = rt.block_on(intelligence::pain_aggregator::init_pain_storage(pool)) {
|
||||
tracing::error!("[PainStorage] Init failed: {}, pain points will not persist", e);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
|
||||
Reference in New Issue
Block a user