Hide Arguments header when prompt has no arguments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
de40b3720e
commit
88a84b5547
1 changed files with 18 additions and 16 deletions
|
|
@ -35,23 +35,25 @@ export function PromptArgumentsForm({
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<PromptTitle>{title ?? name}</PromptTitle>
|
<PromptTitle>{title ?? name}</PromptTitle>
|
||||||
{description && <DescriptionText>{description}</DescriptionText>}
|
{description && <DescriptionText>{description}</DescriptionText>}
|
||||||
<Title order={4}>Arguments</Title>
|
|
||||||
{promptArguments && promptArguments.length > 0 && (
|
{promptArguments && promptArguments.length > 0 && (
|
||||||
<Stack gap="sm">
|
<>
|
||||||
{promptArguments.map((arg) => (
|
<Title order={4}>Arguments</Title>
|
||||||
<TextInput
|
<Stack gap="sm">
|
||||||
key={arg.name}
|
{promptArguments.map((arg) => (
|
||||||
label={arg.name}
|
<TextInput
|
||||||
withAsterisk={arg.required === true}
|
key={arg.name}
|
||||||
description={arg.description}
|
label={arg.name}
|
||||||
placeholder={formatPlaceholder(arg.name)}
|
withAsterisk={arg.required === true}
|
||||||
value={argumentValues[arg.name] || ""}
|
description={arg.description}
|
||||||
onChange={(event) =>
|
placeholder={formatPlaceholder(arg.name)}
|
||||||
onArgumentChange(arg.name, event.currentTarget.value)
|
value={argumentValues[arg.name] || ""}
|
||||||
}
|
onChange={(event) =>
|
||||||
/>
|
onArgumentChange(arg.name, event.currentTarget.value)
|
||||||
))}
|
}
|
||||||
</Stack>
|
/>
|
||||||
|
))}
|
||||||
|
</Stack>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<Group justify="flex-end">
|
<Group justify="flex-end">
|
||||||
<Button size="sm" onClick={onGetPrompt}>
|
<Button size="sm" onClick={onGetPrompt}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue