From 86444231243efb4274a567c0ec5fc4daaa664573 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Wed, 22 Jul 2026 09:20:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E6=81=A2=E5=A4=8D=20chat=20?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84=20bubble=20menu=20?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E6=B8=85=E9=99=A4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=20(MUL-5106)=20(#5727)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chat 输入框是共用的 Tiptap 编辑器,`# ` input rule 与 Markdown/HTML 粘贴都会把行变成标题,但此前 chat 传了 showBubbleMenu={false},关掉了 唯一能把标题降回正文("Normal text" / setParagraph)及切换其它格式的 浮动工具栏,导致格式一旦产生就无法去掉。 组件本就暴露了 showBubbleMenu 配置能力,这里改为启用即可,和 Linear 的 交互一致;attach、@ 提及、图片/文件等内联能力不受影响。 Co-authored-by: Claude Opus 4.8 Co-authored-by: multica-agent --- packages/views/chat/components/chat-input.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/views/chat/components/chat-input.tsx b/packages/views/chat/components/chat-input.tsx index db006c925..cd4004301 100644 --- a/packages/views/chat/components/chat-input.tsx +++ b/packages/views/chat/components/chat-input.tsx @@ -537,9 +537,13 @@ export function ChatInput({ mentionMode={contextItems ? "context" : "default"} mentionContextItems={contextItems} enableSlashCommands - // Chat is short-form — the floating formatting toolbar is - // more distraction than feature here. - showBubbleMenu={false} + // The bubble menu carries the only affordance that can strip + // formatting — "Normal text" (setParagraph) plus the mark/list + // toggles. Once a `# ` input rule or a Markdown/HTML paste turns a + // line into a heading, chat has no other way to remove it, so + // without the bubble menu formatting can be created but never + // undone (MUL-5106). + showBubbleMenu /> {(uploadEnabled || leftAdornment) && (