lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.03k stars 9.85k forks source link

[Bug] Artifacts复制为图片不生效 #4405

Open changjiong opened 2 weeks ago

changjiong commented 2 weeks ago

📦 部署环境

Docker

📌 软件版本

1.22.8

💻 系统环境

Ubuntu

🌐 浏览器

Edge

🐛 问题描述

Artifacts生成的结果 点击复制为图片不生效 复制出的结果不是图片

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 2 weeks ago

👀 @changjiong

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot commented 2 weeks ago

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


📦 Deployment environment

Docker

📌 Software version

1.22.8

💻 System environment

Ubuntu

🌐 Browser

Edge

🐛 Problem description

The results generated by Artifacts are not effective when clicked to copy as a picture. The copied result is not a picture.

📷 Steps to reproduce

No response

🚦 Expected results

No response

📝 Supplementary information

No response

dosubot[bot] commented 2 weeks ago

Hey @changjiong! 👋 I'm here to help you out with any bugs, questions, or contributions you need. Let's squash some bugs together!

The issue with the "copy as image" feature not working in the Artifacts component could be related to several factors, especially given the environment specifics like Docker, Ubuntu, and Edge browser. Here are a few things to consider:

  1. Clipboard API Support: Ensure that the Edge browser version you are using supports the Clipboard API, as the feature relies on it for copying images [1].

  2. Docker Environment: There might be specific configurations or dependencies in the Docker setup that could affect the functionality, although no specific configurations are mentioned in the repository [1].

  3. Error Handling: Check the console for any error messages that might provide insights into why the operation is failing. The implementation includes error logging that could help identify the issue [1].

  4. Recent Changes: There have been recent updates to the copyImageToClipboard function to ensure compatibility across different browsers. Make sure your setup includes these updates sup>[[2]](https://github.com/lobehub/lobe-chat/blob/main/src/app/(main)/chat/(workspace)/@portal/Artifacts/Body/Renderer/SVG.tsx)</sup[1].

If these steps do not resolve the issue, further investigation into the specific Docker and browser configurations might be necessary.

To continue talking to Dosu, mention @dosu.