mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-26 20:45:37 +02:00
fix(chat): 恢复 chat 输入框的 bubble menu 以支持清除格式 (MUL-5106) (#5727)
Chat 输入框是共用的 Tiptap 编辑器,`# ` input rule 与 Markdown/HTML
粘贴都会把行变成标题,但此前 chat 传了 showBubbleMenu={false},关掉了
唯一能把标题降回正文("Normal text" / setParagraph)及切换其它格式的
浮动工具栏,导致格式一旦产生就无法去掉。
组件本就暴露了 showBubbleMenu 配置能力,这里改为启用即可,和 Linear 的
交互一致;attach、@ 提及、图片/文件等内联能力不受影响。
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -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
|
||||
/>
|
||||
</div>
|
||||
{(uploadEnabled || leftAdornment) && (
|
||||
|
||||
Reference in New Issue
Block a user