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.
28 lines
844 B
HTML
28 lines
844 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>hyperhive agent</title>
|
|
<link rel="stylesheet" href="/static/agent.css">
|
|
</head>
|
|
<body>
|
|
<pre class="banner" id="banner">░▒▓█▓▒░ … ░▒▓█▓▒░ hyperhive ag3nt ░▒▓█▓▒░</pre>
|
|
<h2 id="title">◆ … ◆</h2>
|
|
|
|
<div id="status">
|
|
<p class="meta">loading…</p>
|
|
</div>
|
|
|
|
<div id="state-row">
|
|
<span id="state-badge" class="state-badge state-loading">… booting</span>
|
|
<button type="button" id="cancel-btn" class="btn-cancel-turn" hidden>■ cancel turn</button>
|
|
</div>
|
|
|
|
<div class="terminal-wrap">
|
|
<div id="live" class="live terminal"><div class="meta">connecting…</div></div>
|
|
<div id="term-input" class="term-input"></div>
|
|
</div>
|
|
|
|
<script src="/static/app.js" defer></script>
|
|
</body>
|
|
</html>
|