feat: implement Codex CLI authentication check and integrate with provider

- Added a new utility for checking Codex CLI authentication status using the 'codex login status' command.
- Integrated the authentication check into the CodexProvider's installation detection and authentication methods.
- Updated Codex CLI status display in the UI to reflect authentication status and method.
- Enhanced error handling and logging for better debugging during authentication checks.
- Refactored related components to ensure consistent handling of authentication across the application.
This commit is contained in:
webdevcody
2026-01-07 21:06:39 -05:00
parent 47c2d795e0
commit 8c68c24716
16 changed files with 718 additions and 169 deletions

View File

@@ -54,7 +54,7 @@ export function CodexSettingsTab() {
}
: null);
// Load Codex CLI status on mount
// Load Codex CLI status and auth status on mount
useEffect(() => {
const checkCodexStatus = async () => {
const api = getElectronAPI();
@@ -158,11 +158,13 @@ export function CodexSettingsTab() {
);
const showUsageTracking = codexAuthStatus?.authenticated ?? false;
const authStatusToDisplay = codexAuthStatus;
return (
<div className="space-y-6">
<CodexCliStatus
status={codexCliStatus}
authStatus={authStatusToDisplay}
isChecking={isCheckingCodexCli}
onRefresh={handleRefreshCodexCli}
/>