Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel
2026-06-24 23:52:33 +08:00
parent c4e2280d7f
commit d705815b5a
+10 -8
View File
@@ -548,15 +548,17 @@ export class AgentChat extends Model {
this.closeTokenBreakdownPopup();
}, 300);
});
} else {
this.tokenDisplayEl.addEventListener("click", () => {
if (this.tokenPopup) {
this.closeTokenBreakdownPopup();
} else {
this.showTokenBreakdownPopup();
}
});
}
// 所有设备:点击 toggle 浮层。hover 设备上 stopPropagation 阻止冒泡到 document 的 outside click handler,
// 避免悬浮显示后点击反而关闭(反直觉)。
this.tokenDisplayEl.addEventListener("click", (e: MouseEvent) => {
e.stopPropagation();
if (this.tokenPopup) {
this.closeTokenBreakdownPopup();
} else {
this.showTokenBreakdownPopup();
}
});
this.sendBtn.addEventListener("click", (e: MouseEvent) => {
e.stopPropagation();
this.sendMessage();