fix(growth): 审计修复 — CRITICAL 编译错误 + LOW 静默数据丢失
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
- CRITICAL: extraction_adapter.rs extract_with_prompt() 使用不存在的 zclaw_types::Error::msg(),改为 ZclawError::InvalidInput/ZclawError::LlmError - LOW: feedback_collector.rs save() 中 serde_json::to_string().unwrap_or_default() 改为显式错误处理 + warn 日志 + continue,避免静默存空数据
This commit is contained in:
@@ -233,8 +233,8 @@ impl LlmDriverForExtraction for TauriExtractionDriver {
|
||||
user_prompt: &str,
|
||||
) -> Result<String> {
|
||||
if messages.len() < 2 {
|
||||
return Err(zclaw_types::Error::msg(
|
||||
"Too few messages for combined extraction",
|
||||
return Err(zclaw_types::ZclawError::InvalidInput(
|
||||
"Too few messages for combined extraction".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -276,8 +276,8 @@ impl LlmDriverForExtraction for TauriExtractionDriver {
|
||||
.join("");
|
||||
|
||||
if response_text.is_empty() {
|
||||
return Err(zclaw_types::Error::msg(
|
||||
"Empty response from LLM for combined extraction",
|
||||
return Err(zclaw_types::ZclawError::LlmError(
|
||||
"Empty response from LLM for combined extraction".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user