Desktop: mermaid image nodes render without the image
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 77/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- desktop
调研方向
从 packages/session-ui/src/components/markdown-mermaid.ts 开始,检查 Pele renderAsync 选项,尤其是 images: false。查看 Mermaid 图像节点在 Desktop Review 面板中的渲染方式,并确认启用图像渲染是否能保留现有的 Markdown 行为。完成标准是流程图中的图像节点显示图像,而不是空白区域。
由索引模型根据 Issue 内容生成。
描述
Description
Mermaid image nodes (node@{ img: "..." }) show only their label in the Markdown viewer. The image is missing. Normal Markdown images in the same file () display correctly.
The cause seems to be ./packages/session-ui/src/components/markdown-mermaid.ts, which calls Pele with images: false:
const result = await pele.renderAsync(source, {
...
images: false,
})
With this option, Pele leaves the <image> element out of the SVG but still reserves the space for it, so the node shows only its label above an empty gap.
Plugins
No response
OpenCode version
2.2.6
Steps to reproduce
- Create a markdown file with:
 ```mermaid flowchart TB a["start"] b@{ img: "assets/image.png", label: "image node", pos: "b", w: 90, h: 53, constraint: "on" } c@{ img: "https://mermaid.js.org/favicon.svg", label: "remote image", pos: "b", w: 60, h: 60 } a --> b --> c ``` - Open the file in the desktop Review pane.
- The Markdown image shows, but nodes
bandcshow only their labels with empty space.
Screenshot
No response
Operating System
Mac OS
Terminal
No response
- 主要语言
- TypeScript
- 星标
- 225k
- 派生
- 30.4k
- 平均合并
- 4 小时 7 分钟
- 30 天内合并 PR
- 554
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
pending close triaging
难度 1/5 1-3 小时 新手友好度 74/100
anomalyco/opencode#63090 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#63080 · 2 条评论 ·
维护者通常 1 天内回复
-
reproduced
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#62981 · 1 条评论 ·
维护者通常 1 天内回复
-
pending close triaging
难度 1/5 1 小时以内 新手友好度 68/100
anomalyco/opencode#62955 · 1 条评论 ·
维护者通常 1 天内回复
-
Web UI: Uncaught TypeError on iOS < 17.4 (AbortSignal.any is not a function)可能已有人在做 @Paramee-Saejia 于 1 天前认领。 未关闭reproduced
难度 2/5 1-3 小时 新手友好度 61/100
anomalyco/opencode#62873 · 2 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
ai-driven-qa bug claude Cosmetic
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 76/100
linagora/twake-mail-admin#609 ·
维护者通常 1 天内回复
-
approved check:passed streams:add
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复