Review-Agent: Default=Approved + vollständige Tool-Boxes für Sub-Agents
Backend:
- Review-Agent: Default = Approved (analog zum Preparer Default=Forward)
Nur bei explizitem [FEEDBACK]-Tag wird Feedback zurückgespielt
Verhindert Loop wenn Review-Agent bestätigt ohne [APPROVED]-Tag
- Neues SSE-Event {agentType}_tool_end für Sub-Agent Tool-Ergebnisse
Sendet toolName, input, result, isError nach Tool-Ausführung
Frontend Streaming (stream-ui.js + chat.js):
- addReviewToolUse: Vollständige Tool-Box mit Loading-Spinner statt nur Name
- finishReviewToolBox: Befüllt Tool-Box nach tool_end mit Details (Pfad, Diff, Result)
- Event-Handler für preparer/review/finalizer_tool_end
Frontend History (history.js):
- _renderReviewGroup: Vollständige Tool-Boxes statt einfache Tool-Use-Indikatoren
- Tool-Result Look-Ahead für korrekte Zuordnung (toolCallId-Match)
- Web-Search-Sources in Review-Bubbles unterstützt
- Tool-Visibility-Filter (isToolVisible) auch für Sub-Agent-Tools
CSS:
- .review-tool-use → .review-tool-box (erbt normale Tool-Box-Styles)
This commit is contained in:
1 parent
f3b6491643
commit
1fc6889ced
5 files changed
+93
-30
No files matched your search
+21
-3
@@ -87,15 +87,32 @@ function appendToReviewText(text) {
|
||||
scrollDown();
|
||||
}
|
||||
|
||||
let _currentReviewToolBox = null;
|
||||
|
||||
function addReviewToolUse(data) {
|
||||
if (!_reviewBubble) return;
|
||||
const toolDiv = document.createElement('div');
|
||||
toolDiv.className = 'review-tool-use';
|
||||
toolDiv.innerHTML = '<i class="fa fa-wrench"></i> <span class="tool-name">' + esc(data.toolName) + '</span>';
|
||||
if (!isToolVisible(data.toolName)) {
|
||||
_currentReviewToolBox = null;
|
||||
return;
|
||||
}
|
||||
var toolDiv = document.createElement('div');
|
||||
toolDiv.className = 'tool-box review-tool-box streamed';
|
||||
toolDiv.dataset.toolName = data.toolName;
|
||||
var displayName = TOOL_DISPLAY_NAMES[data.toolName] || data.toolName;
|
||||
toolDiv.innerHTML = '<span class="tool-name">' + esc(displayName) + '</span> <span class="tool-spinner"><i class="fa fa-hourglass-half"></i></span>';
|
||||
_reviewBubble.appendChild(toolDiv);
|
||||
_currentReviewToolBox = toolDiv;
|
||||
scrollDown();
|
||||
}
|
||||
|
||||
function finishReviewToolBox(data) {
|
||||
if (_currentReviewToolBox) {
|
||||
renderToolBoxContent(_currentReviewToolBox, data.toolName, data.input, data.result, data.isError, data.sources);
|
||||
_currentReviewToolBox = null;
|
||||
scrollDown();
|
||||
}
|
||||
}
|
||||
|
||||
function finalizeReviewBubble(type, data, agentType) {
|
||||
if (!_reviewBubble) return;
|
||||
const status = document.createElement('div');
|
||||
@@ -120,5 +137,6 @@ function finalizeReviewBubble(type, data, agentType) {
|
||||
_reviewBubble = null;
|
||||
_reviewTextEl = null;
|
||||
_reviewText = '';
|
||||
_currentReviewToolBox = null;
|
||||
scrollDown();
|
||||
}
|
||||
Reference in new issue
Block a user