Spaces:
Running
Running
Update index.html
Browse files- index.html +1 -1
index.html
CHANGED
|
@@ -1068,7 +1068,7 @@ const AP = {
|
|
| 1068 |
tab(which){const e=document.getElementById('chatWindow');e.hidden=false;e.style.display='block';localStorage.setItem('adaptapro-chat-open','true');document.getElementById('ap-chat-panel').hidden=which!=='chat';document.getElementById('ap-supervision-panel').hidden=which!=='supervision';},
|
| 1069 |
append(text,who){const el=document.createElement('div');el.className='chat-msg '+who;if(who==='ai')APFormat.render(el,text);else el.textContent=String(text);const body=document.querySelector('.chat-body');body.append(el);body.scrollTop=body.scrollHeight;},
|
| 1070 |
appendStream(text){if(!text)return;const body=document.querySelector('.chat-body');if(!this._streamEl){const el=document.createElement('div');el.className='chat-msg ai';body.append(el);this._streamEl=el;}this._streamEl.textContent=text;body.scrollTop=body.scrollHeight;},
|
| 1071 |
-
appendFinal(text){const el=this._streamEl;this._streamEl=null;if(
|
| 1072 |
setAgentState(agent,label,working){const el=document.getElementById('ap-agent-'+agent);if(el){el.textContent=label;el.classList.toggle('ap-working',working);}},
|
| 1073 |
startCycle(...a){return APCommands.startCycle(...a);},
|
| 1074 |
cycle(...a){return APCommands.cycle(...a);},
|
|
|
|
| 1068 |
tab(which){const e=document.getElementById('chatWindow');e.hidden=false;e.style.display='block';localStorage.setItem('adaptapro-chat-open','true');document.getElementById('ap-chat-panel').hidden=which!=='chat';document.getElementById('ap-supervision-panel').hidden=which!=='supervision';},
|
| 1069 |
append(text,who){const el=document.createElement('div');el.className='chat-msg '+who;if(who==='ai')APFormat.render(el,text);else el.textContent=String(text);const body=document.querySelector('.chat-body');body.append(el);body.scrollTop=body.scrollHeight;},
|
| 1070 |
appendStream(text){if(!text)return;const body=document.querySelector('.chat-body');if(!this._streamEl){const el=document.createElement('div');el.className='chat-msg ai';body.append(el);this._streamEl=el;}this._streamEl.textContent=text;body.scrollTop=body.scrollHeight;},
|
| 1071 |
+
appendFinal(text){const el=this._streamEl;this._streamEl=null;if(el){if(text&&String(text).trim())APFormat.render(el,text);else el.remove();}else if(text&&String(text).trim())this.append(text,'ai');},
|
| 1072 |
setAgentState(agent,label,working){const el=document.getElementById('ap-agent-'+agent);if(el){el.textContent=label;el.classList.toggle('ap-working',working);}},
|
| 1073 |
startCycle(...a){return APCommands.startCycle(...a);},
|
| 1074 |
cycle(...a){return APCommands.cycle(...a);},
|