Skip to content

Commit 151ba71

Browse files
chore(sync): mirror docs from openclaw/openclaw@3179692
1 parent 861d0cf commit 151ba71

7 files changed

Lines changed: 74 additions & 10 deletions

File tree

.openclaw-sync/source.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"repository": "openclaw/openclaw",
3-
"sha": "9e68fb1178925e831923240d64bf7fa68b2847e5",
3+
"sha": "3179692f0e44e69dc97036731b53e3cbe0cd3707",
44
"sources": {
55
"openclaw": {
66
"repository": "openclaw/openclaw",
7-
"sha": "9e68fb1178925e831923240d64bf7fa68b2847e5"
7+
"sha": "3179692f0e44e69dc97036731b53e3cbe0cd3707"
88
},
99
"clawhub": {
1010
"repository": "openclaw/clawhub",
11-
"sha": "14a4c471af187e99bc89779b4ddc54608f6ffadd"
11+
"sha": "01bc23c0c725a4cac6ac491441fc2cfd3c7770bb"
1212
}
1313
},
14-
"syncedAt": "2026-06-24T11:31:58.863Z"
14+
"syncedAt": "2026-06-24T14:14:38.235Z"
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
9246475f5771612a5fd12de38b153783c4a4cbb8b2682a5c40115916661c90f2 config-baseline.json
2-
6349131baaa1828f2a071f42e4d7b17c8966c59b6588c8a4c1a32ea5ea4dcd5e config-baseline.core.json
1+
f5a5855ddd7aa8c23a732f257eceaa20fd163b1d5f342c909f4aef15aa8643cf config-baseline.json
2+
b8dffdb1a328aaf728a0707ab04d21c65f1a225a2360042e10832aa608699716 config-baseline.core.json
33
671979e86e4c4f59415d0a20879e838f9bbd883b3d29eeb02cb5131db8d187fe config-baseline.channel.json
44
94529978588d6e3776a86780b22cf9ff46a6f9957f2f178d3829403fad451ca7 config-baseline.plugin.json

docs/clawhub/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ clawhub scan download @scope/demo --version 2.0.0 --kind plugin --output report.
269269
#### GitHub Actions
270270

271271
ClawHub ships an official reusable workflow at
272-
[`/.github/workflows/skill-publish.yml`](https://github.com/openclaw/clawhub/blob/14a4c471af187e99bc89779b4ddc54608f6ffadd/.github/workflows/skill-publish.yml)
272+
[`/.github/workflows/skill-publish.yml`](https://github.com/openclaw/clawhub/blob/01bc23c0c725a4cac6ac491441fc2cfd3c7770bb/.github/workflows/skill-publish.yml)
273273
for skill repos and catalog repos.
274274

275275
Typical catalog setup:
@@ -711,7 +711,7 @@ Notes:
711711
#### GitHub Actions
712712

713713
ClawHub also ships an official reusable workflow at
714-
[`/.github/workflows/package-publish.yml`](https://github.com/openclaw/clawhub/blob/14a4c471af187e99bc89779b4ddc54608f6ffadd/.github/workflows/package-publish.yml)
714+
[`/.github/workflows/package-publish.yml`](https://github.com/openclaw/clawhub/blob/01bc23c0c725a4cac6ac491441fc2cfd3c7770bb/.github/workflows/package-publish.yml)
715715
for plugin repos.
716716

717717
Typical caller setup:

docs/concepts/usage-tracking.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,68 @@ title: "Usage tracking"
3030
- CLI: `openclaw channels list` prints the same usage snapshot alongside provider config (use `--no-usage` to skip).
3131
- macOS menu bar: "Usage" section under Context (only if available).
3232

33+
## Default usage footer mode
34+
35+
`/usage off|tokens|full` sets the footer for a session and is remembered for that
36+
session. `messages.responseUsage` seeds that mode for sessions that have not
37+
chosen one, so the footer can be on by default without typing `/usage` each time.
38+
39+
Set one mode for every channel, or a per-channel map with a `default` fallback:
40+
41+
```jsonc
42+
{
43+
"messages": {
44+
"responseUsage": "tokens",
45+
// or: { "default": "off", "discord": "full" }
46+
},
47+
}
48+
```
49+
50+
### Three distinct session states
51+
52+
A session's `responseUsage` field has three representable states, each with
53+
different semantics:
54+
55+
| State | Stored value | Effective mode |
56+
| ------------------- | ------------------------------- | --------------------------------------------------------------------- |
57+
| **Unset / inherit** | `undefined` (absent) | Falls through to `messages.responseUsage` config default, then `off`. |
58+
| **Explicit off** | `"off"` (stored) | Always off — a non-off config default cannot re-enable the footer. |
59+
| **Explicit on** | `"tokens"` or `"full"` (stored) | That mode, regardless of config default. |
60+
61+
### Precedence
62+
63+
Effective mode = session override → channel config entry → `default``off`.
64+
65+
An explicit `/usage off` is **persisted** as the literal value `"off"` in the
66+
session, not the same as "unset." This means a non-off `messages.responseUsage`
67+
default cannot turn the footer back on once the user has explicitly disabled it.
68+
69+
### Resetting vs. turning off
70+
71+
- `/usage off` — forces the footer off and persists that choice. A configured
72+
non-off default cannot override this.
73+
- `/usage reset` (aliases: `inherit`, `clear`, `default`) — clears the session
74+
override. The session then **inherits** the effective config default
75+
(`messages.responseUsage`). If no default is configured, the footer is off
76+
(unchanged from before). Use this to "go back to default" without explicitly
77+
turning the footer on.
78+
- A full session reset (`/reset` or `/new`) or a session rollover **preserves**
79+
the explicit usage-mode preference so the user's display choice survives
80+
session rollovers. Only `/usage reset` (and its aliases) actually clears the
81+
override.
82+
83+
### Toggle behavior
84+
85+
`/usage` with no arguments cycles: off → tokens → full → off. The starting point
86+
for the cycle is the **effective** current mode (session override falling through
87+
to the config default when unset), so the cycle is always consistent with what
88+
the user sees in the footer.
89+
90+
### Config
91+
92+
With no config the prior behavior holds (footer off until `/usage`). Use
93+
`/usage reset` to clear a session override and re-inherit the configured default.
94+
3395
## Custom `/usage full` footer
3496

3597
`/usage full` shows a built-in compact footer with model, reasoning, fast/slow,

docs/reference/token-use.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Use these in chat:
7676
configured for the active model.
7777
- `/usage off|tokens|full` → appends a **per-response usage footer** to every reply.
7878
- Persists per session (stored as `responseUsage`).
79+
- `/usage reset` (aliases: `inherit`, `clear`, `default`) — clears the session
80+
override so the session re-inherits the configured default.
7981
- `/usage full` shows estimated cost only when OpenClaw has usage metadata and
8082
local pricing for the active model. Otherwise it shows tokens only.
8183
- `/usage cost` → shows a local cost summary from OpenClaw session logs.

docs/tools/slash-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ plugins.
240240
| `/tasks` | List active/recent background tasks for the current session |
241241
| `/context [list\|detail\|map\|json]` | Explain how context is assembled |
242242
| `/whoami` | Show your sender id. Alias: `/id` |
243-
| `/usage off\|tokens\|full\|cost` | Control the per-response usage footer or print a local cost summary |
243+
| `/usage off\|tokens\|full\|reset\|cost` | Control the per-response usage footer (`reset`/`inherit`/`clear`/`default` clears the session override to re-inherit the configured default) or print a local cost summary |
244244
</Accordion>
245245

246246
<Accordion title="Skills, allowlists, approvals">

docs/web/tui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Session controls:
126126
- `/verbose <on|full|off>`
127127
- `/trace <on|off>`
128128
- `/reasoning <on|off|stream>`
129-
- `/usage <off|tokens|full>`
129+
- `/usage <off|tokens|full|reset>` (`reset`/`inherit`/`clear`/`default` clears the session override)
130130
- `/goal [status] | /goal start <objective> | /goal pause|resume|complete|block|clear`
131131
- `/elevated <on|off|ask|full>` (alias: `/elev`)
132132
- `/activation <mention|always>`

0 commit comments

Comments
 (0)