fix: resolve 6 remaining defects (P2-18, P2-21, P3-04, P3-05, P3-06, P3-02)
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

- P2-18: TOTP QR code local generation via qrcode lib (no external service)
- P2-21: Suspend foreign LLM providers (OpenAI/Anthropic/Gemini) for early stage
- P3-04: get_progress() now calculates actual percentage from completed/total steps
- P3-05: saveSaaSSession calls now have .catch() error logging
- P3-06: SaaS relay chatStream passes session_key/agent_id to backend
- P3-02: Whiteboard unification plan document created

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-06 09:52:28 +08:00
parent d3da7d4dbb
commit 828be3cc9e
13 changed files with 414 additions and 58 deletions

View File

@@ -200,9 +200,16 @@ pub async fn chat_completions(
state.cache.relay_enqueue(&ctx.account_id);
// 异步派发操作日志(非阻塞,不占用关键路径 DB 连接)
// P3-06: Include session_key/agent_id in log for traceability
let log_meta = serde_json::json!({
"model": model_name,
"stream": stream,
"session_key": req.get("session_key").and_then(|v| v.as_str()),
"agent_id": req.get("agent_id").and_then(|v| v.as_str()),
});
state.dispatch_log_operation(
&ctx.account_id, "relay.request", "relay_task", &task.id,
Some(serde_json::json!({"model": model_name, "stream": stream})), ctx.client_ip.as_deref(),
Some(log_meta), ctx.client_ip.as_deref(),
).await;
// 执行中转:根据解析结果选择执行路径