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
Daniel9ef0acce6b2e
diff --git a/app/src/layout/dock/agent/AgentComposer.ts b/app/src/layout/dock/agent/AgentComposer.tsindex 03120ed1b3..9cf00e571f 100644--- a/app/src/layout/dock/agent/AgentComposer.ts+++ b/app/src/layout/dock/agent/AgentComposer.ts@@ -142,14 +142,16 @@ export function mountComposer(host: HTMLElement, onSend: () => void, onChange?:return blocks.slice(0, 10).map(function (b: Record<string, unknown>) {const id = String(b.id || "");const raw = String(b.content || b.refText || b.name || id);- const plain = raw.replace(/<[^>]+>/g, "").trim() || id;+ // 内核返回的 content 已做 HTML 转义并可能含 <mark> 标签,先剥离标签再反转为纯文本,+ // 否则 escapeHtml 会再次转义导致显示成 "<" 等字面量。+ const plain = Lute.UnEscapeHTMLStr(raw.replace(/<[^>]+>/g, "")).trim() || id;const type = String(b.type || "NodeParagraph");const sub = b.subType ? String(b.subType) : "";return {id: id,label: plain.slice(0, 80),icon: getIconByType(type, sub),- hPath: String(b.hPath || ""),+ hPath: Lute.UnEscapeHTMLStr(String(b.hPath || "")),};});} catch (e) {