docs: clarify developer tool filtering and module contracts

This commit is contained in:
2026-11-12 21:02:02 +08:00
parent 91801dc417
commit fe8ffa1a78
5 changed files with 10 additions and 6 deletions
+3 -2
View File
@@ -52,7 +52,8 @@ pub(super) fn build(
}
// 先把活动记录投影成显示行,再把当前输入附在末尾;不会在绘制函数中提交或执行程序。
let mut lines = Vec::new();
// console_after 是清屏水位,只展示其后会改变程序状态的请求;原生 /events 输入不刷入 Console。
// console_after 是按开始 ID 划定的清屏水位,展示之后的 PUT/POST/DELETE,排除 /events。
// 清屏时尚未完成的旧请求,即使随后完成也不会重新出现;过滤按方法而非实际执行成功与否判断。
for r in records.iter().filter(|r| {
r.id > state.console_after
&& (r.method == "PUT" || r.method == "POST" || r.method == "DELETE")
@@ -87,7 +88,7 @@ pub(super) fn build(
title.action = Some(Action::Request(r.id));
lines.push(title);
}
// 请求正文逐行展示,首行 > 提示符、续行两个空格;保留源码换行而不执行文本。
// 请求正文来自有界日志预览,首行 > 提示符、续行两个空格;不保证是完整提交源码,也不执行文本。
for (i, line) in r.request.split('\n').enumerate() {
lines.push(Line::new(
format!("{}{line}", if i == 0 { "> " } else { " " }),