operator control: /cancel slash command + cancel button
new POST /api/cancel on the per-agent web UI: shells out pkill -INT claude (procps added to harness-base.nix). emits a Note on the bus so the operator sees the cancel landed; state goes back to idle when run_claude wakes and emits TurnEnd as usual. frontend: - /cancel slash command in the terminal input - ■ cancel turn button in the state row, visible only while state === 'thinking' (driven from the same SSE-based state machine). disabled briefly during the POST. claude gets SIGINT (not TERM) so it flushes anything in-flight and emits a final result row before exiting.
This commit is contained in:
parent
de09503b59
commit
300be8afa9
6 changed files with 83 additions and 3 deletions
|
|
@ -126,6 +126,26 @@ pre.diff {
|
|||
}
|
||||
#state-row {
|
||||
margin: 0.4em 0 0.2em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6em;
|
||||
}
|
||||
.btn-cancel-turn {
|
||||
font-family: inherit;
|
||||
font-size: 0.8em;
|
||||
letter-spacing: 0.08em;
|
||||
background: transparent;
|
||||
color: var(--red);
|
||||
border: 1px solid var(--red);
|
||||
border-radius: 999px;
|
||||
padding: 0.2em 0.8em;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 0 4px currentColor;
|
||||
transition: box-shadow 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
.btn-cancel-turn:hover {
|
||||
background: rgba(243, 139, 168, 0.1);
|
||||
box-shadow: 0 0 10px -2px currentColor;
|
||||
}
|
||||
.state-badge {
|
||||
display: inline-block;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue