From a8d04a1dbf6883d28cf423a5b577f7320c2d7ef1 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 26 Jan 2026 11:54:56 +0100 Subject: [PATCH] docs(coding-agent): add comprehensive cross-links in extensions.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - context event → session.md (message types) - setModel → models.md (custom models) - session_before_tree → tree.md (tree navigation) - Mode Behavior table → rpc.md, json.md (add JSON mode row) - Fix table to distinguish RPC vs JSON modes --- packages/coding-agent/docs/extensions.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/docs/extensions.md b/packages/coding-agent/docs/extensions.md index 01b09214..f2830339 100644 --- a/packages/coding-agent/docs/extensions.md +++ b/packages/coding-agent/docs/extensions.md @@ -354,7 +354,7 @@ pi.on("session_compact", async (event, ctx) => { #### session_before_tree / session_tree -Fired on `/tree` navigation. +Fired on `/tree` navigation. See [tree.md](tree.md) for tree navigation concepts. ```typescript pi.on("session_before_tree", async (event, ctx) => { @@ -950,7 +950,7 @@ pi.setActiveTools(["read", "bash"]); // Switch to read-only ### pi.setModel(model) -Set the current model. Returns `false` if no API key is available for the model. +Set the current model. Returns `false` if no API key is available for the model. See [models.md](models.md) for configuring custom models. ```typescript const model = ctx.modelRegistry.find("anthropic", "claude-sonnet-4-5"); @@ -1651,10 +1651,11 @@ const highlighted = highlightCode(code, lang, theme); | Mode | UI Methods | Notes | |------|-----------|-------| | Interactive | Full TUI | Normal operation | -| RPC | JSON protocol | Host handles UI | +| RPC (`--mode rpc`) | JSON protocol | Host handles UI, see [rpc.md](rpc.md) | +| JSON (`--mode json`) | No-op | Event stream to stdout, see [json.md](json.md) | | Print (`-p`) | No-op | Extensions run but can't prompt | -In print mode, check `ctx.hasUI` before using UI methods. +In non-interactive modes, check `ctx.hasUI` before using UI methods. ## Examples Reference