MCPcopy Create free account
hub / github.com/TanStack/ai / uiResourceChunk

Function uiResourceChunk

packages/ai/tests/helpers/processor-harness.ts:42–51  ·  view source on GitHub ↗
(
  value: Extract<StreamChunk, { type: 'CUSTOM' }>['value'],
)

Source from the content-addressed store, hash-verified

40
41/** A ui-resource CUSTOM event chunk (MCP Apps). */
42export function uiResourceChunk(
43 value: Extract<StreamChunk, { type: 'CUSTOM' }>['value'],
44): StreamChunk {
45 return {
46 type: EventType.CUSTOM,
47 timestamp: Date.now(),
48 name: 'ui-resource',
49 value,
50 }
51}
52
53/**
54 * Run a StreamProcessor with the given chunks and return the last assistant

Callers 1

Calls 1

nowMethod · 0.80

Tested by

no test coverage detected