feat: add "Create Spec" button and fix Windows asyncio subprocess

UI Changes:
- Add "Create Spec with AI" button in empty kanban when project has no spec
- Button opens SpecCreationChat to guide users through spec creation
- Shows in Pending column when has_spec=false and no features exist

Windows Fixes:
- Fix asyncio subprocess NotImplementedError on Windows
- Set WindowsProactorEventLoopPolicy in server/__init__.py
- Remove --reload from uvicorn (incompatible with Windows subprocess)
- Add process cleanup on startup in start_ui.bat

Spec Chat Improvements:
- Enable full tool access (remove allowed_tools restriction)
- Add "user" to setting_sources for global skills access
- Use bypassPermissions mode for auto-approval
- Add WebFetch/WebSearch auto-approve hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
mmereu
2026-01-19 21:53:09 +01:00
parent 5f786078fa
commit 245cc5b7ad
10 changed files with 116 additions and 19 deletions

View File

@@ -6,3 +6,12 @@ Web UI server for the Autonomous Coding Agent.
Provides REST API and WebSocket endpoints for project management,
feature tracking, and agent control.
"""
# Fix Windows asyncio subprocess support - MUST be before any other imports
# that might create an event loop
import sys
if sys.platform == "win32":
import asyncio
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())

View File

@@ -6,11 +6,17 @@ Main entry point for the Autonomous Coding UI server.
Provides REST API, WebSocket, and static file serving.
"""
import asyncio
import os
import shutil
import sys
from contextlib import asynccontextmanager
from pathlib import Path
# Fix for Windows subprocess support in asyncio
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
from dotenv import load_dotenv
# Load environment variables from .env file if present

View File

@@ -179,15 +179,10 @@ class SpecChatSession:
model=model,
cli_path=system_cli,
# System prompt loaded from CLAUDE.md via setting_sources
# This avoids Windows command line length limit (~8191 chars)
setting_sources=["project"],
allowed_tools=[
"Read",
"Write",
"Edit",
"Glob",
],
permission_mode="acceptEdits", # Auto-approve file writes for spec creation
# Include "user" for global skills and subagents from ~/.claude/
setting_sources=["project", "user"],
# No allowed_tools restriction - full access to all tools, skills, subagents
permission_mode="bypassPermissions", # Auto-approve all tools
max_turns=100,
cwd=str(self.project_dir.resolve()),
settings=str(settings_file.resolve()),