opentiny / opentiny/tiny-engine
fix:消息渲染无法显示图片
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 2.8k
- Forks
- 476
- Avg merge
- 17h 35m
- Merged PRs (30d)
- 1
Description
消息渲染无法显示图片:
- RobotChat.vue 会把上传图片放进 userMessage.renderContent,形如 { type: 'img', content: item.url }。
- contentRendererMatches 会把 type: 'img' 交给 ImgRenderer。
- 但 @opentiny/tiny-robot 调用自定义 renderer 时只传 message 和 contentIndex,不会把 resolver 返回项里的 content 展开成 props.content。
- 当前 ImgRenderer.vue 只读 props.content,所以拿不到 URL,v-if="props.content" 为 false,图片不显示。
消息渲染无法显示图片对用户体验会造成比较大的影响,建议作为遗留项,后续进行修复。
Originally posted by @chilingling in https://github.com/opentiny/tiny-engine/pull/1815#discussion_r3491594780
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading RobotChat.vue, contentRendererMatches, and ImgRenderer.vue to trace how the uploaded image URL moves from renderContent into the custom renderer. Check the @opentiny/tiny-robot renderer call described in the issue, and consider the work done when uploaded user images render with their URL instead of being hidden.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100