(scrollTop, clientHeight, itemContentY, itemHeight, col = 0)
| 807 | }); |
| 808 | return await Promise.race([proxyCall, timeoutPromise]); |
| 809 | } |
| 810 | |
| 811 | if (!puter.ai.chat) { |
| 812 | throw new Error('Puter.js AI chat is not available. Please refresh the application.'); |
| 813 | } |
| 814 | return await Promise.race([ |
| 815 | puter.ai.chat(prompt, imageUrl, { model: modelName }), |
| 816 | timeoutPromise |
| 817 | ]); |
| 818 | } |
| 819 | |
| 820 | // Assign puter-ai-chat-request handler early so Test (Puter) works in Docker/server before DOMContentLoaded |
| 821 | window._electronRealEventHandlers['puter-ai-chat-request'] = async function(requestId, prompt, imageUrl, model) { |
| 822 | console.log('[Puter AI] Received request, Puter.js captcha may appear in this window'); |
no outgoing calls
no test coverage detected