feat: remoe codex references after merging of main branch

This commit is contained in:
Kacper
2025-12-13 20:38:05 +01:00
parent 7c6d9d3723
commit 7fe3dff655
17 changed files with 43 additions and 411 deletions

View File

@@ -2,7 +2,6 @@ import type { LucideIcon } from "lucide-react";
import {
Key,
Terminal,
Atom,
Palette,
LayoutGrid,
Settings2,
@@ -20,7 +19,6 @@ export interface NavigationItem {
export const NAV_ITEMS: NavigationItem[] = [
{ id: "api-keys", label: "API Keys", icon: Key },
{ id: "claude", label: "Claude", icon: Terminal },
{ id: "codex", label: "Codex", icon: Atom },
{ id: "appearance", label: "Appearance", icon: Palette },
{ id: "kanban", label: "Kanban Display", icon: LayoutGrid },
{ id: "keyboard", label: "Keyboard Shortcuts", icon: Settings2 },

View File

@@ -59,7 +59,7 @@ export function FeatureDefaultsSection({
<p className="text-xs text-muted-foreground">
When enabled, the Add Feature dialog will show only AI profiles
and hide advanced model tweaking options (Claude SDK, thinking
levels, and OpenAI Codex CLI). This creates a cleaner, less
levels). This creates a cleaner, less
overwhelming UI. You can always disable this to access advanced
settings.
</p>

View File

@@ -2,7 +2,7 @@ import { useState, useCallback } from "react";
import { toast } from "sonner";
interface UseCliInstallationOptions {
cliType: "claude" | "codex";
cliType: "claude";
installApi: () => Promise<any>;
onProgressEvent?: (callback: (progress: any) => void) => (() => void) | undefined;
onSuccess?: () => void;

View File

@@ -1,7 +1,7 @@
import { useState, useCallback } from "react";
interface UseCliStatusOptions {
cliType: "claude" | "codex";
cliType: "claude";
statusApi: () => Promise<any>;
setCliStatus: (status: any) => void;
setAuthStatus: (status: any) => void;
@@ -33,65 +33,35 @@ export function useCliStatus({
setCliStatus(cliStatus);
if (result.auth) {
if (cliType === "claude") {
// Validate method is one of the expected values, default to "none"
const validMethods = [
"oauth_token_env",
"oauth_token",
"api_key",
"api_key_env",
"credentials_file",
"cli_authenticated",
"none",
] as const;
type AuthMethod = (typeof validMethods)[number];
const method: AuthMethod = validMethods.includes(
result.auth.method as AuthMethod
)
? (result.auth.method as AuthMethod)
: "none";
const authStatus = {
authenticated: result.auth.authenticated,
method,
hasCredentialsFile: false,
oauthTokenValid:
result.auth.hasStoredOAuthToken ||
result.auth.hasEnvOAuthToken,
apiKeyValid:
result.auth.hasStoredApiKey || result.auth.hasEnvApiKey,
hasEnvOAuthToken: result.auth.hasEnvOAuthToken,
hasEnvApiKey: result.auth.hasEnvApiKey,
};
setAuthStatus(authStatus);
} else {
// Codex auth status mapping
const mapAuthMethod = (method?: string): any => {
switch (method) {
case "cli_verified":
return "cli_verified";
case "cli_tokens":
return "cli_tokens";
case "auth_file":
return "api_key";
case "env_var":
return "env";
default:
return "none";
}
};
const method = mapAuthMethod(result.auth.method);
const authStatus = {
authenticated: result.auth.authenticated,
method,
apiKeyValid:
method === "cli_verified" || method === "cli_tokens"
? undefined
: result.auth.authenticated,
};
console.log(`[${cliType} Setup] Auth Status:`, authStatus);
setAuthStatus(authStatus);
}
// Validate method is one of the expected values, default to "none"
const validMethods = [
"oauth_token_env",
"oauth_token",
"api_key",
"api_key_env",
"credentials_file",
"cli_authenticated",
"none",
] as const;
type AuthMethod = (typeof validMethods)[number];
const method: AuthMethod = validMethods.includes(
result.auth.method as AuthMethod
)
? (result.auth.method as AuthMethod)
: "none";
const authStatus = {
authenticated: result.auth.authenticated,
method,
hasCredentialsFile: false,
oauthTokenValid:
result.auth.hasStoredOAuthToken ||
result.auth.hasEnvOAuthToken,
apiKeyValid:
result.auth.hasStoredApiKey || result.auth.hasEnvApiKey,
hasEnvOAuthToken: result.auth.hasEnvOAuthToken,
hasEnvApiKey: result.auth.hasEnvApiKey,
};
setAuthStatus(authStatus);
}
}
} catch (error) {

View File

@@ -4,7 +4,7 @@ import { getElectronAPI } from "@/lib/electron";
type AuthState = "idle" | "running" | "success" | "error" | "manual";
interface UseOAuthAuthenticationOptions {
cliType: "claude" | "codex";
cliType: "claude";
enabled?: boolean;
}
@@ -70,11 +70,8 @@ export function useOAuthAuthentication({
}
try {
// Call the appropriate auth API based on cliType
const result =
cliType === "claude"
? await api.setup.authClaude()
: await api.setup.authCodex?.();
// Call the auth API
const result = await api.setup.authClaude();
// Cleanup subscription
if (unsubscribeRef.current) {

View File

@@ -40,19 +40,6 @@ export function WelcomeStep({ onNext }: WelcomeStepProps) {
</CardContent>
</Card>
<Card className="bg-card/50 border-border hover:border-brand-500/50 transition-colors">
<CardHeader className="pb-3">
<CardTitle className="text-base flex items-center gap-2">
<Terminal className="w-5 h-5 text-green-500" />
Codex CLI
</CardTitle>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
OpenAI&apos;s GPT-5.1 Codex for advanced code generation tasks
</p>
</CardContent>
</Card>
</div>
<Button

View File

@@ -200,7 +200,7 @@ export function WikiView() {
{
icon: Cpu,
title: "Multi-Model Support",
description: "Claude Haiku/Sonnet/Opus + OpenAI Codex models. Choose the right model for each task.",
description: "Claude Haiku/Sonnet/Opus models. Choose the right model for each task.",
},
{
icon: Brain,

View File

@@ -287,22 +287,6 @@ export interface ElectronAPI {
};
error?: string;
}>;
checkCodexCli?: () => Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
hasApiKey?: boolean;
recommendation?: string;
installCommands?: {
macos?: string;
windows?: string;
linux?: string;
npm?: string;
};
error?: string;
}>;
model?: {
getAvailable: () => Promise<{
success: boolean;
@@ -315,11 +299,6 @@ export interface ElectronAPI {
error?: string;
}>;
};
testOpenAIConnection?: (apiKey?: string) => Promise<{
success: boolean;
message?: string;
error?: string;
}>;
worktree?: WorktreeAPI;
git?: GitAPI;
suggestions?: SuggestionsAPI;
@@ -347,32 +326,11 @@ export interface ElectronAPI {
};
error?: string;
}>;
getCodexStatus: () => Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
auth?: {
authenticated: boolean;
method: string; // Can be: "cli_verified", "cli_tokens", "auth_file", "env_var", "none"
hasAuthFile: boolean;
hasEnvKey: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;
installClaude: () => Promise<{
success: boolean;
message?: string;
error?: string;
}>;
installCodex: () => Promise<{
success: boolean;
message?: string;
error?: string;
}>;
authClaude: () => Promise<{
success: boolean;
token?: string;
@@ -383,12 +341,6 @@ export interface ElectronAPI {
message?: string;
output?: string;
}>;
authCodex: (apiKey?: string) => Promise<{
success: boolean;
requiresManualAuth?: boolean;
command?: string;
error?: string;
}>;
storeApiKey: (
provider: string,
apiKey: string
@@ -396,12 +348,8 @@ export interface ElectronAPI {
getApiKeys: () => Promise<{
success: boolean;
hasAnthropicKey: boolean;
hasOpenAIKey: boolean;
hasGoogleKey: boolean;
}>;
configureCodexMcp: (
projectPath: string
) => Promise<{ success: boolean; configPath?: string; error?: string }>;
getPlatform: () => Promise<{
success: boolean;
platform: string;
@@ -838,22 +786,11 @@ const getMockElectronAPI = (): ElectronAPI => {
recommendation: "Claude CLI checks are unavailable in the web preview.",
}),
checkCodexCli: async () => ({
success: false,
status: "not_installed",
recommendation: "Codex CLI checks are unavailable in the web preview.",
}),
model: {
getAvailable: async () => ({ success: true, models: [] }),
checkProviders: async () => ({ success: true, providers: {} }),
},
testOpenAIConnection: async () => ({
success: false,
error: "OpenAI connection test is only available in the Electron app.",
}),
// Mock Setup API
setup: createMockSetupAPI(),
@@ -903,32 +840,11 @@ interface SetupAPI {
};
error?: string;
}>;
getCodexStatus: () => Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
auth?: {
authenticated: boolean;
method: string; // Can be: "cli_verified", "cli_tokens", "auth_file", "env_var", "none"
hasAuthFile: boolean;
hasEnvKey: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}>;
installClaude: () => Promise<{
success: boolean;
message?: string;
error?: string;
}>;
installCodex: () => Promise<{
success: boolean;
message?: string;
error?: string;
}>;
authClaude: () => Promise<{
success: boolean;
token?: string;
@@ -939,12 +855,6 @@ interface SetupAPI {
message?: string;
output?: string;
}>;
authCodex: (apiKey?: string) => Promise<{
success: boolean;
requiresManualAuth?: boolean;
command?: string;
error?: string;
}>;
storeApiKey: (
provider: string,
apiKey: string
@@ -952,12 +862,8 @@ interface SetupAPI {
getApiKeys: () => Promise<{
success: boolean;
hasAnthropicKey: boolean;
hasOpenAIKey: boolean;
hasGoogleKey: boolean;
}>;
configureCodexMcp: (
projectPath: string
) => Promise<{ success: boolean; configPath?: string; error?: string }>;
getPlatform: () => Promise<{
success: boolean;
platform: string;
@@ -991,20 +897,6 @@ function createMockSetupAPI(): SetupAPI {
};
},
getCodexStatus: async () => {
console.log("[Mock] Getting Codex status");
return {
success: true,
status: "not_installed",
auth: {
authenticated: false,
method: "none",
hasAuthFile: false,
hasEnvKey: false,
},
};
},
installClaude: async () => {
console.log("[Mock] Installing Claude CLI");
// Simulate installation delay
@@ -1016,16 +908,6 @@ function createMockSetupAPI(): SetupAPI {
};
},
installCodex: async () => {
console.log("[Mock] Installing Codex CLI");
await new Promise((resolve) => setTimeout(resolve, 1000));
return {
success: false,
error:
"CLI installation is only available in the Electron app. Please run the command manually.",
};
},
authClaude: async () => {
console.log("[Mock] Auth Claude CLI");
return {
@@ -1035,18 +917,6 @@ function createMockSetupAPI(): SetupAPI {
};
},
authCodex: async (apiKey?: string) => {
console.log("[Mock] Auth Codex CLI", { hasApiKey: !!apiKey });
if (apiKey) {
return { success: true };
}
return {
success: true,
requiresManualAuth: true,
command: "codex auth login",
};
},
storeApiKey: async (provider: string, apiKey: string) => {
console.log("[Mock] Storing API key for:", provider);
// In mock mode, we just pretend to store it (it's already in the app store)
@@ -1058,19 +928,10 @@ function createMockSetupAPI(): SetupAPI {
return {
success: true,
hasAnthropicKey: false,
hasOpenAIKey: false,
hasGoogleKey: false,
};
},
configureCodexMcp: async (projectPath: string) => {
console.log("[Mock] Configuring Codex MCP for:", projectPath);
return {
success: true,
configPath: `${projectPath}/.codex/config.toml`,
};
},
getPlatform: async () => {
return {
success: true,

View File

@@ -371,25 +371,6 @@ export class HttpApiClient implements ElectronAPI {
return this.get("/api/setup/claude-status");
}
async checkCodexCli(): Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
hasApiKey?: boolean;
recommendation?: string;
installCommands?: {
macos?: string;
windows?: string;
linux?: string;
npm?: string;
};
error?: string;
}> {
return this.get("/api/setup/codex-status");
}
// Model API
model = {
getAvailable: async (): Promise<{
@@ -408,14 +389,6 @@ export class HttpApiClient implements ElectronAPI {
},
};
async testOpenAIConnection(apiKey?: string): Promise<{
success: boolean;
message?: string;
error?: string;
}> {
return this.post("/api/setup/test-openai", { apiKey });
}
// Setup API
setup = {
getClaudeStatus: (): Promise<{
@@ -440,35 +413,12 @@ export class HttpApiClient implements ElectronAPI {
error?: string;
}> => this.get("/api/setup/claude-status"),
getCodexStatus: (): Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
auth?: {
authenticated: boolean;
method: string;
hasAuthFile: boolean;
hasEnvKey: boolean;
hasStoredApiKey?: boolean;
hasEnvApiKey?: boolean;
};
error?: string;
}> => this.get("/api/setup/codex-status"),
installClaude: (): Promise<{
success: boolean;
message?: string;
error?: string;
}> => this.post("/api/setup/install-claude"),
installCodex: (): Promise<{
success: boolean;
message?: string;
error?: string;
}> => this.post("/api/setup/install-codex"),
authClaude: (): Promise<{
success: boolean;
token?: string;
@@ -480,15 +430,6 @@ export class HttpApiClient implements ElectronAPI {
output?: string;
}> => this.post("/api/setup/auth-claude"),
authCodex: (
apiKey?: string
): Promise<{
success: boolean;
requiresManualAuth?: boolean;
command?: string;
error?: string;
}> => this.post("/api/setup/auth-codex", { apiKey }),
storeApiKey: (
provider: string,
apiKey: string
@@ -500,18 +441,9 @@ export class HttpApiClient implements ElectronAPI {
getApiKeys: (): Promise<{
success: boolean;
hasAnthropicKey: boolean;
hasOpenAIKey: boolean;
hasGoogleKey: boolean;
}> => this.get("/api/setup/api-keys"),
configureCodexMcp: (
projectPath: string
): Promise<{
success: boolean;
configPath?: string;
error?: string;
}> => this.post("/api/setup/configure-codex-mcp", { projectPath }),
getPlatform: (): Promise<{
success: boolean;
platform: string;

View File

@@ -246,20 +246,11 @@ export interface FeatureImagePath {
}
// Available models for feature execution
// Claude models
export type ClaudeModel = "opus" | "sonnet" | "haiku";
// OpenAI/Codex models
export type OpenAIModel =
| "gpt-5.2"
| "gpt-5.1-codex-max"
| "gpt-5.1-codex"
| "gpt-5.1-codex-mini"
| "gpt-5.1";
// Combined model type
export type AgentModel = ClaudeModel | OpenAIModel;
export type AgentModel = ClaudeModel;
// Model provider type
export type ModelProvider = "claude" | "codex";
export type ModelProvider = "claude";
// Thinking level (budget_tokens) options
export type ThinkingLevel = "none" | "low" | "medium" | "high" | "ultrathink";
@@ -659,36 +650,6 @@ const DEFAULT_AI_PROFILES: AIProfile[] = [
isBuiltIn: true,
icon: "Zap",
},
{
id: "profile-gpt52",
name: "GPT-5.2",
description: "GPT-5.2 - Latest OpenAI model for advanced coding tasks.",
model: "gpt-5.2",
thinkingLevel: "none",
provider: "codex",
isBuiltIn: true,
icon: "Sparkles",
},
{
id: "profile-codex-power",
name: "Codex Power",
description: "GPT-5.1 Codex Max for deep coding tasks via OpenAI CLI.",
model: "gpt-5.1-codex-max",
thinkingLevel: "none",
provider: "codex",
isBuiltIn: true,
icon: "Cpu",
},
{
id: "profile-codex-fast",
name: "Codex Fast",
description: "GPT-5.1 Codex Mini for lightweight and quick edits.",
model: "gpt-5.1-codex-mini",
thinkingLevel: "none",
provider: "codex",
isBuiltIn: true,
icon: "Rocket",
},
];
const initialState: AppState = {

View File

@@ -471,24 +471,6 @@ export interface ElectronAPI {
error?: string;
}>;
// Codex CLI Detection API
checkCodexCli: () => Promise<{
success: boolean;
status?: string;
method?: string;
version?: string;
path?: string;
hasApiKey?: boolean;
recommendation?: string;
installCommands?: {
macos?: string;
windows?: string;
linux?: string;
npm?: string;
};
error?: string;
}>;
// Model Management APIs
model: {
// Get all available models from all providers
@@ -641,7 +623,7 @@ export interface ModelDefinition {
id: string;
name: string;
modelString: string;
provider: "claude" | "codex";
provider: "claude";
description?: string;
tier?: "basic" | "standard" | "premium";
default?: boolean;

View File

@@ -2437,16 +2437,7 @@ export async function setupFirstRun(page: Page): Promise<void> {
progress: 0,
output: [],
},
codexCliStatus: null,
codexAuthStatus: null,
codexInstallProgress: {
isInstalling: false,
currentStep: "",
progress: 0,
output: [],
},
skipClaudeSetup: false,
skipCodexSetup: false,
},
version: 0,
};
@@ -2460,7 +2451,7 @@ export async function setupFirstRun(page: Page): Promise<void> {
currentProject: null,
theme: "dark",
sidebarOpen: true,
apiKeys: { anthropic: "", google: "", openai: "" },
apiKeys: { anthropic: "", google: "" },
chatSessions: [],
chatHistoryOpen: false,
maxConcurrency: 3,
@@ -2488,7 +2479,6 @@ export async function setupComplete(page: Page): Promise<void> {
setupComplete: true,
currentStep: "complete",
skipClaudeSetup: false,
skipCodexSetup: false,
},
version: 0,
};
@@ -2530,14 +2520,6 @@ export async function clickClaudeContinue(page: Page): Promise<void> {
await button.click();
}
/**
* Click continue on Codex setup step
*/
export async function clickCodexContinue(page: Page): Promise<void> {
const button = await getByTestId(page, "codex-next-button");
await button.click();
}
/**
* Click finish on setup complete step
*/

View File

@@ -38,13 +38,6 @@ DATA_DIR=./data
# OPTIONAL - Additional AI Providers
# ============================================
# OpenAI API key for GPT/Codex models (gpt-5.2, gpt-5.1-codex, etc.)
# Codex CLI must be installed: npm install -g @openai/codex@latest
OPENAI_API_KEY=
# Optional: Override Codex CLI path (auto-detected by default)
# CODEX_CLI_PATH=/usr/local/bin/codex
# Google API key (for future Gemini support)
GOOGLE_API_KEY=

View File

@@ -24,7 +24,7 @@ export abstract class BaseProvider {
}
/**
* Get the provider name (e.g., "claude", "codex", "cursor")
* Get the provider name (e.g., "claude", "cursor")
*/
abstract getName(): string;

View File

@@ -76,7 +76,7 @@ export class ProviderFactory {
/**
* Get provider by name (for direct access if needed)
*
* @param name Provider name (e.g., "claude", "codex", "cursor")
* @param name Provider name (e.g., "claude", "cursor")
* @returns Provider instance or null if not found
*/
static getProviderByName(name: string): BaseProvider | null {

View File

@@ -1,5 +1,5 @@
/**
* Configuration fixtures for testing Codex config manager
* Configuration fixtures for testing
*/
export const tomlConfigFixture = `
@@ -15,11 +15,3 @@ enabled_tools = ["UpdateFeatureStatus"]
[mcp_servers.automaker-tools.env]
AUTOMAKER_PROJECT_PATH = "/path/to/project"
`;
export const codexAuthJsonFixture = {
token: {
access_token: "test-access-token",
refresh_token: "test-refresh-token",
id_token: "test-id-token",
},
};

View File

@@ -37,26 +37,3 @@ export const claudeProviderMessageFixture: ProviderMessage = {
},
};
export const codexThinkingMessageFixture = {
type: "item.completed",
item: {
type: "reasoning",
text: "I need to analyze the problem first...",
},
};
export const codexCommandExecutionFixture = {
type: "item.completed",
item: {
type: "command_execution",
command: "ls -la",
aggregated_output: "total 12\ndrwxr-xr-x 3 user user 4096 Dec 13",
},
};
export const codexErrorFixture = {
type: "error",
data: {
message: "Authentication failed",
},
};