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)
const initMessage = { // Small delay to ensure paramsRef is updated with latest props
script_path: scriptPath, setTimeout(() => {
params, const initMessage = {
} script_path: scriptPath,
params: paramsRef.current,
ws.send(JSON.stringify(initMessage)) }
console.log("[v0] WS onopen - Sending params:", paramsRef.current)
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) {