mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-14 08:01:05 +08:00
fix: persist subagent profile prompt settings
This commit is contained in:
@@ -5205,6 +5205,7 @@ func (s *Server) handleWebUISubagentProfiles(w http.ResponseWriter, r *http.Requ
|
|||||||
Action string `json:"action"`
|
Action string `json:"action"`
|
||||||
AgentID string `json:"agent_id"`
|
AgentID string `json:"agent_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
NotifyMainPolicy string `json:"notify_main_policy"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
SystemPromptFile string `json:"system_prompt_file"`
|
SystemPromptFile string `json:"system_prompt_file"`
|
||||||
MemoryNamespace string `json:"memory_namespace"`
|
MemoryNamespace string `json:"memory_namespace"`
|
||||||
@@ -5242,6 +5243,7 @@ func (s *Server) handleWebUISubagentProfiles(w http.ResponseWriter, r *http.Requ
|
|||||||
profile, err := store.Upsert(tools.SubagentProfile{
|
profile, err := store.Upsert(tools.SubagentProfile{
|
||||||
AgentID: agentID,
|
AgentID: agentID,
|
||||||
Name: body.Name,
|
Name: body.Name,
|
||||||
|
NotifyMainPolicy: body.NotifyMainPolicy,
|
||||||
Role: body.Role,
|
Role: body.Role,
|
||||||
SystemPromptFile: body.SystemPromptFile,
|
SystemPromptFile: body.SystemPromptFile,
|
||||||
MemoryNamespace: body.MemoryNamespace,
|
MemoryNamespace: body.MemoryNamespace,
|
||||||
@@ -5270,6 +5272,7 @@ func (s *Server) handleWebUISubagentProfiles(w http.ResponseWriter, r *http.Requ
|
|||||||
}
|
}
|
||||||
next := *existing
|
next := *existing
|
||||||
next.Name = body.Name
|
next.Name = body.Name
|
||||||
|
next.NotifyMainPolicy = body.NotifyMainPolicy
|
||||||
next.Role = body.Role
|
next.Role = body.Role
|
||||||
next.SystemPromptFile = body.SystemPromptFile
|
next.SystemPromptFile = body.SystemPromptFile
|
||||||
next.MemoryNamespace = body.MemoryNamespace
|
next.MemoryNamespace = body.MemoryNamespace
|
||||||
@@ -5331,6 +5334,7 @@ func (s *Server) handleWebUISubagentProfiles(w http.ResponseWriter, r *http.Requ
|
|||||||
profile, err := store.Upsert(tools.SubagentProfile{
|
profile, err := store.Upsert(tools.SubagentProfile{
|
||||||
AgentID: agentID,
|
AgentID: agentID,
|
||||||
Name: body.Name,
|
Name: body.Name,
|
||||||
|
NotifyMainPolicy: body.NotifyMainPolicy,
|
||||||
Role: body.Role,
|
Role: body.Role,
|
||||||
SystemPromptFile: body.SystemPromptFile,
|
SystemPromptFile: body.SystemPromptFile,
|
||||||
MemoryNamespace: body.MemoryNamespace,
|
MemoryNamespace: body.MemoryNamespace,
|
||||||
|
|||||||
Reference in New Issue
Block a user