answer_branch
Answer a pending branch request from an open Rabbithole by writing a focused markdown response, using selected text and document context for precise answers.
Instructions
Answer one pending branch request from an open Rabbithole. Called after open_rabbithole or answer_branch returns status='branch_request'. Write a focused, well-formatted markdown answer to the human's question about their selection - use selected_text, parent_node_title, and lineage for context (you already hold the documents you authored). If selected_text is empty, answer conversationally about the parent document as a whole. If the request has a 'lens', match that style.
Authoring vocabulary:
Base notation: GFM markdown, $...$/$$...$$ and (...)/[...] math, and highlighted language-tagged code fences.
If the answer is content fetched from a URL or repo, pass its document URL as base_url so relative images and links resolve.
If the answer uses a local image, pass assets: [{ name, file_path }] and reference it as
; use this for screenshots, generated diagrams, and other non-web images.Use ```show when a concept is spatial or structural: architecture, memory layout, relationships.
show dialect: HTML/CSS/inline-SVG only; no scripts. Scripts and unsafe attributes are stripped.
show craft: prefer HTML/CSS layout with flexbox/grid over absolute SVG coordinates.
Design visuals for about 380px card width; make them fluid and keep labels short.
Use theme tokens, never hardcoded colors, so visuals match light and dark themes: --fg, --fg-bold, --fg-dim, --fg-faint, --node-bg, --bar-bg, --border, --border-focus, --accent, --accent-contrast, --code-bg, --hl, --hl-strong, --warn, --font-ui, --font-doc, --font-mono.
Example show:
<style>.flow{display:grid;gap:8px}.box{border:1px solid var(--border);padding:8px;border-radius:6px}</style>
<div class='flow'><div class='box'>Parse</div><div class='box' style='background:var(--hl)'>Render</div></div>Streaming choreography: send prose in 1-3 sentence chunks as usual.
Emit each visual fence contiguously, ideally in one chunk; readers see a placeholder until the fence closes.
Interleave prose -> visual -> prose when useful. Use a visual only when it genuinely carries the explanation.
Finish streaming by sending the remaining final chunk in a normal call with a short 'title'. Partial chunks concatenate verbatim: include your own spacing/newlines and never repeat text already sent. The final call blocks and returns the next event. If it returns status='keep_listening', immediately call open_rabbithole { hole_id }; if the host reports a tool timeout (e.g. timed out awaiting tools/call), do the same. Do not re-send content; asks are saved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Short label for the new node (a few words; required on the final call) | |
| assets | No | Local image files to attach to this hole; reference them in markdown as asset:name.png images | |
| content | Yes | Markdown chunk (partial) or the remaining markdown (final call) | |
| partial | No | true = stream this chunk into the pending answer and return immediately; omit/false = finish the answer and block for the next event | |
| base_url | No | Document URL used to resolve relative markdown links/images; absolute http(s) only | |
| request_id | Yes | The request_id of the branch_request being answered | |
| session_id | Yes | Active session ID from open_rabbithole |