Function
textPart
(
id: string,
text: string,
delta?: string,
)
Source from the content-addressed store, hash-verified
| 52 | } |
| 53 | |
| 54 | function textPart( |
| 55 | id: string, |
| 56 | text: string, |
| 57 | delta?: string, |
| 58 | ): OpencodeStreamEvent { |
| 59 | return { |
| 60 | kind: 'event', |
| 61 | event: { |
| 62 | type: 'message.part.updated', |
| 63 | properties: { |
| 64 | part: { id, sessionID: 'sess-1', type: 'text', text }, |
| 65 | ...(delta !== undefined && { delta }), |
| 66 | }, |
| 67 | }, |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | describe('translateOpencodeStream', () => { |
| 72 | it('translates a simple text turn', async () => { |
Tested by
no test coverage detected