refactor: move the JSON-object draft parser into utils

`react-refresh/only-export-components` rejects a non-component export from a
component module, so `parseObjectDraft` could not live beside
`JsonObjectInput`. It is a pure transform, which puts it in `utils` under the
`lib`/`utils` rule anyway.

Also render the metadata hint's inline literals through `<Code>` rather than
markdown backticks, which a Mantine `Text` shows verbatim.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-08-23 12:29:27 -04:00
commit 3a64ce7f4e

View file

@ -729,10 +729,10 @@ export function ServerSettingsForm({
<Accordion.Panel>
<Stack gap="md">
<HintText>
Metadata merged into the `_meta` field of every MCP request to
this server, as a JSON object. Values may be any JSON — objects,
arrays, numbers, booleans, `null` — not just strings. Leave it as{" "}
<Code>{"{}"}</Code> to send none.
Metadata merged into the <Code>_meta</Code> field of every MCP
request to this server, as a JSON object. Values may be any JSON —
objects, arrays, numbers, booleans, <Code>null</Code> — not just
strings. Leave it as <Code>{"{}"}</Code> to send none.
</HintText>
<JsonObjectInput
aria-label="Request metadata JSON"