Remove tool_choice agent option - auto-detect based on workspace/skills/memory

- Remove tool_choice from AgentEndpoint (create, update, list responses)
- ChatService: automatically set tool_choice='any' when workspace, memory
  or skills present, null otherwise. Same for preparer/review/finalizer
- SystemPromptBuilder: remove 3 toolAny-conditional prompt blocks
  (KRITISCH, Verhalten, ERINNERUNG)
- Frontend: remove checkbox, badge and JS references
- Agent.ToolChoice DB field preserved for backward compat, no longer read
This commit is contained in:
Meleki committed 2026-03-09 05:39:09 +01:00
1 parent 677b227200
commit 83945689a6
6 files changed
+10 -55

No files matched your search

-4
View File
@@ -46,7 +46,6 @@ public static class AgentEndpoint
Avatar = a.AvatarSmall ?? a.Avatar,
a.Description,
a.Model,
a.ToolChoice,
a.CustomCommands,
a.AutoCommit,
a.UseSoul,
@@ -94,7 +93,6 @@ public static class AgentEndpoint
Avatar = a.AvatarSmall ?? a.Avatar,
a.Description,
a.Model,
a.ToolChoice,
a.CustomCommands,
a.AutoCommit,
a.UseSoul,
@@ -150,7 +148,6 @@ public static class AgentEndpoint
AvatarSmall = imageService.ResizeDataUrlSmall(avatarRaw),
Description = body.TryGetProperty("description", out var d) ? d.GetString() : null,
Model = body.TryGetProperty("model", out var m) ? m.GetString() ?? "sonnet" : "sonnet",
ToolChoice = body.TryGetProperty("toolChoice", out var tc) ? tc.GetString() ?? "any" : "any",
CustomCommands = customCommands,
AutoCommit = body.TryGetProperty("autoCommit", out var ac) ? ac.GetString() ?? "" : "",
UseSoul = !body.TryGetProperty("useSoul", out var us) || us.GetBoolean(),
@@ -191,7 +188,6 @@ public static class AgentEndpoint
}
if (body.TryGetProperty("description", out var d)) agent.Description = d.GetString();
if (body.TryGetProperty("model", out var m)) agent.Model = m.GetString();
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.GetString() ?? "";