{"record":{"id":"c01bb4897b52332a","repo":"jackwener/OpenCLI","slug":"refresh-button-not-visible","errorCode":null,"errorMessage":"Refresh button not visible","messagePattern":"Refresh button not visible","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"warning","filePath":"clis/kimi/chat.js","lineNumber":374,"sourceCode":"// -------- regenerate --------\ncli({\n    site: 'kimi',\n    name: 'regenerate',\n    access: 'write',\n    description: 'Click Refresh (Kimi\\'s regenerate button) on the last assistant message. Pass --conv <id> to target a specific chat.',\n    domain: KIMI_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'conv', required: false, help: 'Chat id or URL' },\n    ],\n    columns: CHAT_COLUMNS,\n    func: async (page, kwargs) => {\n        await maybeNavigateConv(page, kwargs?.conv);\n        const res = await page.evaluate(clickBySvgNameScript('Refresh'));\n        if (!res?.ok) throw new CommandExecutionError(res?.reason || 'Refresh button not visible', '');\n        return [{ Status: 'regenerated' }];\n    },\n});\n\n// -------- react --------\ncli({\n    site: 'kimi',\n    name: 'react',\n    access: 'write',\n    description: 'Like or dislike the last assistant message. Pass --conv <id> to target a specific chat.',\n    domain: KIMI_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'kind', positional: true, required: true, help: 'like or dislike' },\n        { name: 'conv', required: false, help: 'Chat id or URL' },","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/kimi/chat.js#L356-L392","documentation":"Thrown by the kimi regenerate command when clickBySvgNameScript('Refresh') cannot find or click the Refresh/regenerate control on the current conversation. CommandExecutionError carries the in-page reason or this fallback text.","triggerScenarios":"No assistant message on the page (nothing to regenerate, so no Refresh button), button only visible on hover, still-streaming response, or Kimi renamed the Refresh SVG icon.","commonSituations":"Running regenerate in a user-only or brand-new conversation; headless sessions where hover-revealed buttons are absent; Kimi UI updates moving regenerate behind a menu.","solutions":["Ensure the conversation has at least one assistant reply before regenerating.","Hover/focus the last assistant message so the Refresh control renders, then retry.","Wait for any in-flight response to finish streaming before regenerating.","Check the Kimi UI for icon-name changes and update the 'Refresh' SVG name."],"exampleFix":"// before\nawait cli('kimi', 'send', { text: 'hi' });\nawait cli('kimi', 'regenerate'); // response may not exist yet\n// after\nawait cli('kimi', 'send', { text: 'hi' });\nawait page.wait(5); // let the reply finish\nawait cli('kimi', 'regenerate');","handlingStrategy":"retry","validationCode":"// regenerate only when an assistant reply exists\nconst turns = await cli('kimi', 'read', { conv });\nif (!turns.some(t => t.Role === 'Assistant')) throw new Error('nothing to regenerate');","typeGuard":"function clickOk(res) { return !!res && res.ok === true; }","tryCatchPattern":"try {\n  await cli('kimi', 'regenerate', { conv });\n} catch (e) {\n  if (/Refresh button not visible/i.test(e.message)) {\n    await page.wait(2);\n    await cli('kimi', 'regenerate', { conv });\n  } else throw e;\n}","preventionTips":["Ensure at least one assistant reply exists before regenerating.","Let streaming finish first; the Refresh control appears afterwards.","Hover the last reply if the button is hover-revealed.","Track Kimi UI icon-name changes."],"tags":["dom-scraping","command-execution","kimi"],"backgroundTag":"button-click-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}