An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Danield705815b5aa4
diff --git a/app/src/layout/dock/AgentChat.ts b/app/src/layout/dock/AgentChat.tsindex 8f95268c69..b33c0a9274 100644--- a/app/src/layout/dock/AgentChat.ts+++ b/app/src/layout/dock/AgentChat.ts@@ -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();