支持侧边抽屉快速回复粘贴图片自动上传#9
Merged
Merged
Conversation
Contributor
Author
|
方便快速回复发截图 |
Owner
|
已合并到 main。补做了与最新 main 的冲突解决,保留了 PR #8 新增的 AGENT-CHROME-013,并保留本 PR 的粘贴上传用例;本地 Tier 0 与一条针对粘贴上传链路的 mock smoke 已通过,GitHub static-check 也已通过。感谢贡献。 |
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.
结论
这次补上了侧边抽屉快速回复框的图片粘贴自动上传能力。
现在在抽屉回复框里直接粘贴图片后,会自动走 Discourse 的上传接口,成功后插入与站点原生回复一致的
upload://...Markdown,而不是 base64 文本。主要改动
1. 回复框支持粘贴图片自动上传
2. 对齐 Discourse 原生上传链路
POST /uploads.json上传图片upload_type=composerpasted=trueshort_url生成upload://...Markdown3. 补齐上传中的交互状态
发送回复按钮会禁用4. 文档同步
README.mdCHANGELOG.mddoc/agent-smoke-cases.md中新增AGENT-CHROME-011为什么这样改
原来抽屉快速回复只支持纯文本 Markdown,不能像站点原始回复框那样直接粘贴图片。
这个缺口会让用户在侧边抽屉里回复时必须回到原帖页操作,和扩展“就地完成预览 + 回复”的目标不一致。
这次实现尽量保持最小改动,没有引入额外构建工具,也没有重写现有回复链路,只是在当前快速回复面板上补上与站点原生行为一致的图片上传能力。
验证
Tier 0
bash scripts/check.sh