feat: add GPT-5.2 model support and refresh profiles functionality

- Introduced the GPT-5.2 model with advanced coding capabilities across various components.
- Added a new button in ProfilesView to refresh default profiles, enhancing user experience.
- Updated CodexSetupStep to clarify authentication requirements and added commands for verifying login status.
- Enhanced utility functions to recognize the new GPT-5.2 model in the application.
This commit is contained in:
Kacper
2025-12-13 01:36:15 +01:00
parent 9cf5fff0ad
commit 55603cb5c7
8 changed files with 170 additions and 51 deletions

View File

@@ -203,6 +203,7 @@ export interface FeatureImagePath {
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"
@@ -445,6 +446,7 @@ export interface AppActions {
updateAIProfile: (id: string, updates: Partial<AIProfile>) => void;
removeAIProfile: (id: string) => void;
reorderAIProfiles: (oldIndex: number, newIndex: number) => void;
resetAIProfiles: () => void;
// Project Analysis actions
setProjectAnalysis: (analysis: ProjectAnalysis | null) => void;
@@ -491,6 +493,16 @@ 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",
@@ -1106,6 +1118,14 @@ export const useAppStore = create<AppState & AppActions>()(
set({ aiProfiles: profiles });
},
resetAIProfiles: () => {
// Merge: keep user-created profiles, but refresh all built-in profiles to latest defaults
const currentProfiles = get().aiProfiles;
const userProfiles = currentProfiles.filter((p) => !p.isBuiltIn);
const mergedProfiles = [...DEFAULT_AI_PROFILES, ...userProfiles];
set({ aiProfiles: mergedProfiles });
},
// Project Analysis actions
setProjectAnalysis: (analysis) => set({ projectAnalysis: analysis }),
setIsAnalyzing: (analyzing) => set({ isAnalyzing: analyzing }),