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

Feature request for file changes event

Đang mở
#902 2 bình luận 47 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp, java
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách xem xét mô hình sự kiện phiên hiện có của SDK so với cấu trúc AssistantFileChangesEvent và AssistantFileChangeData được đề xuất. Tính năng hoàn tất khi các sự kiện thay đổi tệp cung cấp các trường diff, kind, path và move_path của từng thay đổi để các client có thể hiển thị các tệp đã được sửa đổi trong một lần lặp.

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

Mô tả

This is a feature request.

Currently it seems that we don't receive any events for changed files with their diff, which makes it difficult with the SDK to report nicely what GitHub Copilot has changed during a prompt iteration.

An example of such API in C# could be:

public partial class AssistantFileChangesEvent : SessionEvent
{
    [JsonIgnore]
    public override string Type => "assistant.file_changes";

    [JsonPropertyName("changes")]
    public required List<AssistantFileChangeData> Changes { get; set; }
}

public partial class AssistantFileChangeData
{
    [JsonPropertyName("diff")]
    public string Diff { get; set; } = string.Empty;
    [JsonPropertyName("kind")]
    public AssistantFileChangeKind Kind { get; set; } = default!;
    [JsonPropertyName("path")]
    public string Path { get; set; } = string.Empty;
    [JsonPropertyName("move_path")]
    public string MovePath { get; set; } = string.Empty; // When kind == "update"
}

[JsonConverter(typeof(JsonStringEnumConverter<AssistantFileChangeKind>))]
public enum AssistantFileChangeKind
{
    [JsonStringEnumMemberName("add")]
    Add,
    [JsonStringEnumMemberName("delete")]
    Delete,
    [JsonStringEnumMemberName("update")]
    Update,  // Use "move_path"  
}

It would allow to display more nicely during a user/assistant iteration the files that were modified.

Ngôn ngữ chính
Java
Star
10.5k
Fork
1.5k
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
131

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 github/copilot-sdk

Tất cả issue của github/copilot-sdk

Issue tương tự

Thêm issue về Java

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.