refactor(settings-view): streamline authentication status handling

- Removed unused state variables related to shortcut editing in the settings view.
- Updated authentication status handling for Claude and Codex to use more precise type definitions, improving type safety and clarity.
- Enhanced the ElectronAPI and SetupAPI interfaces to include optional properties for stored OAuth and API keys, ensuring better alignment with the runtime API responses.
This commit is contained in:
Kacper
2025-12-10 23:19:09 +01:00
parent 8a6309ccc9
commit 6086d22a44
2 changed files with 19 additions and 14 deletions

View File

@@ -184,6 +184,9 @@ export interface ElectronAPI {
method: string;
hasCredentialsFile: boolean;
hasToken: boolean;
hasStoredOAuthToken?: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;
@@ -198,6 +201,8 @@ export interface ElectronAPI {
method: string;
hasAuthFile: boolean;
hasEnvKey: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;
@@ -542,6 +547,9 @@ interface SetupAPI {
method: string;
hasCredentialsFile: boolean;
hasToken: boolean;
hasStoredOAuthToken?: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;
@@ -556,6 +564,8 @@ interface SetupAPI {
method: string;
hasAuthFile: boolean;
hasEnvKey: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;