[FEATURE]: Make it easier to copy selected formulas as LaTeX code in the Web UI

Đang mở
#65,375 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start in the Web UI's markdown/message rendering path where math is rendered with KaTeX, and find where fenced latex/math code blocks get their copy button so you can see why it is dropped for formulas. Compare against KaTeX's copy-tex extension, which annotates rendered output with the original source. Done means selecting one or several rendered formulas and pasting yields their LaTeX source, and the code-block copy button survives. Note the reporter offers to open the PR himself.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/web type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

I often copy formulas into my notes. Right now I have to extract the LaTeX from the whole reply or switch to the TUI. I'd like to select all or part of a rendered formula in the Web UI and copy its complete LaTeX source.

Cherry Studio already supports this via KaTeX's copy-tex extension. A review comment on #64380 also noted that latex and math code blocks lose their copy button when rendered as formulas.

The local patch shown below preserves and reads KaTeX's source annotations, which also fixes #54769. If this is welcome, I can open a single PR or split the annotation fix and the new copy behavior into two PRs.

Copying one formula
Copying one formula as LaTeX
Copying text and multiple formulas
Copying text and multiple formulas as LaTeX
Ngôn ngữ chính
TypeScript
Star
227k
Fork
30.7k
Merge trung bình
3 giờ 57 phút
Pull request đã merge (30 ngày)
484

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của anomalyco/opencode

Tất cả issue của anomalyco/opencode

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.