Update script-terminal-modal.tsx

This commit is contained in:
MacRimi
2026-04-09 20:50:56 +02:00
parent 5277e7b47d
commit eed9303e41

View File

@@ -283,12 +283,15 @@ const initMessage = {
} }
}, 30000) }, 30000)
// Small delay to ensure paramsRef is updated with latest props
setTimeout(() => {
const initMessage = { const initMessage = {
script_path: scriptPath, script_path: scriptPath,
params, params: paramsRef.current,
} }
console.log("[v0] WS onopen - Sending params:", paramsRef.current)
ws.send(JSON.stringify(initMessage)) ws.send(JSON.stringify(initMessage))
}, 50)
setTimeout(() => { setTimeout(() => {
if (fitAddonRef.current && termRef.current && ws.readyState === WebSocket.OPEN) { if (fitAddonRef.current && termRef.current && ws.readyState === WebSocket.OPEN) {