feat: implement tweaks plan - modals, smart shell, spinner, /models, debug log, skills

Phase 1: Permission modal dialog, session resume modal, HistoryInput with
up/down arrow cycling, remove "You:" echo from chat log, LLM client cleanup
on unmount.

Phase 2: Smart shell auto-approve using allowed/denied command lists from
ToolsConfig, animated thinking spinner with live token count in status bar.

Phase 3: /models slash command (list + switch), CLI directory positional
argument, JSONL debug logger with rotation.

Phase 4: Skills system with SkillsManager, load_skill LLM tool, /skills
listing, skill invocation via slash commands, system prompt integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 15:46:44 -05:00
parent 7600195ecf
commit 3f9012e6c2
13 changed files with 683 additions and 37 deletions

View File

@@ -1,12 +1,17 @@
"""Tool registration and schema export."""
from __future__ import annotations
import logging
from pathlib import Path
from typing import Any
from typing import TYPE_CHECKING, Any
from app.models.config import AppConfig
from app.tools.base import BaseTool
if TYPE_CHECKING:
from app.services.skills import SkillsManager
logger = logging.getLogger(__name__)
@@ -36,7 +41,11 @@ class ToolRegistry:
return [tool.get_openai_schema() for tool in self._tools.values()]
def create_default_registry(workspace_root: Path, config: AppConfig) -> ToolRegistry:
def create_default_registry(
workspace_root: Path,
config: AppConfig,
skills_manager: SkillsManager | None = None,
) -> ToolRegistry:
"""Create a ToolRegistry populated with all built-in tools."""
# Read tools
from app.tools.filesystem import ListDirTool, ReadFileTool
@@ -81,4 +90,10 @@ def create_default_registry(workspace_root: Path, config: AppConfig) -> ToolRegi
# Control flow
registry.register(FinishTool(workspace_root, config))
# Skills (conditional)
if skills_manager is not None:
from app.tools.skills import LoadSkillTool
registry.register(LoadSkillTool(workspace_root, config, skills_manager))
return registry