hive-agent: the per-agent page has no message box; its send route and the broker's operator message are removed
The page's composer (its input, slash commands and completion), POST /send in hive-agent, the OperatorMsg request of the agent socket and its handler in hive-c0re, and the broker-error helper only the send route used are deleted: writing to an agent is the swarm UI's terminal. cancel turn, new session and log out stay in the state badge's menu; POST /api/compact stays, with nothing on the page calling it. The request-line limit keeps its size, and its comment says it is a generous bound now. The docs describe the actions in place of the footer and the prompt.
This commit is contained in:
parent
e149ff3315
commit
23f4f1823b
1 changed files with 77 additions and 505 deletions
|
|
@ -33,24 +33,21 @@ import { Row } from "@hive/shared/term-row.js";
|
|||
const NEAR_BOTTOM_PX = 48;
|
||||
const LOAD_MORE_SCROLL_PX = 80;
|
||||
|
||||
/** Imperative escape hatch for TermInput's local-only slash commands
|
||||
* (`/help`, `/clear`) — same shape as app.js's old `termAPI` object,
|
||||
* kept as a ref handle rather than lifting the whole row array up to
|
||||
* Root so LiveStream/useLiveStream still own their state privately. */
|
||||
/** Imperative escape hatch for the page's local-only notes (the result of
|
||||
* a state-badge action) — kept as a ref handle rather than lifting the whole
|
||||
* row array up to Root so LiveStream/useLiveStream still own their state
|
||||
* privately. */
|
||||
export interface LiveStreamHandle {
|
||||
pushNote: (text: string) => void;
|
||||
clear: () => void;
|
||||
}
|
||||
|
||||
export const LiveStream = forwardRef<LiveStreamHandle, object>(
|
||||
function LiveStream(_props, ref) {
|
||||
const { rows, hasMore, loadingMore, loadMore, pushLocalNote, clearLocal } =
|
||||
const { rows, hasMore, loadingMore, loadMore, pushLocalNote } =
|
||||
useLiveStream();
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() => ({ pushNote: pushLocalNote, clear: clearLocal }),
|
||||
[pushLocalNote, clearLocal],
|
||||
);
|
||||
useImperativeHandle(ref, () => ({ pushNote: pushLocalNote }), [
|
||||
pushLocalNote,
|
||||
]);
|
||||
const logRef = useRef<HTMLDivElement>(null);
|
||||
const [stickToBottom, setStickToBottom] = useState(true);
|
||||
const [unseen, setUnseen] = useState(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue