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
max_turns=100,
cwd=str(ROOT_DIR.resolve()),
cwd=str(self.project_dir.resolve()),
)
)
# Enter the async context and track it
@@ -282,7 +282,7 @@ class SpecChatSession:
# Check app_spec.txt
if pending_writes["app_spec"] and tool_use_id == pending_writes["app_spec"].get("tool_id"):
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():
logger.info(f"app_spec.txt verified at: {full_path}")
files_written["app_spec"] = True
@@ -300,7 +300,7 @@ class SpecChatSession:
# Check initializer_prompt.md
if pending_writes["initializer"] and tool_use_id == pending_writes["initializer"].get("tool_id"):
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():
logger.info(f"initializer_prompt.md verified at: {full_path}")
files_written["initializer"] = True

View File

@@ -28,8 +28,14 @@ import time
import webbrowser
from pathlib import Path
from dotenv import load_dotenv
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"
UI_DIR = ROOT / "ui"

View File

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