feat: Agent-Einstellung 'Rückfragen erlauben' (allowUserChoice)

- Neues Feld AllowUserChoice (bool, default true) im AgentRecord
- DB-Migration: allow_user_choice Spalte mit DEFAULT 1
- Agent-Form: Checkbox 'Rückfragen erlauben' nach 'Tool-Nutzung erzwingen'
- ToolService.GetToolDefinitions: neuer Parameter includeUserChoice
- ask_user_choice Tool wird nur eingebunden wenn Agent es erlaubt
- Review-Agents und Non-Streaming (Cronjobs) erhalten nie ask_user_choice
- ChatEndpoint reicht Agent.AllowUserChoice an StreamChat durch
This commit is contained in:
Meleki committed 2026-03-07 11:36:02 +01:00
1 parent 5f3e308975
commit 89ceb61948
10 files changed
+26 -36

No files matched your search

+3
View File
@@ -18,6 +18,7 @@ registerPage('agent', {
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');
const useIdentityEl = document.getElementById('agentUseIdentity');
@@ -49,6 +50,7 @@ registerPage('agent', {
descEl.value = agent.description || '';
modelEl.value = agent.model || 'sonnet';
toolChoiceEl.checked = (agent.toolChoice || 'any') === 'any';
allowUserChoiceEl.checked = agent.allowUserChoice !== false;
autoCommitEl.value = agent.autoCommit || '';
useSoulEl.checked = agent.useSoul !== false;
useIdentityEl.checked = agent.useIdentity !== false;
@@ -94,6 +96,7 @@ registerPage('agent', {
description: descEl.value.trim(),
model: modelEl.value,
toolChoice: toolChoiceEl.checked ? 'any' : 'auto',
allowUserChoice: allowUserChoiceEl.checked,
autoCommit: autoCommitEl.value,
useSoul: useSoulEl.checked,
useIdentity: useIdentityEl.checked,