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

[Request] 当代码块过长时难以复制代码 #6764

Open
dalamudx opened this issue Mar 6, 2025 · 8 comments
Open

[Request] 当代码块过长时难以复制代码 #6764

dalamudx opened this issue Mar 6, 2025 · 8 comments
Labels
🌠 Feature Request New feature or request | 特性与建议

Comments

@dalamudx
Copy link

dalamudx commented Mar 6, 2025

🥰 需求描述

当生成的代码块过长的时候复制比较费劲,无法对代码块ctrl+a,得拖动滚动条找代码块开头的复制按钮

🧐 解决方案

目前想到的有两种,代码块超出之后
1,复制按钮漂浮并跟随代码块(倾向于这种)
2,复制按钮出现在右下角

📝 补充信息

No response

@dalamudx dalamudx added the 🌠 Feature Request New feature or request | 特性与建议 label Mar 6, 2025
@lobehubbot
Copy link
Member

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


🥰 Requirement description

When the generated code block is too long, it is difficult to copy and cannot use the code block ctrl+a. You have to drag the scrollbar to find the copy button at the beginning of the code block.

🧐 Solution

There are two types of things that come to mind now, after the code block exceeds the

  1. Copy button floats and follows the code block (inclined to this)
  2. The copy button appears in the lower right corner

📝 Supplementary information

No response

@lobehubbot
Copy link
Member

👀 @dalamudx

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

@sxjeru
Copy link
Contributor

sxjeru commented Mar 7, 2025

可以考虑当下滑一段距离后,让代码块顶栏悬浮于窗口顶部。

@lobehubbot
Copy link
Member

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


You can consider that after sliding a distance, let the top bar of the code block float at the top of the window.

@dalamudx
Copy link
Author

dalamudx commented Mar 7, 2025

可以考虑当下滑一段距离后,让代码块顶栏悬浮于窗口顶部。

嗯,这样也可以

@lobehubbot
Copy link
Member

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


You can consider that the top bar of the code block is suspended at the top of the window after sliding a distance.

Well, that's OK

@yuntian123456
Copy link

yuntian123456 commented Mar 7, 2025

之前我也纠结这个问题。
我觉得可以在右上角,右下角均放置复制按钮。
或者在代码超过一定行数后,代码行自动折叠起来。
亦或者给代码内容限制在一个固定行数的窗口内,超过后代码内容就在这个窗口里滚动,非代码内容在这个窗口外显示。
(后两种方式也适合上下翻看历史记录,不然太长了上下翻找好费劲😵)

@lobehubbot
Copy link
Member

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


I've also been struggling with this issue before.
I think the copy buttons can be placed in the upper right corner and the lower right corner.
Or after the code exceeds a certain number of lines, the lines of code will be folded automatically.
Or limit the code content to a window with a fixed number of lines. After exceeding the code content, the code content will be scrolled in this window, and the non-code content will be displayed outside this window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议
Projects
None yet
Development

No branches or pull requests

4 participants