mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-02 15:23:37 +00:00
Adds the ability to add multiple features to an existing project through a natural language conversation with Claude, similar to how initial spec creation works. Features: - New "Expand" button in header (keyboard shortcut: E) - Full-screen chat interface for describing new features - Claude reads existing app_spec.txt for context - Features created directly in database after user approval - Bulk feature creation endpoint for batch operations New files: - .claude/commands/expand-project.md - Claude skill for expansion - server/services/expand_chat_session.py - Chat session service - server/routers/expand_project.py - WebSocket endpoint - ui/src/components/ExpandProjectChat.tsx - Chat UI - ui/src/components/ExpandProjectModal.tsx - Modal wrapper - ui/src/hooks/useExpandChat.ts - WebSocket hook Modified: - Added POST /bulk endpoint to features router - Added FeatureBulkCreate schemas - Integrated Expand button and modal in App.tsx Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
904 B
TypeScript
42 lines
904 B
TypeScript
/**
|
|
* Expand Project Modal
|
|
*
|
|
* Full-screen modal wrapper for the ExpandProjectChat component.
|
|
* Allows users to add multiple features to an existing project via AI.
|
|
*/
|
|
|
|
import { ExpandProjectChat } from './ExpandProjectChat'
|
|
|
|
interface ExpandProjectModalProps {
|
|
isOpen: boolean
|
|
projectName: string
|
|
onClose: () => void
|
|
onFeaturesAdded: () => void // Called to refresh feature list
|
|
}
|
|
|
|
export function ExpandProjectModal({
|
|
isOpen,
|
|
projectName,
|
|
onClose,
|
|
onFeaturesAdded,
|
|
}: ExpandProjectModalProps) {
|
|
if (!isOpen) return null
|
|
|
|
const handleComplete = (featuresAdded: number) => {
|
|
if (featuresAdded > 0) {
|
|
onFeaturesAdded()
|
|
}
|
|
onClose()
|
|
}
|
|
|
|
return (
|
|
<div className="fixed inset-0 z-50 bg-[var(--color-neo-bg)]">
|
|
<ExpandProjectChat
|
|
projectName={projectName}
|
|
onComplete={handleComplete}
|
|
onCancel={onClose}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|