swarm-ui: show the AGENTS.md size refusal when the instructions section is collapsed
The refusal sat inside the collapsed section, and the general error panel hides while a refusal is set, so a refused submit with the section closed showed nothing. The refusal now renders under the section, outside the details element.
This commit is contained in:
parent
f068d0b2fc
commit
dd7fc1c9af
3 changed files with 9 additions and 7 deletions
|
|
@ -69,7 +69,7 @@
|
|||
.create-agent-result-ok {
|
||||
color: var(--green);
|
||||
}
|
||||
/* The controller's refusal of the AGENTS.md text, under its box. */
|
||||
/* The controller's refusal of the AGENTS.md text, under its section. */
|
||||
.create-agent-field-error {
|
||||
margin: 0;
|
||||
color: var(--red);
|
||||
|
|
|
|||
|
|
@ -215,7 +215,8 @@ export function CreateAgentForm({
|
|||
label: h.name,
|
||||
}));
|
||||
const hivesReady = hives !== null && hives.length > 0;
|
||||
// The controller's size refusal of the AGENTS.md text, shown by its box.
|
||||
// The controller's size refusal of the AGENTS.md text, shown under its
|
||||
// section so a collapsed section still shows it.
|
||||
const refusal =
|
||||
result.status === "error" ? agentsMdRefusal(result.problem) : null;
|
||||
|
||||
|
|
@ -385,11 +386,11 @@ export function CreateAgentForm({
|
|||
placeholder="the text the agent's AGENTS.md starts with; leave empty for none"
|
||||
onInput={setAgentsMd}
|
||||
/>
|
||||
{refusal !== null && (
|
||||
<p class="create-agent-field-error">{refusal}</p>
|
||||
)}
|
||||
</div>
|
||||
</details>
|
||||
{refusal !== null && (
|
||||
<p class="create-agent-field-error">{refusal}</p>
|
||||
)}
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
|
|
|
|||
Loading…
Reference in a new issue