Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Private GitHub images in chat messages show "Image unavailable" (PR panel loads them)

Đang mở Phù hợp với người mới
#25,922 0 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Đọc apps/web/src/components/ChatMarkdown.tsx và so sánh cách PullRequestMarkdown.tsx truyền sourceControlMedia. Theo dấu nơi gọi bản ghi hội thoại chat và xác định cách nó biết một luồng có cwd hay không. Hoàn thành khi hình ảnh GitHub riêng tư hiển thị trong chat đối với các luồng đủ điều kiện và hành vi hiển thị chat liên quan được một bài kiểm thử bao phủ.

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

Mô tả

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Open a project whose repository is a private GitHub repo, signed in with gh (the same setup where the pull request panel already shows that repo's images, after #11706).
  2. Commit an image to the repo, e.g. docs/shot.png.
  3. Have the agent (or paste as a message) reply with Markdown that embeds it:
    ![After](https://github.com/<owner>/<private-repo>/blob/<sha>/docs/shot.png?raw=true)
    (a raw.githubusercontent.com or github.com/user-attachments/assets/<id> URL behaves the same.)
  4. Open the same pull request's tab, where that body image does render.
Expected behavior

The image renders in the chat transcript, the same way it renders in the pull request panel, since the server already holds the cwd's source control credential and already serves these URLs for the panel.

Actual behavior

The chat transcript shows "Image unavailable". The browser requests the URL without a credential and GitHub answers 404 (verified: same URL is 404 anonymously, 200 with gh auth).

Cause, on main @ 1152e9171a: ChatMarkdown only routes host media through the server when its sourceControlMedia prop is true (apps/web/src/components/ChatMarkdown.tsx, default false, check around line 1419). The only caller that sets it is PullRequestMarkdown.tsx (line 96). The chat transcript never passes it, so the fix from #11706 (and its move into the source control drivers in #23994) covers the pull request tab only.

Impact

Minor bug or occasional failure

Version or commit

Desktop 0.1.3 (Windows); code reading at main @ 1152e9171a

Environment

Windows 11 Pro, T3 Code desktop 0.1.3, Claude and Codex providers, private GitHub repo, gh authenticated with repo scope.

Workaround

Agents copy the image to a local folder and embed the local path in chat, keeping the GitHub URL only for the PR description. It works, but every agent has to remember it, and it is the usual way PR screenshots end up broken in the hand-back message.

Note

This is likely a small change (pass sourceControlMedia for assistant messages in a thread with a cwd), but it does make chat content able to trigger authenticated fetches of the repo's media, so I am filing it for triage first rather than sending a PR. Happy to send one if the direction is wanted.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
2 giờ 48 phút
Pull request đã merge (30 ngày)
353

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

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.