Live agent todo list: compact scrollable strip above the composer
Add a todo.update frame (server->app) carrying the agent's full current todo list. The gateway emits it whenever the hermes todo tool completes (the tool result is authoritative even for merge writes) and re-sends a snapshot right after hello so a reconnecting device re-learns the plan. Ephemeral: never outboxed. The app renders it as a compact strip above the composer (max 3 lines, the rest scrollable) mirroring the hermes desktop composer status stack: pending = hollow ring, in_progress = spinner, completed = green check, cancelled = struck through. It auto-scrolls to the current task whenever the active task changes, and hides itself once the list is empty or fully resolved.
This commit is contained in:
1 parent
1ff2ef380c
commit
742916903b
10 files changed
+447
-3
No files matched your search
@@ -223,9 +223,7 @@ class HttpServer:
|
||||
return
|
||||
|
||||
self._httpd = httpd
|
||||
self._thread = threading.Thread(
|
||||
target=httpd.serve_forever, name="iris-http", daemon=True
|
||||
)
|
||||
self._thread = threading.Thread(target=httpd.serve_forever, name="iris-http", daemon=True)
|
||||
self._thread.start()
|
||||
self.enabled = True
|
||||
scheme = "https" if (self._adapter.http_cert and self._adapter.http_key) else "http"
|
||||
@@ -513,6 +511,10 @@ class HttpServer:
|
||||
self._write_sse(
|
||||
handler, "frame", None, protocol.status(self._adapter.gateway_status()).to_json()
|
||||
)
|
||||
# 2b. Live todo-list snapshot (ephemeral state, never outboxed):
|
||||
# a (re)connecting device re-learns the agent's current plan here.
|
||||
for snap in self._adapter.todo_snapshot_frames():
|
||||
self._write_sse(handler, "frame", None, snap.to_json())
|
||||
# 3. Live frames (cursor=None frames have no id).
|
||||
while not sub.closed.is_set():
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user