Skip to content

feat: Add visibility toggle for API key inputs #6114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teungdao
Copy link

@teungdao teungdao commented Jul 23, 2025

Related GitHub Issue

Closes: #6113

Description

Added visibility toggle to API key input fields for all supported providers. Key changes:

  • Created reusable PasswordInput component with eye icon toggle
  • Replaced plain password fields with new toggle component in all provider settings
  • Implemented show/hide functionality for API keys
  • Ensured consistent UI/UX across all providers

Affected providers: Amazon Bedrock, Anthropic, Chutes, Claude Code, Deepseek, GCP Vertex, Glama, Gemini, Groq, Human Relay, LiteLLM, LM Studio, Mistral, Moonshot, Ollama, OpenAI, OpenAI Compatible, Requesty, Unbound, VS Code LM API, xAI (Grok)

Test Procedure

  1. Open extension settings
  2. Navigate to any provider's configuration
  3. Verify eye icon appears next to API key field
  4. Click eye icon to toggle between visible/hidden states
  5. Confirm API key text visibility changes accordingly
  6. Verify icon changes between open/closed eye states

Pre-Submission Checklist

  • Issue Linked: Add visibility toggle to API key fields #6113
  • Scope: Changes focused on adding visibility toggle
  • Self-Review: Performed code review and testing
  • Testing: Manual testing completed for all providers
  • Documentation Impact: No documentation updates needed
  • Contribution Guidelines: Read and agreed

Screenshots / Videos

スクリーンショット 2025-07-23 22 22 50

Documentation Updates

  • No documentation updates are required.

Additional Notes

  • Implemented consistent UX pattern across all providers
  • Used VS Code's built-in eye icons for visual consistency
  • Component handles all accessibility concerns

Get in Touch

Discord: uta080522


Important

Introduce ApiKeyInput component with visibility toggle for API keys across provider settings.

  • Components:
    • Add ApiKeyInput component in ApiKeyInput.tsx with visibility toggle for API keys.
  • Provider Settings:
    • Replace VSCodeTextField with ApiKeyInput in Anthropic.tsx, Bedrock.tsx, and Chutes.tsx for API key fields.
    • Apply ApiKeyInput to DeepSeek.tsx, Gemini.tsx, and Glama.tsx for consistent API key handling.
    • Update Groq.tsx, LiteLLM.tsx, and Mistral.tsx to use ApiKeyInput for API key inputs.
    • Modify Moonshot.tsx, OpenAI.tsx, and OpenAICompatible.tsx to integrate ApiKeyInput.
    • Implement ApiKeyInput in OpenRouter.tsx, Requesty.tsx, and Unbound.tsx for API key visibility.
    • Use ApiKeyInput in Vertex.tsx and XAI.tsx for API key fields.

This description was created by Ellipsis for fc2b3b2. You can customize this summary. It will automatically update as commits are pushed.

@teungdao teungdao requested review from mrubens, cte and jr as code owners July 23, 2025 13:26
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request UI/UX UI/UX related or focused labels Jul 23, 2025
<label className="block font-medium mb-1">{label}</label>
{children}
</VSCodeTextField>
<div
Copy link

Choose a reason for hiding this comment

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

Consider replacing the clickable

used for toggling API key visibility with a element that includes an appropriate aria-label for better accessibility.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 23, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 24, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: PR [Needs Prelim Review]
Development

Successfully merging this pull request may close these issues.

2 participants