Spaces:
Paused

icebear icebear0828 commited on
Commit
1531084
·
unverified ·
1 Parent(s): 1d9f789

fix: handle new Responses SSE lifecycle events (#137)

Browse files

* fix: handle new Responses SSE lifecycle events (output_item.added message, content_part)

Upstream Codex API now wraps text responses in message/content_part
lifecycle events. Our parser only recognized output_item.added with
item.type=function_call, causing unknown event log spam.

- Widen output_item.added to accept any item.type (message, etc.)
- Add content_part.added and content_part.done as recognized no-op events
- Update extractor to handle optional call_id/name on non-function_call items

* chore: remove loose index signature from CodexOutputItemAddedEvent.item

---------

Co-authored-by: icebear0828 <icebear0828@users.noreply.github.com>

4 files changed +122 -18
Files changed (4)
CHANGELOG.md+1
src/translation/codex-event-extractor.ts+4-2
src/types/__tests__/codex-events.test.tsAdded+75
src/types/codex-events.ts+42-16