Skip to content

Lightpanda: the headless browser designed for AI and automation

agent: update REPL docs for ghost hints and model command

Adrià Arrufat4d2ebb8d368a
diff --git a/docs/agent-tutorial.md b/docs/agent-tutorial.md
index e88f2ba6f..b5f0ba1b1 100644
--- a/docs/agent-tutorial.md
+++ b/docs/agent-tutorial.md
@@ -38,9 +38,9 @@ username:
./lightpanda agent
```
-The status bar under the prompt shows the resolved model and whether
-natural language is available. REPL history lives in `.lp-history` in
-the working directory.
+The startup banner shows whether natural language is available;
+`/model` prints the resolved model. REPL history lives in `.lp-history`
+in the working directory.
```
> /help # list every browser tool
diff --git a/docs/agent.md b/docs/agent.md
index 917680928..c6147bc49 100644
--- a/docs/agent.md
+++ b/docs/agent.md
@@ -234,19 +234,23 @@ a completely clean browser (no cookies, no current page, no storage).
## REPL features
-- **Status bar.** A line under the prompt shows the active model and quick
- hints. In `--no-llm` it reads "basic REPL — slash commands only." It drops
- the least-important segments first when the terminal is narrow.
+- **Ghost hints.** There's no separate status line; guidance renders as dim
+ ghost text after the cursor and disappears as you type over it. It
+ previews the rest of the first matching command name, the argument shape
+ of the tool you're typing (`/evaluate ` shows
+ `<script> [url=…] [timeout=…] [save=…]`), and contextual nudges like
+ "press Ctrl-D again to exit".
- **JS mode (`!`).** Type `!` on an empty prompt to toggle a scratchpad
where the whole line runs as page-side JavaScript, same context as
- `/evaluate` so `document` and `window` are in scope. Handy for poking at
+ `/evaluate` so `document` and `window` are in scope. The prompt switches
+ to `!` with a "JS mode - esc to exit" ghost hint. Handy for poking at
a page without wrapping every line in `/evaluate`:
```
❯ !
- ! ❯ document.title
+ ! document.title
"Hacker News"
- ! ❯ document.querySelectorAll('tr.athing').length
+ ! document.querySelectorAll('tr.athing').length
30
```