()
| 3507 | }; |
| 3508 | |
| 3509 | const readLatestIssuedMcpToken = () => { |
| 3510 | const raw = String(mcpUserTokenOutputEl?.textContent || '').trim(); |
| 3511 | if (!raw) return ''; |
| 3512 | const lines = raw |
| 3513 | .split(/\r?\n/) |
| 3514 | .map((line) => line.trim()) |
| 3515 | .filter(Boolean); |
| 3516 | if (!lines.length) return ''; |
| 3517 | const lastLine = String(lines[lines.length - 1] || '').trim(); |
| 3518 | if (!lastLine || /\s/.test(lastLine)) return ''; |
| 3519 | return lastLine; |
| 3520 | }; |
| 3521 | |
| 3522 | const mcpTemplateContext = () => { |
| 3523 | const mcpUrl = normalizeMcpUrl(mcpTplBaseUrlEl?.value || inferMcpTemplateUrl()); |
no test coverage detected