MCPcopy Index your code
hub / github.com/TanStack/ai / textPart

Function textPart

packages/ai-opencode/tests/translate.test.ts:54–69  ·  view source on GitHub ↗
(
  id: string,
  text: string,
  delta?: string,
)

Source from the content-addressed store, hash-verified

52}
53
54function 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
71describe('translateOpencodeStream', () => {
72 it('translates a simple text turn', async () => {

Callers 1

translate.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected