mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-20 21:26:04 +00:00
feat: add support for user message events from Codex
Add sendUserMessage() method to ApiSessionClient and CodexSession to handle user_message events from Codex. Updates CodexConversionResult type and convertCodexEvent() to process user_message payloads, with test coverage.
This commit is contained in:
@@ -23,6 +23,15 @@ describe('convertCodexEvent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('converts user_message events', () => {
|
||||
const result = convertCodexEvent({
|
||||
type: 'event_msg',
|
||||
payload: { type: 'user_message', message: 'hello user' }
|
||||
});
|
||||
|
||||
expect(result?.userMessage).toBe('hello user');
|
||||
});
|
||||
|
||||
it('converts reasoning events', () => {
|
||||
const result = convertCodexEvent({
|
||||
type: 'event_msg',
|
||||
|
||||
Reference in New Issue
Block a user