feat(ai): 将小班长升级为完全独立的实体用户并支持随机金币发放及持续在线刷级,设定为女兵人设并使用自定义头像
This commit is contained in:
@@ -13,16 +13,6 @@
|
||||
}
|
||||
chatBotSending = true;
|
||||
|
||||
// 显示"思考中"提示
|
||||
// 延迟显示"思考中",让广播消息先到达
|
||||
const thinkDiv = document.createElement('div');
|
||||
thinkDiv.className = 'msg-line';
|
||||
thinkDiv.innerHTML = '<span style="color: #16a34a;">🤖 <b>AI小班长</b> 正在思考中...</span>';
|
||||
setTimeout(() => {
|
||||
container2.appendChild(thinkDiv);
|
||||
if (autoScroll) container2.scrollTop = container2.scrollHeight;
|
||||
}, 500);
|
||||
|
||||
try {
|
||||
const res = await fetch(window.chatContext.chatBotUrl, {
|
||||
method: 'POST',
|
||||
@@ -40,9 +30,6 @@
|
||||
|
||||
const data = await res.json();
|
||||
|
||||
// 移除"思考中"提示(消息已通过广播显示)
|
||||
thinkDiv.remove();
|
||||
|
||||
if (!res.ok || data.status !== 'success') {
|
||||
const errDiv = document.createElement('div');
|
||||
errDiv.className = 'msg-line';
|
||||
@@ -51,7 +38,6 @@
|
||||
container.appendChild(errDiv);
|
||||
}
|
||||
} catch (e) {
|
||||
thinkDiv.remove();
|
||||
const errDiv = document.createElement('div');
|
||||
errDiv.className = 'msg-line';
|
||||
errDiv.innerHTML = '<span style="color: #dc2626;">🤖【AI小班长】网络连接错误,请稍后重试</span>';
|
||||
|
||||
Reference in New Issue
Block a user