feat: Auto-Commit Flag für Agents - neues Property AgentRecord.AutoCommit (bool) - DB-Migration: agents.auto_commit INTEGER NOT NULL DEFAULT 0 - Agent Create/Update um autoCommit erweitert - SystemPromptBuilder: bedingte Commit-Regel im Verhalten-Abschnitt - AutoCommit=true: Agent MUSS nach Änderungen committen - AutoCommit=false: Agent darf NIE eigenständig committen - Frontend: Checkbox 'Auto-Commit erlauben' in Agent-Settings
This commit is contained in:
1 parent
ab4ce839b4
commit
5037c7d24e
6 files changed
+35
-10
No files matched your search
@@ -55,7 +55,8 @@ public static class AgentEndpoint
|
||||
Persona = body.TryGetProperty("persona", out var p) ? p.GetString() : null,
|
||||
Instructions = body.TryGetProperty("instructions", out var i) ? i.GetString() : null,
|
||||
ToolChoice = body.TryGetProperty("toolChoice", out var tc) ? tc.GetString() ?? "any" : "any",
|
||||
CustomCommands = customCommands
|
||||
CustomCommands = customCommands,
|
||||
AutoCommit = body.TryGetProperty("autoCommit", out var ac) && ac.GetBoolean()
|
||||
};
|
||||
|
||||
agent = await db.CreateAgent(agent);
|
||||
@@ -81,6 +82,7 @@ public static class AgentEndpoint
|
||||
if (body.TryGetProperty("toolChoice", out var tc)) agent.ToolChoice = tc.GetString();
|
||||
if (body.TryGetProperty("customCommands", out var cc))
|
||||
agent.CustomCommands = cc.ValueKind == JsonValueKind.Null ? null : cc.GetRawText();
|
||||
if (body.TryGetProperty("autoCommit", out var ac)) agent.AutoCommit = ac.GetBoolean();
|
||||
|
||||
await db.UpdateAgent(agent);
|
||||
agent = await db.GetAgent(agentId);
|
||||
|
||||
Reference in new issue
Block a user