Address PR #1219 minor observations

- Tighten ElicitationFormPanel story fixtures from
  satisfies ElicitRequest["params"] to satisfies ElicitRequestFormParams
- Show model preferences container when modelPreferences exists even
  without hints, so costPriority/speedPriority/intelligencePriority
  are visible independently
- Fix stop reason ordering to match SDK enum: endTurn, stopSequence,
  maxTokens

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-21 10:51:27 -04:00
commit 4b2d4d1622

View file

@ -85,16 +85,18 @@ export function SamplingRequestPanel({
<MessageBubble key={index} index={index} message={message} />
))}
{hints.length > 0 && (
{modelPreferences && (
<PreferencesContainer>
<Stack gap="xs">
<Title order={5}>Model Preferences:</Title>
<Group gap="xs">
<Text size="sm">Hints:</Text>
{hints.map((hint) => (
<Badge key={hint}>{hint}</Badge>
))}
</Group>
{hints.length > 0 && (
<Group gap="xs">
<Text size="sm">Hints:</Text>
{hints.map((hint) => (
<Badge key={hint}>{hint}</Badge>
))}
</Group>
)}
{modelPreferences?.costPriority !== undefined && (
<Text size="sm">
Cost Priority: {formatPriority(modelPreferences.costPriority)}
@ -160,7 +162,7 @@ export function SamplingRequestPanel({
/>
<Select
label="Stop Reason"
data={["endTurn", "maxTokens", "stopSequence"]}
data={["endTurn", "stopSequence", "maxTokens"]}
value={draftResult.stopReason ?? null}
onChange={(value) =>
onResultChange({