MCPcopy Index your code
hub / github.com/simstudioai/sim / isMessagesArray

Function isMessagesArray

apps/sim/lib/workflows/subblocks/display.ts:95–109  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

93}
94
95const isMessagesArray = (value: unknown): value is Array<{ role: string; content: string }> => {
96 return (
97 Array.isArray(value) &&
98 value.length > 0 &&
99 value.every(
100 (item) =>
101 typeof item === 'object' &&
102 item !== null &&
103 'role' in item &&
104 'content' in item &&
105 typeof item.role === 'string' &&
106 typeof item.content === 'string'
107 )
108 )
109}
110
111const isTagFilterArray = (value: unknown): value is TagFilterItem[] => {
112 if (!Array.isArray(value) || value.length === 0) return false

Callers 1

getDisplayValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected