anthropics / anthropics/claude-code
Feature request: import/create comment threads on Artifacts (round-trip serialization)
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
## Feature request
Allow programmatically creating/importing comment threads on a published Artifact — the write-side counterpart of the existing `comments` read action on the Artifact tool.
## Current behavior
- Comment threads on Artifacts can be **read** (`action: "comments"`) and **replied to** (`action: "reply"`, on activated threads), so Claude can export a durable transcript of threads to disk.
- There is **no way to import** them: threads live server-side, attached to a specific artifact URL, and can only be created by viewers in the UI.
## Why it matters
We use commentable Artifact pages as review surfaces for a multi-agent build workflow (each work track publishes a review page; the human leaves pinned comment threads; Claude acts on them). We serialize each page to disk in-repo: source file + artifact-URL binding + a one-way comment export. That covers durability, but the threads themselves aren't portable:
- If a page is ever recreated at a new URL (lost binding, new account/workspace, migrating a project), all live threads are orphaned — the export is a flat transcript, not restorable state.
- Backup/restore of a project's review history can't round-trip.
## Requested capability
Either of these would solve it:
1. An `import_comments` / `create_thread` action on the Artifact tool (thread anchor selector + comment list with authorship/timestamps, clearly marked as imported), or
2. An export format (JSON) whose re-import onto a same-content artifact restores threads with their anchors and resolved/open state.
## Workaround today
One-way markdown export of threads committed to the repo, and treating the artifact-URL binding file as precious so republishing always targets the same URL.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start with the Artifact tool's existing `comments` read action and `reply` action, then trace how the artifact URL binding and markdown thread export are represented. Define how imported threads, anchors, authorship, timestamps, and open/resolved state should round-trip, and confirm completion with a JSON export that can restore threads on a same-content artifact.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- json
- Lĩnh vực
- backend-api-design, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100