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:
@@ -60,6 +60,25 @@ class LLMClient:
|
||||
timeout=httpx.Timeout(config.timeout, connect=10.0),
|
||||
)
|
||||
|
||||
async def list_models(self) -> list[dict[str, str]]:
|
||||
"""Query Ollama /api/tags for available models.
|
||||
|
||||
Returns:
|
||||
List of dicts with 'name' and 'size' keys.
|
||||
|
||||
Raises:
|
||||
LLMConnectionError: If the endpoint is unreachable.
|
||||
"""
|
||||
try:
|
||||
response = await self._client.get("/api/tags")
|
||||
data = response.json()
|
||||
return [
|
||||
{"name": m.get("name", ""), "size": str(m.get("size", ""))}
|
||||
for m in data.get("models", [])
|
||||
]
|
||||
except (httpx.HTTPError, httpx.TimeoutException) as e:
|
||||
raise LLMConnectionError(f"Failed to list models: {e}") from e
|
||||
|
||||
async def preflight_check(self) -> None:
|
||||
"""Verify the endpoint is reachable and the configured model is available.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user