Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 当一个响应包含多个 artifacts 时,只能正常显示第一个 #4618

Open
Jazzy96 opened this issue Nov 6, 2024 · 9 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@Jazzy96
Copy link

Jazzy96 commented Nov 6, 2024

📦 部署环境

Vercel

📌 软件版本

1.28

💻 系统环境

macOS

🌐 浏览器

Chrome

🐛 问题描述

image 当 clauded 的回答包含多个 artifacts 时,只能正常显示第一个,第二个第三个都会转圈,同时在下面以 plaintext 的形式打印出来

📷 复现步骤

任意让 claude 提供两份代码

🚦 期望结果

No response

📝 补充信息

No response

@Jazzy96 Jazzy96 added the 🐛 Bug Something isn't working | 缺陷 label Nov 6, 2024
@lobehubbot
Copy link
Member

👀 @Jazzy96

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Nov 6, 2024

Hello @Jazzy96! I'm here to assist you with any bugs, questions, or contributions. Feel free to reach out while we wait for a human maintainer.

这个问题可能与 LobeArtifact 模块中的 Render 组件的逻辑有关。具体来说,只有第一个 artifact 正常显示,而第二个和第三个以纯文本形式显示,可能是因为以下条件未满足:

  1. isGenerating 状态对于这些 artifacts 不是 true
  2. hasChildren 条件不满足,即 artifacts 没有内容可显示。
  3. isArtifactTagClosed 状态为 true,表示 artifact 标签被认为是关闭的。

要解决这个问题,您需要确保所有要显示的 artifacts 的 UI 打开条件正确设置。这可能需要检查状态管理逻辑,以确保 isGeneratinghasChildrenisArtifactTagClosed 状态为每个 artifact 正确更新。此外,确保 openArtifactUI 函数为每个 artifact 适当触发[1].

To continue talking to Dosu, mention @dosu.

@arvinxx
Copy link
Contributor

arvinxx commented Nov 6, 2024

能否把响应的回复内容复制出来一下我看看

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Can you copy the response content and let me see?

@Jazzy96
Copy link
Author

Jazzy96 commented Nov 6, 2024 via email

@arvinxx
Copy link
Contributor

arvinxx commented Nov 6, 2024

盲猜 1 和2 应该能正常展示的吧。3 这个都没生成完整?

我感觉是 haiku 模型的问题,你换成 sonnet 试试呢

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Blind guessing 1 and 2 should be able to display normally. 3 This is not completely generated?

I think it's a problem with the haiku model. Can you try using sonnet instead?

@Jazzy96
Copy link
Author

Jazzy96 commented Nov 6, 2024 via email

@renning22
Copy link

我也有这个问题, 很容易重现

<lobeArtifact identifier="111" type="text/html" title="111">
111
</lobeArtifact>

<lobeArtifact identifier="222" type="text/html" title="222">
222
</lobeArtifact>

<lobeArtifact identifier="333" type="text/html" title="333">
333
</lobeArtifact>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

4 participants