swarm ui: the instructions section holds the AGENTS.md editor itself
The section shows the editor, with save, undo and the conflict handling, instead of an edit badge that opens it in a dialog. It loads when the section is first opened and keeps an unsaved edit while the section is mounted, so the kept-edit wrapper the dialog needed goes away.
This commit is contained in:
parent
ea84d746dd
commit
ded017953b
1 changed files with 36 additions and 67 deletions
|
|
@ -196,7 +196,7 @@ starts open, the other five folded:
|
|||
its subsystem, one line of text and how long ago it changed (read only,
|
||||
refetched every ten seconds); its subagents and their terminal preview (next
|
||||
section); and its bash tasks (see the section on them below).
|
||||
- **instructions**: the agent's AGENTS.md, with an **edit** button.
|
||||
- **instructions**: the agent's AGENTS.md, as an editor you can type in.
|
||||
- **inference**: how the agent thinks and what it costs: its model and effort
|
||||
and the other inference settings, its resource caps, and the claude login and
|
||||
API key (the login's state, **log in**, and **set API key**), since the key is
|
||||
|
|
@ -905,10 +905,10 @@ controller, it shows the swarm's stored values only.
|
|||
|
||||
### Editing an agent's instructions
|
||||
|
||||
The **instructions** section of an agent's details has an **edit** button. It
|
||||
opens `AGENTS.md`, the file the agent reads its instructions from, in a plain
|
||||
text box. The text is the copy the agent last published, so the box still opens
|
||||
for a stopped agent, but **save** needs the agent running.
|
||||
The **instructions** section of an agent's details holds `AGENTS.md`, the file
|
||||
the agent reads its instructions from, in a plain text box. The box loads when
|
||||
you first open the section. The text is the copy the agent last published, so
|
||||
the box still opens for a stopped agent, but **save** needs the agent running.
|
||||
|
||||
Save sends the swarm a diff against the version you opened, and the agent
|
||||
applies it to its own file with git. When the agent changed the file in the
|
||||
|
|
@ -916,8 +916,10 @@ meantime, the swarm refuses the diff. The box then keeps your text, shows the
|
|||
agent's version below it, and offers two ways on: **keep my text, replace the
|
||||
agent's changes**, which makes your text the new base for the next save, or
|
||||
**use the agent's version**, which drops yours. A diff that git refuses for any
|
||||
other reason shows git's message and leaves the file as it was. Closing the
|
||||
dialog keeps an unsaved edit for the next time you open it.
|
||||
other reason shows git's message and leaves the file as it was. Folding the
|
||||
section keeps an unsaved edit, and so does switching to another agent: coming
|
||||
back to this one starts from your text and notices if the agent changed the file
|
||||
meanwhile. A reload of the page drops it.
|
||||
|
||||
### Resource caps
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue