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

Function handleGenerate

testing/e2e/src/components/VideoGenUI.tsx:73–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 useGenerateVideo(connectionOptions())
72
73 const handleGenerate = async () => {
74 if (!imageFile) {
75 await generate({ prompt })
76 return
77 }
78 const base64 = await fileToBase64(imageFile)
79 await generate({
80 prompt: [
81 { type: 'text', content: prompt },
82 {
83 type: 'image',
84 source: { type: 'data', value: base64, mimeType: imageFile.type },
85 },
86 ],
87 })
88 }
89
90 return (
91 <div className="p-4 space-y-4">

Callers

nothing calls this directly

Calls 2

generateFunction · 0.70
fileToBase64Function · 0.70

Tested by

no test coverage detected