add features

This commit is contained in:
Auto
2025-12-31 12:35:34 +02:00
parent 6c99e40408
commit e7fc23a67e
3 changed files with 39 additions and 16 deletions

View File

@@ -110,7 +110,7 @@ class SpecChatSession:
], ],
permission_mode="acceptEdits", # Auto-approve file writes for spec creation permission_mode="acceptEdits", # Auto-approve file writes for spec creation
max_turns=100, max_turns=100,
cwd=str(ROOT_DIR.resolve()), cwd=str(self.project_dir.resolve()),
) )
) )
# Enter the async context and track it # Enter the async context and track it
@@ -282,7 +282,7 @@ class SpecChatSession:
# Check app_spec.txt # Check app_spec.txt
if pending_writes["app_spec"] and tool_use_id == pending_writes["app_spec"].get("tool_id"): if pending_writes["app_spec"] and tool_use_id == pending_writes["app_spec"].get("tool_id"):
file_path = pending_writes["app_spec"]["path"] file_path = pending_writes["app_spec"]["path"]
full_path = ROOT_DIR / file_path full_path = Path(file_path) if Path(file_path).is_absolute() else self.project_dir / file_path
if full_path.exists(): if full_path.exists():
logger.info(f"app_spec.txt verified at: {full_path}") logger.info(f"app_spec.txt verified at: {full_path}")
files_written["app_spec"] = True files_written["app_spec"] = True
@@ -300,7 +300,7 @@ class SpecChatSession:
# Check initializer_prompt.md # Check initializer_prompt.md
if pending_writes["initializer"] and tool_use_id == pending_writes["initializer"].get("tool_id"): if pending_writes["initializer"] and tool_use_id == pending_writes["initializer"].get("tool_id"):
file_path = pending_writes["initializer"]["path"] file_path = pending_writes["initializer"]["path"]
full_path = ROOT_DIR / file_path full_path = Path(file_path) if Path(file_path).is_absolute() else self.project_dir / file_path
if full_path.exists(): if full_path.exists():
logger.info(f"initializer_prompt.md verified at: {full_path}") logger.info(f"initializer_prompt.md verified at: {full_path}")
files_written["initializer"] = True files_written["initializer"] = True

View File

@@ -28,8 +28,14 @@ import time
import webbrowser import webbrowser
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv
ROOT = Path(__file__).parent.absolute() ROOT = Path(__file__).parent.absolute()
# Load environment variables from .env file
# This ensures env vars like PROGRESS_N8N_WEBHOOK_URL are available to subprocesses
load_dotenv(ROOT / ".env")
VENV_DIR = ROOT / "venv" VENV_DIR = ROOT / "venv"
UI_DIR = ROOT / "ui" UI_DIR = ROOT / "ui"

View File

@@ -17,6 +17,7 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) {
const [category, setCategory] = useState('') const [category, setCategory] = useState('')
const [name, setName] = useState('') const [name, setName] = useState('')
const [description, setDescription] = useState('') const [description, setDescription] = useState('')
const [priority, setPriority] = useState('')
const [steps, setSteps] = useState<Step[]>([{ id: `${formId}-step-0`, value: '' }]) const [steps, setSteps] = useState<Step[]>([{ id: `${formId}-step-0`, value: '' }])
const [error, setError] = useState<string | null>(null) const [error, setError] = useState<string | null>(null)
const [stepCounter, setStepCounter] = useState(1) const [stepCounter, setStepCounter] = useState(1)
@@ -53,6 +54,7 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) {
name: name.trim(), name: name.trim(),
description: description.trim(), description: description.trim(),
steps: filteredSteps, steps: filteredSteps,
priority: priority ? parseInt(priority, 10) : undefined,
}) })
onClose() onClose()
} catch (err) { } catch (err) {
@@ -98,19 +100,34 @@ export function AddFeatureForm({ projectName, onClose }: AddFeatureFormProps) {
</div> </div>
)} )}
{/* Category */} {/* Category & Priority Row */}
<div> <div className="flex gap-4">
<label className="block font-display font-bold mb-2 uppercase text-sm"> <div className="flex-1">
Category <label className="block font-display font-bold mb-2 uppercase text-sm">
</label> Category
<input </label>
type="text" <input
value={category} type="text"
onChange={(e) => setCategory(e.target.value)} value={category}
placeholder="e.g., Authentication, UI, API" onChange={(e) => setCategory(e.target.value)}
className="neo-input" placeholder="e.g., Authentication, UI, API"
required className="neo-input"
/> required
/>
</div>
<div className="w-32">
<label className="block font-display font-bold mb-2 uppercase text-sm">
Priority
</label>
<input
type="number"
value={priority}
onChange={(e) => setPriority(e.target.value)}
placeholder="Auto"
min="1"
className="neo-input"
/>
</div>
</div> </div>
{/* Name */} {/* Name */}