Web-Search: Streaming-Fix (pauseStreamBubble statt resumeStreamBubble), leere Suchergebnisse nicht speichern, Sources auf Shared-Pages anzeigen
This commit is contained in:
1 parent
d81dab635a
commit
6c38ccfe12
7 files changed
+103
-74
No files matched your search
+8
-18
@@ -749,16 +749,12 @@ function finalizeReviewBubble(type, data, agentType) {
|
||||
|
||||
let _streamDiv = null;
|
||||
let _streamText = '';
|
||||
let _lastStreamDiv = null;
|
||||
let _lastStreamText = '';
|
||||
|
||||
function startStreamBubble() {
|
||||
_streamDiv = document.createElement('div');
|
||||
_streamDiv.className = 'msg assistant markdown streamed';
|
||||
_streamDiv.innerHTML = '<p><span class="cursor"></span></p>';
|
||||
_streamText = '';
|
||||
_lastStreamDiv = null;
|
||||
_lastStreamText = '';
|
||||
chatEl().appendChild(_streamDiv);
|
||||
scrollDown();
|
||||
}
|
||||
@@ -779,6 +775,14 @@ function appendToStream(text) {
|
||||
scrollDown();
|
||||
}
|
||||
|
||||
function pauseStreamBubble() {
|
||||
// Cursor entfernen, aber Bubble + Text behalten (z.B. bei Web-Search-Pause)
|
||||
if (_streamDiv) {
|
||||
const cursor = _streamDiv.querySelector('.cursor');
|
||||
if (cursor) cursor.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function endStreamBubble() {
|
||||
if (_streamDiv) {
|
||||
const cursor = _streamDiv.querySelector('.cursor');
|
||||
@@ -790,24 +794,10 @@ function endStreamBubble() {
|
||||
wrapKreaGalleries(_streamDiv);
|
||||
}
|
||||
}
|
||||
_lastStreamDiv = _streamDiv;
|
||||
_lastStreamText = _streamText;
|
||||
_streamDiv = null;
|
||||
_streamText = '';
|
||||
}
|
||||
|
||||
function resumeStreamBubble() {
|
||||
// Letzte finalisierte Bubble wiederverwenden (z.B. nach Web-Search)
|
||||
if (_lastStreamDiv && _lastStreamDiv.parentNode) {
|
||||
_streamDiv = _lastStreamDiv;
|
||||
_streamText = _lastStreamText;
|
||||
} else {
|
||||
startStreamBubble();
|
||||
}
|
||||
_lastStreamDiv = null;
|
||||
_lastStreamText = '';
|
||||
}
|
||||
|
||||
// ── Tool Call Visibility ──
|
||||
|
||||
const MODIFICATION_TOOLS = ['write_file', 'edit_file', 'delete_file', 'memory_write'];
|
||||
|
||||
Reference in new issue
Block a user