feat: MCP-Tools ask_user_choice + memory_read/write/list, Text-Marker entfernt
MCP-Server erweitert um ask_user_choice (Long-Poll), memory_read, memory_write und memory_list Tools. MCP-Config wird jetzt immer generiert (nicht nur bei Remote-Verbindung). InternalEndpoint um PendingChoices + choice-respond Endpoint ergänzt. Frontend differenziert CLI-Modus (choice-respond API) vs. API-Modus. Gesamter :::ASK_USER_CHOICE::: Text-Marker-Mechanismus aus ClaudeCliService, AnthropicService, markdown.js und stream-ui.js entfernt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
3b068a7866
commit
3e0a69e7a4
10 files changed
+493
-319
No files matched your search
+12
-1
@@ -78,7 +78,7 @@ function handleStreamEvent(eventType, data) {
|
||||
|
||||
case 'user_choice':
|
||||
endStreamBubble();
|
||||
addChoiceBubble(data.toolCallId, data.question, data.choices);
|
||||
addChoiceBubble(data.toolCallId, data.question, data.choices, true, data.viaCli);
|
||||
break;
|
||||
|
||||
// Preparer / Review / Finalizer events (shared pattern)
|
||||
@@ -425,6 +425,17 @@ async function handleChoiceClick(toolCallId, choice, bubbleDiv) {
|
||||
});
|
||||
bubbleDiv.classList.add('choice-answered');
|
||||
|
||||
// CLI-Modus: Antwort über internen Endpoint an MCP-Server weiterleiten (CLI läuft weiter)
|
||||
if (bubbleDiv.dataset.viaCli === 'true') {
|
||||
try {
|
||||
await apiChoiceRespond(getCurrentSessionId(), choice);
|
||||
} catch (e) {
|
||||
console.error('Choice respond failed:', e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// API-Modus: Normaler Chat-Flow (neue Chain)
|
||||
await _runStream((signal) => apiChatChoice(getCurrentSessionId(), toolCallId, choice, signal, _planModeActive));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user