mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 11:40:47 +00:00
Return LogOutput object and update callers
Introduce a LogOutput dataclass (items, start, end) and change Log.output to return a LogOutput instead of a bare list. Update callers to unwrap items: api_log_get now reads log_output.items, and state_snapshot builds logs and log_end from the LogOutput and uses log_end for log_version. Also re-enable the @extensible decorator on AgentContext.output. These changes expose log metadata (start/end) alongside items for consumers.
This commit is contained in:
parent
8d82979157
commit
2cf73c4b4a
4 changed files with 19 additions and 5 deletions
|
|
@ -44,7 +44,8 @@ class ApiLogGet(ApiHandler):
|
|||
start_pos = max(0, total_items - length)
|
||||
|
||||
# Get log items from the calculated start position
|
||||
log_items = context.log.output(start=start_pos)
|
||||
log_output = context.log.output(start=start_pos)
|
||||
log_items = log_output.items
|
||||
|
||||
# Return log data with metadata
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue