-
Notifications
You must be signed in to change notification settings - Fork 89
feat: add native code edit event to session transcript #146
Copy link
Copy link
Open
Description
Summary
Add a first-class/native code edit event in the session transcript so clients can render file edits directly without reconstructing them from tool output text.
Problem
Today, code edits are mostly inferred from tool output and post-hoc diffs. This is brittle and provider-dependent.
Proposal
Introduce a dedicated session event/item shape for code edits (or an equivalent normalized event) that includes structured edit metadata.
Suggested minimum fields:
- file path
- operation (create/update/delete/rename)
- before/after hashes (if available)
- patch/diff payload (or structured hunks)
- tool/source attribution
- timestamps / sequencing compatible with existing
item.started -> item.delta -> item.completedmodel
Why
- Makes UI rendering of edits deterministic
- Avoids parsing free-form tool text
- Improves parity across providers and event consumers
- Simplifies downstream integrations that need edit timelines
Acceptance criteria
- Session events expose a structured code-edit event for actual file mutations
- Event shape is documented in
docs/session-transcript-schema.mdx - Conversion docs are updated (
docs/conversion.mdx) - HTTP/SSE tests cover the new event end-to-end
Related: #102
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels