Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#105732)

hermes-seaeye[bot]04b88a4c0a7f
diff --git a/ui-tui/src/__tests__/agentsHydration.test.tsx b/ui-tui/src/__tests__/agentsHydration.test.tsx
index adf56a79ab8..d3b48453b8f 100644
--- a/ui-tui/src/__tests__/agentsHydration.test.tsx
+++ b/ui-tui/src/__tests__/agentsHydration.test.tsx
@@ -12,9 +12,11 @@ import { DEFAULT_THEME } from '../theme.js'
it('does not undo an acknowledged pause when opening status resolves late', async () => {
resetDelegationState()
let resolveStatus!: (value: unknown) => void
+
const status = new Promise(resolve => {
resolveStatus = resolve
})
+
const request = vi.fn(async (method: string) => (method === 'delegation.status' ? status : { paused: true }))
const stdout = Object.assign(new PassThrough(), { columns: 80, rows: 16, isTTY: false })
const stdin = Object.assign(new PassThrough(), { isTTY: true, setRawMode: () => {}, ref: () => {}, unref: () => {} })
diff --git a/ui-tui/src/components/agentControls.tsx b/ui-tui/src/components/agentControls.tsx
index 7235c6373ed..d5f56db27a7 100644
--- a/ui-tui/src/components/agentControls.tsx
+++ b/ui-tui/src/components/agentControls.tsx
@@ -58,6 +58,7 @@ export function AgentSteerForm({
if (!text.trim() || pending) {
return
}
+
setPending(true)
try {
@@ -107,6 +108,7 @@ export function AgentLiveTail({ gw, sid, id, t }: ControlProps) {
if (pending) {
return
}
+
pending = true
try {
diff --git a/ui-tui/src/components/agentsOverlay.tsx b/ui-tui/src/components/agentsOverlay.tsx
index e2d3beb6d1e..5940979faee 100644
--- a/ui-tui/src/components/agentsOverlay.tsx
+++ b/ui-tui/src/components/agentsOverlay.tsx
@@ -628,6 +628,7 @@ export function AgentsOverlay({ gw, initialHistoryIndex = 0, onClose, t }: Agent
const selected = rows[cursor] ?? null
const cols = stdout?.columns ?? 80
+
const {
rows: rowsH,
start: listWindowStart,
diff --git a/ui-tui/src/components/agentsPanel.tsx b/ui-tui/src/components/agentsPanel.tsx
index b503f3e50e0..3c16f16e280 100644
--- a/ui-tui/src/components/agentsPanel.tsx
+++ b/ui-tui/src/components/agentsPanel.tsx
@@ -50,6 +50,7 @@ export function LiveAgentsPanel({ cols }: { cols: number }) {
if (!live) {
return
}
+
const timer = setInterval(() => setNow(Date.now()), 1000)
return () => clearInterval(timer)