Rust: ElicitationRequest drops the tool call id from elicitation.requested

Đang mở Phù hợp với người mới
#2,900 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

  • #2910 của @FOWEPJF255 — đã đóng, không merge

Đá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
78/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Đọc định nghĩa ElicitationRequest của Rust SDK và mã phiên chuyển elicitation.requested thành yêu cầu gửi đến ElicitationHandler. Thêm trường tùy chọn tool_call_id và sao chép trường này từ sự kiện; kiểm tra các bài kiểm thử Rust hiện có cho chuyển đổi này và bổ sung phạm vi kiểm thử cho cả trường hợp có ID và None. Hoàn tất khi các handler nhận được ID nếu có và các biểu mẫu do agent khởi tạo không bị ảnh hưởng.

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

Mô tả

The Rust SDK drops the tool call id when it hands an elicitation request to the session's ElicitationHandler, so a host can't tell which tool call raised a form.

What happens

The elicitation.requested session event carries an optional toolCallId (ElicitationRequestedData::tool_call_id, documented as "Tool call ID from the LLM completion; used to correlate with CompletionChunk.toolCall.id for remote UIs"). When the session converts that event into the ElicitationRequest it passes to ElicitationHandler, it copies message, requested_schema, mode, elicitation_source and url, but not the tool call id. ElicitationRequest has no field for it.

Why it matters

A host that draws tool calls in a transcript needs to know which call a pending form belongs to, for example to keep that call visible and marked as waiting on the user instead of collapsing it with finished work. Today the handler can only show the form on its own, unconnected to the call that raised it. Forms raised by MCP tools during a tool call are the common case.

Suggested change

Add tool_call_id: Option<String> to ElicitationRequest and fill it from the event's tool_call_id when building the request. It stays None for forms that aren't tied to a tool call, such as agent-initiated ones, so existing handlers are unaffected.

Ngôn ngữ chính
Java
Star
10.7k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 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.