Address PR #1219 code review feedback

- Filter undefined model hint names in SamplingRequestPanel, matching
  the pattern already used in InlineSamplingRequest
- Narrow ElicitationFormPanel to accept ElicitRequestFormParams instead
  of the full ElicitRequest['params'] union; removes the 'requestedSchema
  in request' guard and renders the schema unconditionally
- Add isUrlMode type guard in InlineElicitationRequest to properly
  narrow the URL variant; eliminates the 'as { url: string }' cast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-20 20:05:39 -04:00
commit bb98914e19

View file

@ -72,7 +72,9 @@ export function SamplingRequestPanel({
includeContext,
} = request;
const hints = modelPreferences?.hints?.map((h) => h.name) ?? [];
const hints =
(modelPreferences?.hints?.map((h) => h.name).filter(Boolean) as string[]) ??
[];
return (
<Stack gap="md">