Repository navigation
Conversation
默认保留 Markdown 渲染,新增带代码和眼睛图标的动态原文/渲染操作;仅改变单条消息的前端展示,保留复制、编辑、新会话与附件行为。 提取用户消息组件和大文本保护,补充三语文案、单元测试及桌面和手机浏览器回归。 Refs agegr#1407
用户消息也新增 Source 操作,现有主题回归的全局按钮定位发生重名。仅收紧测试定位范围,保留原有主题切换断言,不修改产品行为。 Refs agegr#1407; refs agegr#1420
This branch has not been deployed
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.
背景
Refs #1407
直接粘贴 HTML 的 innerHTML / outerHTML,或使用议题里的
<TableOperator … />样例时,用户消息中的 HTML 会进入现有 Markdown / HTML 解析与清理流程,标签可能被渲染或移除。${…}本身并没有被当作 JavaScript 执行;基础收发与存储链路也无需为此转义或改写消息。本 PR 提供单条用户消息的原文查看入口,保留现有默认渲染行为。是否足以满足 #1407 的完整预期,留待维护者确认,因此使用
Refs,不自动关闭议题。改动
dangerouslySetInnerHTML。保留换行并允许长行折行,沿用已有 CRLF / CR 到 LF 的展示规范化。MessageView.tsx提取UserMessageView.tsx,共享现有SafeMarkdownBody.tsx大文本保护,并保留replaceUserMessageText原导出。没有新增依赖、设置或扩展 API。Source按钮定位限定在代码块内,避免与用户消息的新同名操作冲突;保留全部原有断言。复现与验证
在
main(e533d9b)输入并发送:现有渲染会隐藏标签部分。本分支默认展示保持不变,但点击「原文」可查看完整文字,点击「渲染」返回原视图;两条消息的切换互不影响。
已完成:
node_modules/.bin/tsc --noEmit。npm run lint。setpriv --bounding-set=-dac_override npm test,只移除测试子进程绕过目录写权限的能力,保证既有只读目录测试按普通权限语义执行;未修改或跳过该测试。node e2e/user-message-render-toggle.mjs:1280px / 375px 两种宽度均通过。覆盖 【Bug】消息发送后显示不全,疑似 ${} 变量插值被前端当成代码执行了 #1407 样例、HTML / 实体 /${…}/ Markdown / 公式的原文展示、单条独立状态、复制不变、图文及纯图片、skill、超过 100,000 字符的内容保护、键盘操作、三语文案及手机无横向溢出。测试使用临时会话与独立开发服务,不调用模型。e2e3a11的checks与e2e均通过(运行记录)。范围
仅包含功能提交
fa2ae7c及相关测试定位修正e2e3a11,基于上游main;不包含 fork 的登录页、发布配置、用量展示或子代理运行提示等其他功能。