mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Preserve and expose thread item lifecycle timestamps (#47114)
## What changed - Persist producer-recorded item start and completion times in thread history, preserving existing non-null values on updates. - Return nullable `startedAtMs` and `completedAtMs` Unix millisecond timestamps from `thread/items/list`, and update the generated schemas and TypeScript and Python types. - Leave timestamps unknown for existing rows and older writers. ## Testing Add coverage for exact timestamp persistence, protocol round trips with present and missing timestamps, paginated item responses, and compatibility with older database writers. GitOrigin-RevId: 894853481085782ff54db1704799e41446d15e51
This commit is contained in:
@@ -11194,7 +11194,21 @@ class ThreadItemEntry(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
completed_at_ms: Annotated[
|
||||
int | None,
|
||||
Field(
|
||||
alias="completedAtMs",
|
||||
description="Unix timestamp (milliseconds) when the item completed, if recorded by the producer.",
|
||||
),
|
||||
] = None
|
||||
item: ThreadItem
|
||||
started_at_ms: Annotated[
|
||||
int | None,
|
||||
Field(
|
||||
alias="startedAtMs",
|
||||
description="Unix timestamp (milliseconds) when the item started, if recorded by the producer.",
|
||||
),
|
||||
] = None
|
||||
turn_id: Annotated[str, Field(alias="turnId", description="Turn containing this item.")]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user