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

未關閉 適合新手
#2,900 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

  • #2910 來自 @FOWEPJF255 —— 已關閉,未合併

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
rust
領域
backend

研究方向

閱讀 Rust SDK 中 ElicitationRequest 的定義,以及將 elicitation.requested 轉換為發給 ElicitationHandler 的請求的工作階段程式碼。新增選用欄位 tool_call_id,並從事件中複製該欄位;檢查現有 Rust 測試中與此轉換相關的部分,並新增測試涵蓋有 ID 和 None 兩種情況。完成條件是:有提供 ID 時,handler 會收到該 ID;由 agent 發起的表單不受影響。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
Java
星號
10.7k
分支
1.5k
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。