jackwener/OpenCLI · warning · CommandExecutionError

Refresh button not visible

Error message

Refresh button not visible

What it means

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.

Source

Thrown at clis/kimi/chat.js:374

// -------- regenerate --------
cli({
    site: 'kimi',
    name: 'regenerate',
    access: 'write',
    description: 'Click Refresh (Kimi\'s regenerate button) on the last assistant message. Pass --conv <id> to target a specific chat.',
    domain: KIMI_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    siteSession: 'persistent',
    navigateBefore: false,
    args: [
        { name: 'conv', required: false, help: 'Chat id or URL' },
    ],
    columns: CHAT_COLUMNS,
    func: async (page, kwargs) => {
        await maybeNavigateConv(page, kwargs?.conv);
        const res = await page.evaluate(clickBySvgNameScript('Refresh'));
        if (!res?.ok) throw new CommandExecutionError(res?.reason || 'Refresh button not visible', '');
        return [{ Status: 'regenerated' }];
    },
});

// -------- react --------
cli({
    site: 'kimi',
    name: 'react',
    access: 'write',
    description: 'Like or dislike the last assistant message. Pass --conv <id> to target a specific chat.',
    domain: KIMI_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    siteSession: 'persistent',
    navigateBefore: false,
    args: [
        { name: 'kind', positional: true, required: true, help: 'like or dislike' },
        { name: 'conv', required: false, help: 'Chat id or URL' },

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Ensure the conversation has at least one assistant reply before regenerating.
  2. Hover/focus the last assistant message so the Refresh control renders, then retry.
  3. Wait for any in-flight response to finish streaming before regenerating.
  4. Check the Kimi UI for icon-name changes and update the 'Refresh' SVG name.

Example fix

// before
await cli('kimi', 'send', { text: 'hi' });
await cli('kimi', 'regenerate'); // response may not exist yet
// after
await cli('kimi', 'send', { text: 'hi' });
await page.wait(5); // let the reply finish
await cli('kimi', 'regenerate');
Defensive patterns

Strategy: retry

Validate before calling

// regenerate only when an assistant reply exists
const turns = await cli('kimi', 'read', { conv });
if (!turns.some(t => t.Role === 'Assistant')) throw new Error('nothing to regenerate');

Type guard

function clickOk(res) { return !!res && res.ok === true; }

Try / catch

try {
  await cli('kimi', 'regenerate', { conv });
} catch (e) {
  if (/Refresh button not visible/i.test(e.message)) {
    await page.wait(2);
    await cli('kimi', 'regenerate', { conv });
  } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/c01bb4897b52332a. Report an issue: GitHub.