feat: typing indicator mit agent-name und random phrases
- typing-phrases.js in index.html eingebunden - startTypingIndicator() / stopTypingIndicator() in chat.js - Agent-Name via setCurrentAgentName() aus chat-page.js gesetzt - Phrase wechselt alle 3 Sekunden zufällig - Cleanup bei destroy() und finally-Block
This commit is contained in:
1 parent
c5f2ed54fd
commit
f941eae00a
5 files changed
+74
-6
No files matched your search
@@ -202,8 +202,11 @@ registerPage('chat', {
|
||||
if (session.agentId) {
|
||||
try {
|
||||
const agent = await apiGetAgent(session.agentId);
|
||||
if (agent && agent.customCommands) {
|
||||
agentCmds = JSON.parse(agent.customCommands) || [];
|
||||
if (agent) {
|
||||
setCurrentAgentName(agent.name || null);
|
||||
if (agent.customCommands) {
|
||||
agentCmds = JSON.parse(agent.customCommands) || [];
|
||||
}
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
@@ -390,6 +393,8 @@ registerPage('chat', {
|
||||
// Stream nicht abbrechen (Backend soll weiterlaufen),
|
||||
// aber Frontend-Processing stoppen
|
||||
_chatAbandoned = true;
|
||||
stopTypingIndicator();
|
||||
setCurrentAgentName(null);
|
||||
closeEmojiPicker();
|
||||
if (this._closeMenu) {
|
||||
document.removeEventListener('click', this._closeMenu);
|
||||
|
||||
Reference in new issue
Block a user