Skip to content

feat: add --list-models CLI flag and fix rendering artifacts#5

Open
matheustimbo wants to merge 2 commits into
verbeux-ai:mainfrom
matheustimbo:feat/list-models-cli-flag
Open

feat: add --list-models CLI flag and fix rendering artifacts#5
matheustimbo wants to merge 2 commits into
verbeux-ai:mainfrom
matheustimbo:feat/list-models-cli-flag

Conversation

@matheustimbo

Copy link
Copy Markdown

Summary

  • Add --list-models CLI option to fetch and display available Verboo models as JSON output, then exit
  • Remove model name width calculation from PromptInput that was causing rendering artifacts

Test plan

  • verboo --list-models outputs JSON array of available models
  • verboo --list-models exits with error when not authenticated
  • PromptInput no longer has rendering artifacts from model name width

🤖 Generated with Verboo Code

- Add --list-models option to fetch and display available Verboo models
  as JSON output, then exit
- Remove model name width calculation from PromptInput that was causing
  rendering artifacts

Co-Authored-By: Verboo Code <noreply@code.verboo.ai>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new CLI option --list-models to retrieve and display available Verboo models, alongside minor cleanup in PromptInput.tsx. The review feedback highlights a lack of error handling when fetching models, which could lead to unhandled promise rejections, and suggests wrapping the API call in a try-catch block.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main.tsx Outdated
Comment on lines +1025 to +1039
const models = await fetchVerbooModels(tokens.accessToken);
if (!models || models.length === 0) {
process.stdout.write('[]\n');
process.exit(0);
}
const output = models.map(m => ({
id: m.id,
displayName: m.displayName || null,
contextWindow: m.contextWindow || null,
maxOutputTokens: m.maxOutputTokens || null,
description: m.description || null
}));
process.stdout.write(JSON.stringify(output, null, 2) + '\n');
process.exit(0);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The model fetching logic lacks error handling. If fetchVerbooModels throws an error (or is refactored to propagate errors), it will result in an unhandled promise rejection. Wrapping this block in a try-catch ensures that any network or API errors are gracefully caught, logged to stderr, and the process exits with a non-zero status code (1).

      try {
        const models = await fetchVerbooModels(tokens.accessToken);
        if (!models || models.length === 0) {
          process.stdout.write('[]\\n');
          process.exit(0);
        }
        const output = models.map(m => ({
          id: m.id,
          displayName: m.displayName || null,
          contextWindow: m.contextWindow || null,
          maxOutputTokens: m.maxOutputTokens || null,
          description: m.description || null
        }));
        process.stdout.write(JSON.stringify(output, null, 2) + '\\n');
        process.exit(0);
      } catch (error) {
        process.stderr.write(`Error: Failed to fetch models. ${errorMessage(error)}\\n`);
        process.exit(1);
      }

- Wrap --list-models handler in try-catch to prevent unhandled promise
  rejections from getClaudeAIOAuthTokensAsync or fetchVerbooModels
- Remove orphaned comment in PromptInput that referenced non-existent
  code removal

Co-Authored-By: Verboo Code <noreply@code.verboo.ai>
@vhsmdev

vhsmdev commented Jun 27, 2026

Copy link
Copy Markdown

😴 PR inativo

Este PR está sem atividade há 20 dias e tem um review comment sem resposta.

Se ainda é relevante, atualize com o status atual ou responda ao review.
Caso contrário, será fechado em 7 dias automaticamente.

worker:stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants