mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
fix: resolve type errors after merging upstream v0.12.0rc
- Fix ThemeMode type casting in __root.tsx - Use specRegeneration.create() instead of non-existent generateAppSpec - Add missing keyboard shortcut entries for projectSettings and notifications - Fix lucide-react type casts with intermediate unknown cast - Remove unused pipelineConfig prop from ListRow component - Align SettingsProject interface with Project type - Fix defaultDeleteBranchWithWorktree property name
This commit is contained in:
@@ -448,7 +448,9 @@ export function IconPicker({ selectedIcon, onSelectIcon }: IconPickerProps) {
|
||||
);
|
||||
|
||||
const getIconComponent = (iconName: string) => {
|
||||
return (LucideIcons as Record<string, React.ComponentType<{ className?: string }>>)[iconName];
|
||||
return (LucideIcons as unknown as Record<string, React.ComponentType<{ className?: string }>>)[
|
||||
iconName
|
||||
];
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -29,7 +29,7 @@ export function ProjectSwitcherItem({
|
||||
// Get the icon component from lucide-react
|
||||
const getIconComponent = (): LucideIcon => {
|
||||
if (project.icon && project.icon in LucideIcons) {
|
||||
return (LucideIcons as Record<string, LucideIcon>)[project.icon];
|
||||
return (LucideIcons as unknown as Record<string, LucideIcon>)[project.icon];
|
||||
}
|
||||
return Folder;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@ import { getElectronAPI } from '@/lib/electron';
|
||||
import { initializeProject, hasAppSpec, hasAutomakerDir } from '@/lib/project-init';
|
||||
import { toast } from 'sonner';
|
||||
import { CreateSpecDialog } from '@/components/views/spec-view/dialogs';
|
||||
import type { FeatureCount } from '@/components/views/spec-view/types';
|
||||
|
||||
function getOSAbbreviation(os: string): string {
|
||||
switch (os) {
|
||||
@@ -57,7 +58,7 @@ export function ProjectSwitcher() {
|
||||
const [projectOverview, setProjectOverview] = useState('');
|
||||
const [generateFeatures, setGenerateFeatures] = useState(true);
|
||||
const [analyzeProject, setAnalyzeProject] = useState(true);
|
||||
const [featureCount, setFeatureCount] = useState(5);
|
||||
const [featureCount, setFeatureCount] = useState<FeatureCount>(50);
|
||||
|
||||
// Derive isCreatingSpec from store state
|
||||
const isCreatingSpec = specCreatingForProject !== null;
|
||||
@@ -208,13 +209,18 @@ export function ProjectSwitcher() {
|
||||
|
||||
try {
|
||||
const api = getElectronAPI();
|
||||
await api.generateAppSpec({
|
||||
projectPath: setupProjectPath,
|
||||
if (!api.specRegeneration) {
|
||||
toast.error('Spec regeneration not available');
|
||||
setSpecCreatingForProject(null);
|
||||
return;
|
||||
}
|
||||
await api.specRegeneration.create(
|
||||
setupProjectPath,
|
||||
projectOverview,
|
||||
generateFeatures,
|
||||
analyzeProject,
|
||||
featureCount,
|
||||
});
|
||||
featureCount
|
||||
);
|
||||
} catch (error) {
|
||||
console.error('Failed to generate spec:', error);
|
||||
toast.error('Failed to generate spec', {
|
||||
|
||||
@@ -27,7 +27,7 @@ export function SidebarHeader({
|
||||
// Get the icon component from lucide-react
|
||||
const getIconComponent = (): LucideIcon => {
|
||||
if (currentProject?.icon && currentProject.icon in LucideIcons) {
|
||||
return (LucideIcons as Record<string, LucideIcon>)[currentProject.icon];
|
||||
return (LucideIcons as unknown as Record<string, LucideIcon>)[currentProject.icon];
|
||||
}
|
||||
return Folder;
|
||||
};
|
||||
@@ -125,7 +125,7 @@ export function SidebarHeader({
|
||||
{projects.map((project) => {
|
||||
const ProjectIcon =
|
||||
project.icon && project.icon in LucideIcons
|
||||
? (LucideIcons as Record<string, LucideIcon>)[project.icon]
|
||||
? (LucideIcons as unknown as Record<string, LucideIcon>)[project.icon]
|
||||
: Folder;
|
||||
const isActive = currentProject?.id === project.id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user