fix(saas): deep audit round industry template system - critical fixes
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

C1: Use backend createAgentFromTemplate API + tools forwarding
C3: seed source='builtin' instead of 'custom'
C4: immutable clone data handling (return fresh from store) + spread)
H3: assignTemplate error propagation (try/catch)
H4: input validation for name/fields
H5: assign_template account existence check
H6: remove dead route get_full_template
H7: model fallback gpt-4o-mini (hardcoded constant)
H8: logout clears template state
H9: console.warn -> structured logger
C2: restoreSession fetches assignedTemplate
This commit is contained in:
iven
2026-04-03 19:45:25 +08:00
parent 0857a1f608
commit edecd4c81f
5 changed files with 62 additions and 802 deletions

View File

@@ -368,7 +368,8 @@ pub async fn create_agent_from_template(
Ok(AgentConfigFromTemplate {
name: t.name,
model: t.model.unwrap_or_else(|| "glm-4-flash".to_string()),
model: t.model.unwrap_or_else(|| "gpt-4o-mini".to_string()),
system_prompt: t.system_prompt,
tools: merged_tools,
soul_content: t.soul_content,