feat(skills): explain nanobot usage from bundled documentation (#6176)
* feat(skills): add nanobot documentation guide with bundled docs * docs: prefer graphical setup and align bundled guides with runtime * docs: lead provider setup with built-in endpoint defaults * fix: preserve documentation packaging and lookup across install paths * fix(skills): narrow documentation loading to relevant sections * refactor(skills): keep documentation guidance concise * fix(docs): complete first-use workflows and clarify runtime boundaries * style(docs): remove manual paragraph wrapping * docs: guide first-run users to conversational setup help * docs: fold README installation alternatives and details * docs: separate README alert marker from its body * docs: clarify README onboarding and runtime boundaries
This commit is contained in:
1 parent
23941355a8
commit
cd2a863710
61 files changed
+1729
-634
No files matched your search
+13
-2
@@ -20,6 +20,11 @@ The source app is built with Vite + React 18 + TypeScript + Tailwind 3 + shadcn/
|
||||
```text
|
||||
webui/ source tree (this directory)
|
||||
nanobot/web/dist/ build output served by the gateway
|
||||
webui/src/components/settings/ model, capability, and system settings
|
||||
webui/src/lib/ transport, API clients, and shared types
|
||||
webui/src/tests/ frontend test setup and integration tests
|
||||
nanobot/channels/*/webui/ channel-owned interface code
|
||||
nanobot/channels/*/tests/webui/ channel interface tests
|
||||
```
|
||||
|
||||
## Develop the WebUI (Vite HMR)
|
||||
@@ -42,7 +47,7 @@ From the repository root:
|
||||
nanobot webui --dev
|
||||
```
|
||||
|
||||
The command safely prepares the local WebSocket channel, starts both the gateway and Vite, and opens `http://127.0.0.1:5173`. Vite proxies to the configured WebSocket channel and applies frontend changes with HMR. Press Ctrl+C in that terminal to stop both processes.
|
||||
The command safely prepares the local WebSocket channel, starts both the gateway and Vite, and opens `http://127.0.0.1:5173`. Vite proxies HTTP requests to the gateway and applies frontend changes with HMR; the application WebSocket connects directly to the gateway. Ctrl+C stops Vite and releases this gateway client. An on-demand gateway stops when its last interactive client exits; a persistent gateway keeps running.
|
||||
|
||||
Use `--no-open` to skip opening a browser. `--dev` is foreground-only and cannot be combined with `--background`.
|
||||
|
||||
@@ -78,7 +83,7 @@ bun run dev
|
||||
|
||||
Then open `http://127.0.0.1:5173`.
|
||||
|
||||
By default the dev server proxies `/api`, `/webui`, `/auth`, and WebSocket traffic to `http://127.0.0.1:8765`.
|
||||
By default Vite proxies the HTTP paths `/api`, `/webui`, and `/auth` to `http://127.0.0.1:8765`. The application WebSocket connects directly to the URL returned by the gateway bootstrap response (`ws_url`); Vite does not proxy that connection.
|
||||
|
||||
If your gateway listens on a non-default port, point the dev server at it:
|
||||
|
||||
@@ -86,6 +91,8 @@ If your gateway listens on a non-default port, point the dev server at it:
|
||||
NANOBOT_API_URL=http://127.0.0.1:9000 bun run dev
|
||||
```
|
||||
|
||||
This variable sets the HTTP target. Check the bootstrap response's `ws_url` when HTTP works but chat cannot connect: that address must be reachable by the browser. For a reverse proxy, configure the gateway's `channels.websocket.publicWsUrl` as described in [WebSocket deployment](../docs/websocket.md), rather than adding a Vite WebSocket proxy. If authentication is enabled, use the launcher's full login link or sign in with the configured bootstrap secret.
|
||||
|
||||
## Build for packaged runtime
|
||||
|
||||
You usually do not need to run this by hand: `python -m build` invokes the WebUI build automatically when packaging the wheel.
|
||||
@@ -103,9 +110,13 @@ The gateway picks up the new bundle on the next restart.
|
||||
|
||||
```bash
|
||||
cd webui
|
||||
bun run lint
|
||||
bun run test
|
||||
bun run build
|
||||
```
|
||||
|
||||
`lint` runs ESLint; `test` runs Vitest, including channel-owned frontend tests; `build` runs TypeScript checking and produces the production bundle. Keep tests near the changed behavior and exercise settings save/reload in the browser. Browser-only preferences stay in the frontend; persistent configuration and security policy belong to the Python gateway. When changing that boundary, also run the relevant Python tests from [CONTRIBUTING.md](../CONTRIBUTING.md).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
- [`agent-chat-ui`](https://github.com/langchain-ai/agent-chat-ui) for UI and interaction inspiration across the chat surface.
|
||||
Reference in new issue
Block a user