feat: add OAuth proxy controls to Web UI#246
feat: add OAuth proxy controls to Web UI#246StarsWhere wants to merge 3 commits intorouter-for-me:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to configure a proxy for OAuth logins, allowing users to specify a proxy URL or use the global proxy settings for server-side operations. Changes include new UI components on the OAuth page, updated localization files, and modifications to the OAuth API service to handle the proxy parameter. A suggestion was made to simplify the logic for passing authentication options by using shorthand property names and removing redundant undefined checks.
| provider === 'gemini-cli' | ||
| ? { projectId: projectId || undefined, proxyUrl } | ||
| : proxyUrl | ||
| ? { proxyUrl } | ||
| : undefined |
There was a problem hiding this comment.
The logic for constructing the options object can be simplified using shorthand property names. Additionally, projectId || undefined is redundant because projectId is already defined as string | undefined and is guaranteed not to be an empty string at this point based on the logic at lines 242-246.
| provider === 'gemini-cli' | |
| ? { projectId: projectId || undefined, proxyUrl } | |
| : proxyUrl | |
| ? { proxyUrl } | |
| : undefined | |
| provider === 'gemini-cli' | |
| ? { projectId, proxyUrl } | |
| : proxyUrl | |
| ? { proxyUrl } | |
| : undefined |
|
Follow-up pushed in aa242e5 addressing the review suggestion by simplifying the Gemini OAuth options construction.\n\nTesting:\n- npm run lint\n- npm run build |
Summary
Adds OAuth proxy controls to the Web UI so users can provide a one-time proxy for OAuth login and optionally fill that field from the current global proxy.
Closes #245
Key changes
proxy_urlwhen starting OAuth login.Testing
npm run lintnpm run build