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

Function hasPromptContent

examples/ts-react-media/src/lib/server-functions.ts:20–24  ·  view source on GitHub ↗

True when the prompt carries text — a non-empty string or any prompt part.

(prompt: MediaPrompt)

Source from the content-addressed store, hash-verified

18
19/** True when the prompt carries text — a non-empty string or any prompt part. */
20function hasPromptContent(prompt: MediaPrompt): boolean {
21 return typeof prompt === 'string'
22 ? prompt.trim().length > 0
23 : prompt.length > 0
24}
25
26/**
27 * Narrows a wire `MediaPrompt` to a text + image prompt for image-conditioned

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected