mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
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:
@@ -15,7 +15,7 @@ from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient
|
||||
from claude_agent_sdk.types import HookMatcher
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from security import bash_security_hook
|
||||
from security import bash_security_hook, web_tools_auto_approve_hook
|
||||
|
||||
# Load environment variables from .env file if present
|
||||
load_dotenv()
|
||||
@@ -180,7 +180,7 @@ def create_client(
|
||||
security_settings = {
|
||||
"sandbox": {"enabled": True, "autoAllowBashIfSandboxed": True},
|
||||
"permissions": {
|
||||
"defaultMode": "acceptEdits", # Auto-approve edits within allowed directories
|
||||
"defaultMode": "bypassPermissions", # Auto-approve all tools
|
||||
"allow": permissions_list,
|
||||
},
|
||||
}
|
||||
@@ -272,6 +272,7 @@ def create_client(
|
||||
hooks={
|
||||
"PreToolUse": [
|
||||
HookMatcher(matcher="Bash", hooks=[bash_security_hook]),
|
||||
HookMatcher(matcher="WebFetch|WebSearch", hooks=[web_tools_auto_approve_hook]),
|
||||
],
|
||||
},
|
||||
max_turns=1000,
|
||||
|
||||
Reference in New Issue
Block a user