mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
redesign our approach for api keys to not use claude setup-token
This commit is contained in:
@@ -355,6 +355,9 @@ export interface ElectronAPI {
|
||||
provider: string,
|
||||
apiKey: string
|
||||
) => Promise<{ success: boolean; error?: string }>;
|
||||
deleteApiKey: (
|
||||
provider: string
|
||||
) => Promise<{ success: boolean; error?: string; message?: string }>;
|
||||
getApiKeys: () => Promise<{
|
||||
success: boolean;
|
||||
hasAnthropicKey: boolean;
|
||||
@@ -369,6 +372,11 @@ export interface ElectronAPI {
|
||||
isMac: boolean;
|
||||
isLinux: boolean;
|
||||
}>;
|
||||
verifyClaudeAuth: (authMethod?: "cli" | "api_key") => Promise<{
|
||||
success: boolean;
|
||||
authenticated: boolean;
|
||||
error?: string;
|
||||
}>;
|
||||
onInstallProgress?: (callback: (progress: any) => void) => () => void;
|
||||
onAuthProgress?: (callback: (progress: any) => void) => () => void;
|
||||
};
|
||||
@@ -874,6 +882,9 @@ interface SetupAPI {
|
||||
hasAnthropicKey: boolean;
|
||||
hasGoogleKey: boolean;
|
||||
}>;
|
||||
deleteApiKey: (
|
||||
provider: string
|
||||
) => Promise<{ success: boolean; error?: string; message?: string }>;
|
||||
getPlatform: () => Promise<{
|
||||
success: boolean;
|
||||
platform: string;
|
||||
@@ -883,6 +894,11 @@ interface SetupAPI {
|
||||
isMac: boolean;
|
||||
isLinux: boolean;
|
||||
}>;
|
||||
verifyClaudeAuth: (authMethod?: "cli" | "api_key") => Promise<{
|
||||
success: boolean;
|
||||
authenticated: boolean;
|
||||
error?: string;
|
||||
}>;
|
||||
onInstallProgress?: (callback: (progress: any) => void) => () => void;
|
||||
onAuthProgress?: (callback: (progress: any) => void) => () => void;
|
||||
}
|
||||
@@ -942,6 +958,11 @@ function createMockSetupAPI(): SetupAPI {
|
||||
};
|
||||
},
|
||||
|
||||
deleteApiKey: async (provider: string) => {
|
||||
console.log("[Mock] Deleting API key for:", provider);
|
||||
return { success: true, message: `API key for ${provider} deleted` };
|
||||
},
|
||||
|
||||
getPlatform: async () => {
|
||||
return {
|
||||
success: true,
|
||||
@@ -954,6 +975,16 @@ function createMockSetupAPI(): SetupAPI {
|
||||
};
|
||||
},
|
||||
|
||||
verifyClaudeAuth: async (authMethod?: "cli" | "api_key") => {
|
||||
console.log("[Mock] Verifying Claude auth with method:", authMethod);
|
||||
// Mock always returns not authenticated
|
||||
return {
|
||||
success: true,
|
||||
authenticated: false,
|
||||
error: "Mock environment - authentication not available",
|
||||
};
|
||||
},
|
||||
|
||||
onInstallProgress: (callback) => {
|
||||
// Mock progress events
|
||||
return () => {};
|
||||
|
||||
Reference in New Issue
Block a user