fix: ask_user_choice Short-Poll, Freitext-Option, Stop-Kontext-Fix

- Long-Poll durch Short-Poll ersetzt (MCP-Server pollt jede Sekunde statt einer blockierenden HTTP-Anfrage)
- Expliziter Lambda-Rückgabetyp Task<IResult> für ASP.NET Minimal API Endpoints (behebt 200 empty body Bug)
- Freitext-Option bei Choice-Buttons ("Eigene Antwort…") für freie User-Eingabe
- Stop während ask_user_choice markiert Chain als awaiting_user_choice statt stopped (Kontext bleibt erhalten)
- ask_user_choice System-Prompt-Instruktion breiter formuliert (Quiz, Multiple-Choice etc.)
- Text wird jetzt immer in DB gespeichert, auch bei ask_user_choice
- Key-Check Model auf claude-haiku-4-5 geändert

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MelekiandClaude Opus 4.6 committed 2026-03-18 11:32:25 +01:00
1 parent 3e0a69e7a4
commit 92ecaf9dac
8 files changed
+184 -66

No files matched your search

+42
View File
@@ -215,6 +215,48 @@ function _createChoiceBubble(opts) {
}
div.appendChild(buttonsDiv);
// Freitext-Option (nur wenn noch nicht beantwortet)
if (!answered) {
const customDiv = document.createElement('div');
customDiv.className = 'choice-custom';
const toggleLink = document.createElement('a');
toggleLink.className = 'choice-custom-toggle';
toggleLink.href = '#';
toggleLink.textContent = 'Eigene Antwort…';
toggleLink.addEventListener('click', function(e) {
e.preventDefault();
customDiv.classList.add('choice-custom-open');
customDiv.querySelector('.choice-custom-input').focus();
});
customDiv.appendChild(toggleLink);
const inputRow = document.createElement('div');
inputRow.className = 'choice-custom-row';
const input = document.createElement('input');
input.type = 'text';
input.className = 'choice-custom-input';
input.placeholder = 'Eigene Antwort eingeben…';
var sendCustom = function() {
var text = input.value.trim();
if (!text) return;
handleChoiceClick(opts.toolCallId, text, div);
};
input.addEventListener('keydown', function(e) { if (e.key === 'Enter') sendCustom(); });
var sendBtn = document.createElement('button');
sendBtn.className = 'choice-custom-send';
sendBtn.textContent = '↵';
sendBtn.addEventListener('click', sendCustom);
inputRow.appendChild(input);
inputRow.appendChild(sendBtn);
customDiv.appendChild(inputRow);
div.appendChild(customDiv);
}
if (opts.timestamp) _addTimestamp(div, opts.timestamp);
return div;
}