|
56 | 56 | | 🆕 | **Tokenizer-Aware Context** | Cached tokenizer backends with heuristic fallback for `/context`, `/status`, and compaction | |
57 | 57 | | 🆕 | **Prompt Budget Preflight** | Preflight prompt-length validation, token-budget reporting, and auto-compact/context collapse before backend failures | |
58 | 58 | | 🆕 | **LSP Runtime** | Local LSP-style code intelligence for definitions, references, hover, symbols, call hierarchy, and diagnostics | |
| 59 | +| 🆕 | **Local Web GUI** | Browser-based chat UI via `python -m src.gui` — modern dark theme, slash command palette, session browser, settings panel | |
59 | 60 | | 🆕 | **Daemon Commands** | Local `daemon start/ps/logs/attach/kill` wrapper over background agent sessions | |
60 | 61 | | 🆕 | **Background Sessions** | Local `agent-bg`, `agent-ps`, `agent-logs`, `agent-attach`, and `agent-kill` flows | |
61 | 62 | | 🆕 | **Testing Guide** | Comprehensive [TESTING_GUIDE.md](TESTING_GUIDE.md) with commands for every feature | |
@@ -85,6 +86,7 @@ Built on the public porting workspace from [instructkr/claw-code](https://github |
85 | 86 | |---------|-------------| |
86 | 87 | | 🤖 **Agent Loop** | Full agentic coding loop with tool calling and iterative reasoning | |
87 | 88 | | 💬 **Interactive Chat** | Multi-turn REPL via `agent-chat` with session continuity | |
| 89 | +| 🖥️ **Local Web GUI** | Browser-based chat UI launched with `python -m src.gui` — sessions browser, slash command palette, live settings | |
88 | 90 | | 🧰 **Core Tools** | File read / write / edit, glob search, grep search, shell execution | |
89 | 91 | | 🔌 **Plugin Runtime** | Manifest-based plugins with hooks, aliases, virtual tools, and tool blocking | |
90 | 92 | | 🪆 **Nested Delegation** | Delegate subtasks to child agents with dependency-aware topological batching | |
@@ -169,6 +171,7 @@ Built on the public porting workspace from [instructkr/claw-code](https://github |
169 | 171 | - [x] Local workflow runtime with workflow list/get/run tools and CLI/slash flows |
170 | 172 | - [x] Local remote trigger runtime with create/update/run flows and CLI/slash inspection |
171 | 173 | - [x] Local managed git worktree runtime with live cwd switching and worktree CLI/slash flows |
| 174 | +- [x] Local web GUI (FastAPI + vanilla JS SPA) with chat, sessions browser, slash command palette, and live settings (`python -m src.gui`) |
172 | 175 | - [x] Tokenizer-aware context accounting with cached tokenizer backends and heuristic fallback |
173 | 176 | - [x] Plugin runtime: manifest discovery, hooks, aliases, virtual tools, tool blocking |
174 | 177 | - [x] Plugin lifecycle hooks: resume, persist, delegate phases |
@@ -245,7 +248,11 @@ claw-code/ |
245 | 248 | │ ├── commands.py # Mirrored command inventory |
246 | 249 | │ ├── tools.py # Mirrored tool inventory |
247 | 250 | │ ├── runtime.py # Mirrored runtime facade |
248 | | -│ └── reference_data/ # Mirrored inventory snapshots |
| 251 | +│ ├── reference_data/ # Mirrored inventory snapshots |
| 252 | +│ └── gui/ # Local web GUI (FastAPI + vanilla JS SPA) |
| 253 | +│ ├── __main__.py # `python -m src.gui` entry point |
| 254 | +│ ├── server.py # FastAPI app and JSON endpoints |
| 255 | +│ └── static/ # index.html, app.css, app.js |
249 | 256 | └── tests/ # Unit tests |
250 | 257 | ├── test_agent_runtime.py |
251 | 258 | ├── test_agent_context.py |
@@ -712,6 +719,41 @@ Features: |
712 | 719 |
|
713 | 720 | --- |
714 | 721 |
|
| 722 | +## 🖥️ Local Web GUI |
| 723 | + |
| 724 | +If the terminal isn't your thing, launch the bundled browser GUI: |
| 725 | + |
| 726 | +```bash |
| 727 | +python3 -m src.gui --cwd . --allow-write --allow-shell |
| 728 | +``` |
| 729 | + |
| 730 | +Your default browser opens to `http://127.0.0.1:8765` with a modern dark-themed chat UI. |
| 731 | + |
| 732 | +| Flag | Description | |
| 733 | +|------|-------------| |
| 734 | +| `--host <addr>` | Bind address (default `127.0.0.1`) | |
| 735 | +| `--port <n>` | Port to listen on (default `8765`) | |
| 736 | +| `--cwd <path>` | Workspace directory the agent operates in | |
| 737 | +| `--model <name>` | Override the model name | |
| 738 | +| `--base-url <url>` | Override the OpenAI-compatible API base URL | |
| 739 | +| `--api-key <key>` | API key for the model server | |
| 740 | +| `--session-dir <path>` | Where saved sessions live | |
| 741 | +| `--allow-write` | Allow file write/edit tools | |
| 742 | +| `--allow-shell` | Allow shell execution | |
| 743 | +| `--no-browser` | Don't auto-open a browser tab | |
| 744 | + |
| 745 | +The GUI surfaces: |
| 746 | + |
| 747 | +- multi-turn chat with tool-call cards (collapsible JSON args + results) |
| 748 | +- saved sessions sidebar with one-click resume |
| 749 | +- slash command and skill pickers (`/` and `★` buttons, or `Cmd/Ctrl+K`) |
| 750 | +- live settings panel (model, base URL, working dir, permissions) |
| 751 | +- usage / cost meta in the composer footer |
| 752 | + |
| 753 | +> **Note:** The GUI uses [FastAPI](https://fastapi.tiangolo.com/) and [Uvicorn](https://www.uvicorn.org/) under the hood. These get installed automatically if you install the package via `pip install -e .`. The core Python agent runtime itself remains dependency-free. |
| 754 | +
|
| 755 | +--- |
| 756 | + |
715 | 757 | ## 🔄 Session Persistence |
716 | 758 |
|
717 | 759 | Each `agent` run automatically saves a resumable session: |
|
0 commit comments