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

Offen Anfängerfreundlich
#2,900 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

  • #2910 von @FOWEPJF255 — ohne Merge geschlossen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend

Rechercherichtung

Lies die Definition von ElicitationRequest im Rust SDK und den Sitzungscode, der elicitation.requested in eine Anfrage an ElicitationHandler umwandelt. Füge das optionale Feld tool_call_id hinzu und übernimm es aus dem Ereignis; prüfe die vorhandenen Rust-Tests für diese Umwandlung und ergänze Tests für eine vorhandene ID und None. Fertig ist die Änderung, wenn Handler die ID erhalten, sofern sie angegeben wurde, und agenteninitiierte Formulare unbeeinflusst bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Java
Sterne
10.7k
Forks
1.5k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/copilot-sdk

Alle Issues in github/copilot-sdk

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.