()
| 391 | } |
| 392 | |
| 393 | function sendPlanOther() { |
| 394 | const text = $('plan-other-input').value.trim(); |
| 395 | if (!text || !S.ws || S.ws.readyState !== WebSocket.OPEN) return; |
| 396 | consumePendingPlanCard(); |
| 397 | if (activePlanToolUseId) dropPendingInteraction(activePlanToolUseId); |
| 398 | activePlanToolUseId = null; |
| 399 | S.ws.send(JSON.stringify({ type: 'input', data: '4' })); |
| 400 | setTimeout(() => { |
| 401 | if (S.ws?.readyState === WebSocket.OPEN) { |
| 402 | S.ws.send(JSON.stringify({ type: 'chat', text })); |
| 403 | } |
| 404 | }, 500); |
| 405 | $('plan-overlay').classList.remove('visible'); |
| 406 | presentNextPendingInteraction(); |
| 407 | } |
| 408 | |
| 409 | export function initInteractions() { |
| 410 | $('question-prev-btn').addEventListener('click', goToPrev); |
no test coverage detected