feat(web): 支持聊天输入框实时 Markdown 编辑 - #1181
Closed
qqqqqf-q wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
聊天输入框原先只显示 Markdown 源文。现在使用 Milkdown CrepeBuilder,在输入和粘贴时显示可直接编辑的标题、强调、列表、引用和代码,并继续以 Markdown 字符串对接现有草稿与发送流程。
本 PR 叠在 #1178 上,base 为
codex/user-prompt-markdown,只包含输入框编辑功能。#1178 合入后再调整到 main。行为
验证与边界
mise run lint与提交钩子的 Go lint 均被本机其他 golangci-lint 进程锁阻塞;此次无 Go 改动,在已完成上述检查后仅本次提交使用临时 hooksPath 跳过重复钩子,未修改仓库规则。Go lint 未完成,交由 CI 验证。代码量与自审
按本 PR base/head 的 Git diff 统计,10 个文件:新增 1,919 行、删除 47 行、净增 1,872 行。
生产代码及配置排除纯注释、空行后:新增 209 行、删除 35 行、净增 174 行。统计保留含代码的行,不把锁文件计入生产代码;没有单独的纯机械性文件。
新增代码主要用于编辑器生命周期、现有输入框接口适配、中英文样式 decorations 和共享排版。锁文件增量主要是 Milkdown 的传递依赖,不代表全部都会进入浏览器 bundle。
自审已修正快捷键改变、空输入框撑高、正文与输入框参数重复、附件粘贴处理顺序和渐隐留白问题。请重点 review 草稿切换时重置 undo、Markdown 序列化对源文格式的规范化,以及 DialogBody 在聊天输入框中的复用。未修改后端、数据模型或上下文压力圈。