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

-1
View File
@@ -99,7 +99,6 @@ function buildAgentCard(agent, skills) {
// Badges
const badges = [];
if (agent.toolChoice === 'any') badges.push('<span class="badge badge-forced-feature" title="Tool-Nutzung erzwingen"><i class="fa fa-wrench"></i> Erzwungen</span>');
if (agent.allowUserChoice) badges.push('<span class="badge badge-feature" title="Rückfragen per Auswahl erlaubt"><i class="fa fa-question-circle"></i> Rückfragen</span>');
if (agent.autoCommit === 'mention') badges.push('<span class="badge badge-feature" title="Git-Commits nur auf Anweisung"><i class="fa fa-code-fork"></i> Anmerken</span>');
if (agent.autoCommit === 'enforce') badges.push('<span class="badge badge-forced-feature" title="Git-Commits nach jeder Änderung erzwungen"><i class="fa fa-code-fork"></i> Erzwungen</span>');
-3
View File
@@ -18,7 +18,6 @@ registerPage('agent', {
const nameEl = document.getElementById('agentName');
const descEl = document.getElementById('agentDescription');
const modelEl = document.getElementById('agentModel');
const toolChoiceEl = document.getElementById('agentToolChoice');
const allowUserChoiceEl = document.getElementById('agentAllowUserChoice');
const autoCommitEl = document.getElementById('agentAutoCommit');
const useSoulEl = document.getElementById('agentUseSoul');
@@ -58,7 +57,6 @@ registerPage('agent', {
nameEl.value = agent.name || '';
descEl.value = agent.description || '';
modelEl.value = agent.model || 'sonnet';
toolChoiceEl.checked = (agent.toolChoice || 'any') === 'any';
allowUserChoiceEl.checked = agent.allowUserChoice !== false;
_agentTaskMde.value(agent.taskInstruction || '');
autoCommitEl.value = agent.autoCommit || '';
@@ -101,7 +99,6 @@ registerPage('agent', {
name: nameEl.value.trim() || 'Unbenannt',
description: descEl.value.trim(),
model: modelEl.value,
toolChoice: toolChoiceEl.checked ? 'any' : 'auto',
allowUserChoice: allowUserChoiceEl.checked,
autoCommit: autoCommitEl.value,
useSoul: useSoulEl.checked,