fix: Address PR review comments

- Fix window.Electron to window.isElectron in http-api-client.ts
- Use void operator instead of async/await for onClick handlers in git-diff-panel.tsx
- Fix critical bug: correct parameter order in useStartAutoMode (maxConcurrency was passed as branchName)
- Add error handling for getApiKeys() result in use-cli-status.ts
- Add authClaude guard in claude-cli-status.tsx for consistency with deauthClaude
- Add optional chaining on api object in cursor-cli-status.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 18:55:42 +01:00
parent 5c335641fa
commit 08d1497cbe
6 changed files with 16 additions and 14 deletions

View File

@@ -348,7 +348,7 @@ export function useStartAutoMode(projectPath: string) {
mutationFn: async (maxConcurrency?: number) => {
const api = getElectronAPI();
if (!api.autoMode) throw new Error('AutoMode API not available');
const result = await api.autoMode.start(projectPath, String(maxConcurrency ?? ''));
const result = await api.autoMode.start(projectPath, undefined, maxConcurrency);
if (!result.success) {
throw new Error(result.error || 'Failed to start auto mode');
}

View File

@@ -69,6 +69,9 @@ export function useApiKeysStatus() {
throw new Error('Setup API not available');
}
const result = await api.setup.getApiKeys();
if (!result.success) {
throw new Error('Failed to fetch API keys');
}
return result;
},
staleTime: STALE_TIMES.CLI_STATUS,