(_ctx, chunk)
| 58 | const chunkTransformMiddleware: ChatMiddleware = { |
| 59 | name: 'chunk-transform', |
| 60 | onChunk(_ctx, chunk) { |
| 61 | if (chunk.type === 'TEXT_MESSAGE_CONTENT' && chunk.delta) { |
| 62 | return { |
| 63 | ...chunk, |
| 64 | delta: '[MW] ' + chunk.delta, |
| 65 | content: '[MW] ' + (chunk.content || ''), |
| 66 | } |
| 67 | } |
| 68 | return chunk |
| 69 | }, |
| 70 | } |
| 71 | |
| 72 | const toolSkipMiddleware: ChatMiddleware = { |
nothing calls this directly
no test coverage detected