(mode)
| 29 | } |
| 30 | |
| 31 | export function setSendButtonMode(mode) { |
| 32 | const btn = $('btn-send'); |
| 33 | btn.disabled = false; |
| 34 | if (mode === 'stop') { |
| 35 | btn.classList.add('stop-mode'); |
| 36 | btn.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><rect x="6" y="6" width="12" height="12" rx="2"/></svg>'; |
| 37 | btn.title = 'Stop'; |
| 38 | return; |
| 39 | } |
| 40 | btn.classList.remove('stop-mode'); |
| 41 | btn.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 19V5M5 12l7-7 7 7"/></svg>'; |
| 42 | btn.title = 'Send'; |
| 43 | } |
| 44 | |
| 45 | function showCmdMenu(filter) { |
| 46 | const menu = $('cmd-menu'); |
no test coverage detected