feat(sampling): replace InlineSamplingRequest responseText with draftResult (#1239) (#1250)

Closes the Phase 5 audit partial: the inline card's prop interface now
matches SamplingRequestPanel's, accepting an optional CreateMessageResult
draft instead of a flat scalar. Lets future hook-layer wiring share a
single draft store between the inline card and the full panel.

Rendering:
- No draft → existing layout (request preview, model hints, action
  buttons), with the readonly placeholder textarea removed.
- Text draft → 2-line preview of draftResult.content.text (lineClamp 2).
- Image / audio draft → "[Image content]" / "[Audio content]" label,
  matching the ContentViewer fallback convention.

Updates the three consumer stories that threaded responseText="" through
(PendingClientRequests, ToolsScreen) — no callback signatures changed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cliff Hall 2026-04-27 18:29:58 -04:00 • committed by GitHub
commit c04f96ffb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,7 +57,6 @@ export const SingleSampling: Story = {
maxTokens: 1024,
}}
queuePosition="1 of 1"
responseText=""
onAutoRespond={fn()}
onEditAndSend={fn()}
onReject={fn()}
@ -102,7 +101,6 @@ export const MultipleMixed: Story = {
maxTokens: 1024,
}}
queuePosition="1 of 2"
responseText=""
onAutoRespond={fn()}
onEditAndSend={fn()}
onReject={fn()}