Repository navigation
v0.6.3
steps: link a diagram and a code block
A new steps block links a flow, state or tree diagram to a code block in the same panel. Each line names an item of the diagram, the code lines it stands for and a short note (#440, #461):
```steps
Gateway 1: The request comes in.
Auth 2: Check the user.
Service 3-4: The service runs and returns the result.
```- On the page: click an item, or press Enter or Space on it, and its lines get a box with the note above them; the item and its edges light up. Click a line number to select the step that covers it. A bar above the pair has Previous, Next, the step count and a short hint; the arrow keys move and Esc clears.
- Layout: the diagram and the code sit side by side, in the order you wrote them, when the block is about 720px wide or more. Narrower, they stack with the diagram on top. Long lines wrap.
- Print, PNG, PDF and no script: every step is numbered on its item and beside its first line, and a numbered list of the steps follows the pair.
- Code only: leave the diagram out and the block walks through the code step by step.
am renderreports each mistake with its draft line: an item that is not in the diagram, a range outside the code, overlapping ranges, a missing code block, and more. Seeam help steps.
Fixes
- Copy buttons: Copy source and a code block's Copy no longer claim a copy that did not happen. When the clipboard refuses, the button says "Copy failed" in the page language (#447 by @SU-AN-coder, #457).
- HTML sanitizers: page styles no longer contain text that looks like a tag, so a viewer that sanitizes HTML, such as DeepSeek Harness's document preview, keeps the page's styling (#452, #456).
- tree: long words such as IPs and emails wrap inside their box instead of running into the next column. The toolbar no longer covers the page header, and a copied
Lead:label is dropped (#455). - One-column sheets: a
cols: 1sheet stays in one column between 761px and 1100px wide, instead of using half the width (#459). - Skill: when a page presents content the user already has and did not ask to summarize, the skill keeps every section (#432, #449 by @mojunzi).
Full list: #447, #449, #455, #456, #457, #459, #461.
steps:把图和代码块连起来
新的 steps 块把同一面板里的 flow、state 或 tree 图和一个代码块连起来。每一行写图里的一个项目、它对应的代码行和一句说明(#440、#461):
```steps
Gateway 1: 请求进来。
Auth 2: 检查用户。
Service 3-4: 服务执行,再把结果返回。
```- 在页面上:点击图中的项目(或在项目上按 Enter、空格),对应的代码行会被框出,框上方显示说明,项目和它的连线一起高亮。点击行号会选中覆盖该行的那一步。图和代码上方有一条栏,带“上一步”“下一步”、步数和一句简短提示;方向键切换,Esc 取消选择。
- 排版:块宽约 720px 以上时,图和代码按你书写的先后并排;更窄时上下堆叠,图在上。长行会折行。
- 打印、PNG、PDF 和没有脚本时:每一步的编号标在它的图项目上和它的第一行旁,图和代码下方有一张编号的步骤列表。
- 只有代码:不写图时,这个块就是对代码的逐步讲解。
am render会带稿件行号报告每个错误:项目不在图里、范围超出代码、两个范围重叠、缺少代码块等。完整写法见am help steps。
修复
- 复制按钮:“复制源稿”和代码块的“复制”不再在没复制成功时显示已复制。剪贴板拒绝时,按钮用页面语言显示“复制失败”(@SU-AN-coder 的 #447、#457)。
- HTML 清理器:页面样式里不再出现像标签的文字,所以会清理 HTML 的查看器(例如 DeepSeek Harness 的文档预览)不会丢掉页面样式(#452、#456)。
- tree:IP、邮箱这类长词在自己的框里折行,不再伸进下一栏。工具栏不再挡住页面标题,复制时多出的
Lead:标签也去掉了(#455)。 - 单栏 sheet:
cols: 1的 sheet 在 761px 到 1100px 宽时保持单栏,不再只占一半宽度(#459)。 - skill:页面展示用户已有、且没有要求总结的内容时,skill 会保留每一节(#432、@mojunzi 的 #449)。