From 965819bc5d79cdf3c35fbe95c49e32d90bce7e34 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Sat, 9 May 2026 21:09:06 +0530 Subject: [PATCH] docs(context): describe context map command --- docs/concepts/context.md | 12 ++++++++++++ docs/tools/slash-commands.md | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/concepts/context.md b/docs/concepts/context.md index c4cc9990d8d..4e643b308e3 100644 --- a/docs/concepts/context.md +++ b/docs/concepts/context.md @@ -22,6 +22,7 @@ Context is _not the same thing_ as "memory": memory can be stored on disk and re - `/status` → quick "how full is my window?" view + session settings. - `/context list` → what's injected + rough sizes (per file + totals). - `/context detail` → deeper breakdown: per-file, per-tool schema sizes, per-skill entry sizes, and system prompt size. +- `/context map` → WinDirStat-style treemap image of the current session's tracked context contributors. - `/usage tokens` → append per-reply usage footer to normal replies. - `/compact` → summarize older history into a compact entry to free window space. @@ -74,6 +75,17 @@ Top tools (schema size): … (+N more tools) ``` +### `/context map` + +Sends an image generated from the same report as `/context list` and `/context detail`. Rectangle area is proportional to tracked prompt characters: + +- injected workspace files +- base system prompt text +- skill prompt entries +- tool JSON schemas + +The caption shows whether the map came from the latest run-built report or from an on-demand estimate. + ## What counts toward the context window Everything the model receives counts, including: diff --git a/docs/tools/slash-commands.md b/docs/tools/slash-commands.md index d1b89ed95d2..d81d18adeba 100644 --- a/docs/tools/slash-commands.md +++ b/docs/tools/slash-commands.md @@ -156,7 +156,7 @@ Current source-of-truth: - `/diagnostics [note]` is the owner-only support-report flow for Gateway bugs and Codex harness runs. It asks for explicit exec approval every time before running `openclaw gateway diagnostics export --json`; do not approve diagnostics with an allow-all rule. After approval, it sends a pasteable report with the local bundle path, manifest summary, privacy notes, and relevant session ids. In group chats, the approval prompt and report go to the owner privately. When the active session uses the OpenAI Codex harness, the same approval also sends relevant Codex feedback to OpenAI servers and the completed reply lists the OpenClaw session ids, Codex thread ids, and `codex resume ` commands. See [Diagnostics Export](/gateway/diagnostics). - `/crestodian ` runs the Crestodian setup and repair helper from an owner DM. - `/tasks` lists active/recent background tasks for the current session. - - `/context [list|detail|json]` explains how context is assembled. + - `/context [list|detail|map|json]` explains how context is assembled. `map` sends a treemap image of the current session context. - `/whoami` shows your sender id. Alias: `/id`. - `/usage off|tokens|full|cost` controls the per-response usage footer or prints a local cost summary.