(page)
| 213 | const sentSince = async (page, mark, kind = 'chat') => (await workerMessages(page)).slice(mark).filter((entry) => entry.kind === kind); |
| 214 | const promptText = (entry) => (entry?.messages ?? []).map((message) => `[${message.role}] ${message.content}`).join('\n\n'); |
| 215 | async function clickExplainAgain(page) { |
| 216 | const button = page.locator('.cbm-chat-explanation .cbm-chat-retry'); |
| 217 | await button.click(); |
| 218 | await wait(800); |
| 219 | await explanationDone(page); |
| 220 | } |
| 221 | async function newConversation(page) { |
| 222 | const button = page.locator('.cbm-chat-header .cbm-chat-new'); |
| 223 | if (!(await button.count())) return; |
no test coverage detected