mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(tui): stream /browser connect progress as gateway events
Emit browser.progress JSON-RPC notifications during the connect work and render them in the TUI as system transcript lines, so users see the same step-by-step status the base CLI prints instead of nothing for ~1m followed by a final result.
This commit is contained in:
parent
7d39a45749
commit
e750829015
7 changed files with 148 additions and 33 deletions
|
|
@ -103,7 +103,8 @@ export const opsCommands: SlashCommand[] = [
|
|||
)
|
||||
}
|
||||
|
||||
const payload: Record<string, unknown> = { action }
|
||||
const sid = ctx.sid ?? null
|
||||
const payload: Record<string, unknown> = { action, session_id: sid }
|
||||
const requested = rest.join(' ').trim()
|
||||
|
||||
if (action === 'connect') {
|
||||
|
|
@ -115,7 +116,9 @@ export const opsCommands: SlashCommand[] = [
|
|||
.rpc<BrowserManageResponse>('browser.manage', payload)
|
||||
.then(
|
||||
ctx.guarded<BrowserManageResponse>(r => {
|
||||
r.messages?.forEach(message => ctx.transcript.sys(message))
|
||||
if (!sid) {
|
||||
r.messages?.forEach(message => ctx.transcript.sys(message))
|
||||
}
|
||||
|
||||
if (action === 'status') {
|
||||
return ctx.transcript.sys(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue