Load the lead's scrollback 50 turns at a time

This commit is contained in:
Ian Gulliver
2026-10-16 18:11:00 -07:00
parent 5dddc15ab9
commit 859aa2dd8b
20 changed files with 625 additions and 238 deletions
+26
View File
@@ -57,6 +57,23 @@ paths:
type: array
items: { $ref: "#/components/schemas/AgentSession" }
/api/me/lead/events:
get:
operationId: listLeadEvents
description: >
The calling user's lead events, oldest first, a page of whole turns: those after the turns+1'th turn.ended
before the before seq (or before the latest event when before is absent). Page back by passing the first
event's seq as before.
parameters:
- { name: before, in: query, required: false, schema: { type: integer, format: int64 } }
- { name: turns, in: query, required: false, schema: { type: integer, minimum: 1, maximum: 500 } }
responses:
"200":
description: Up to turns turns (default 50), plus any turn still running when before is absent.
content:
application/json:
schema: { $ref: "#/components/schemas/EventPage" }
/api/me/lead/messages:
post:
operationId: messageLead
@@ -1509,6 +1526,15 @@ components:
payload: { type: object }
created_at: { type: string, format: date-time }
EventPage:
type: object
required: [events, more]
properties:
events:
type: array
items: { $ref: "#/components/schemas/Event" }
more: { type: boolean, description: "Whether there are earlier events than this page." }
Focus:
type: object
required: [tabs, tab]