mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
- Refactor model handling to support both Claude and Cursor models across various components. - Introduce `stripProviderPrefix` utility for consistent model ID processing. - Update `CursorProvider` to utilize `isCursorModel` for model validation. - Implement model override functionality in GitHub issue validation and enhancement routes. - Add `useCursorStatusInit` hook to initialize Cursor CLI status on app startup. - Update UI components to reflect changes in model selection and validation processes. This update improves the flexibility of AI model usage and enhances user experience by allowing quick model overrides.
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { useState, useCallback } from 'react';
|
|
import { RouterProvider } from '@tanstack/react-router';
|
|
import { router } from './utils/router';
|
|
import { SplashScreen } from './components/splash-screen';
|
|
import { useSettingsMigration } from './hooks/use-settings-migration';
|
|
import { useCursorStatusInit } from './hooks/use-cursor-status-init';
|
|
import './styles/global.css';
|
|
import './styles/theme-imports';
|
|
|
|
export default function App() {
|
|
const [showSplash, setShowSplash] = useState(() => {
|
|
// Only show splash once per session
|
|
if (sessionStorage.getItem('automaker-splash-shown')) {
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
|
|
// Run settings migration on startup (localStorage -> file storage)
|
|
const migrationState = useSettingsMigration();
|
|
if (migrationState.migrated) {
|
|
console.log('[App] Settings migrated to file storage');
|
|
}
|
|
|
|
// Initialize Cursor CLI status at startup
|
|
useCursorStatusInit();
|
|
|
|
const handleSplashComplete = useCallback(() => {
|
|
sessionStorage.setItem('automaker-splash-shown', 'true');
|
|
setShowSplash(false);
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
<RouterProvider router={router} />
|
|
{showSplash && <SplashScreen onComplete={handleSplashComplete} />}
|
|
</>
|
|
);
|
|
}
|