@songtonyli/dsh-cli 0.1.85 → 0.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-cjs/index.js +859 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +12 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +251 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +180 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +39 -52
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +3 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +3 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +243 -25
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +859 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +12 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +251 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +180 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +13 -37
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +44 -29
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +48 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +9 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +20 -2
- package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +16 -3
- package/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/execa/package.json +1 -1
- package/node_modules/unist-util-visit/lib/index.js +173 -161
- package/node_modules/unist-util-visit/license +1 -1
- package/node_modules/unist-util-visit/package.json +46 -56
- package/node_modules/unist-util-visit/readme.md +87 -27
- package/node_modules/unist-util-visit-parents/lib/color.js +4 -0
- package/node_modules/unist-util-visit-parents/lib/color.node.js +4 -0
- package/node_modules/unist-util-visit-parents/lib/index.js +235 -52
- package/node_modules/unist-util-visit-parents/license +1 -1
- package/node_modules/unist-util-visit-parents/package.json +44 -54
- package/node_modules/unist-util-visit-parents/readme.md +185 -74
- package/package.json +6 -6
|
@@ -40,7 +40,7 @@ dsh tui --no-open # print sign-in URLs without opening a
|
|
|
40
40
|
|
|
41
41
|
### 屏幕布局
|
|
42
42
|
|
|
43
|
-
每一帧都从终端左右两边各内缩一列绘制,因此对话记录与停靠的界面组件都不会有任何一行贴到两侧边缘。页眉在标题生成或设置后以标题命名会话,并在旁边显示 id。对话记录在终端自身的回滚区中增长:你的提示以 `❯` 开头,启用颜色时铺在一条通栏的着色背景带上(附件列在其下),而在已有模型步骤的轮次中被引导或注入的提示以暗色文字铺在更深的背景带上,退到它所加入的轮次之后,assistant 的推理以暗色斜体显示在 `✻ Thinking` 标题之下、Markdown 回复上方,流式期间标题旁的绽放符号随之旋转,每次工具调用是一张卡片,含状态符号(运行中为按工具族混合花朵、绽放与星形的黄色旋转指示、完成为绿色 `◆`、失败为红色 `◆`)、粗体青色工具名、以蓝绿色显示的呈现器标题(去掉呈现器重复写出的工具名,因此 `Read src/app.ts` 画成 `read src/app.ts`;shell 卡片取该次调用自身的摘要,绝不取命令,命令只由卡片的 `$` 行绘制一次)、运行中的一行加载标记,以及折叠到 `toolPreviewLines`
|
|
43
|
+
每一帧都从终端左右两边各内缩一列绘制,因此对话记录与停靠的界面组件都不会有任何一行贴到两侧边缘。页眉在标题生成或设置后以标题命名会话,并在旁边显示 id。对话记录在终端自身的回滚区中增长:你的提示以 `❯` 开头,启用颜色时铺在一条通栏的着色背景带上(附件列在其下),而在已有模型步骤的轮次中被引导或注入的提示以暗色文字铺在更深的背景带上,退到它所加入的轮次之后,assistant 的推理以暗色斜体显示在 `✻ Thinking` 标题之下、Markdown 回复上方,流式期间标题旁的绽放符号随之旋转,每次工具调用是一张卡片,含状态符号(运行中为按工具族混合花朵、绽放与星形的黄色旋转指示、完成为绿色 `◆`、失败为红色 `◆`)、粗体青色工具名、以蓝绿色显示的呈现器标题(去掉呈现器重复写出的工具名,因此 `Read src/app.ts` 画成 `read src/app.ts`;shell 卡片取该次调用自身的摘要,绝不取命令,命令只由卡片的 `$` 行绘制一次)、运行中的一行加载标记,以及折叠到 `toolPreviewLines` 行的正文。shell 输出以暗色显示,与使用语法着色的命令区分;完整的 JSON 对象或数组结果绘成树,以暗色导引线、青色键、橙色数组下标和按类型着色的标量值取代括号包裹的原始 JSON,格式错误或混合文本的输出保持不变。顶层 workflow 调用还会在该卡片旁另绘一次运行:运行名、成员数、状态,以及一条十格的成员进度条与已结束数,然后是每个阶段和已启动的成员。实时运行进行中时,其 `◇` 以菱形动画脉动,每个运行中成员的 `○` 以子 agent 族的花朵旋转,相位比前一个成员领先一格;从重放日志绘制的运行只在其后台作业仍存活时旋转,减少动效时绘制静态符号。运行中的层级,以及含失败、取消或中断成员的层级会展开;干净完成的层级保持折叠。在运行或阶段上按 Space 或 Enter 折叠该层,在仍在运行的成员上按 Enter 只会在该子会话是本会话的直接子会话且仍在本进程运行时打开它。卡片在模型开始调用时出现,并逐行向外流出,每行从左到右,无论卡片装着什么,速度都一致:一整行宽的内容需 `toolRevealFrames` 帧,较短的行按比例更短,刚画出的列会从终端背景色亮起到各自的颜色。工具回答后,结果行也以同样方式流出,排在卡片尚未画完的内容之后;调用与结果都不会等待动画。`edit` 或 `write` diff 卡片把每一新增行整行铺满绿色背景、每一删除行整行铺满红色背景,删除的旧行在上、新增的新行在下,并把 `+` 与 `-` 画成各自更亮的颜色,使符号从填充色中读得出来;折行续行只延续填充色,不再画第二个符号;工具应用变更后,已应用的 hunk 取代调用时携带的 diff,并在每行前标出文件行号,新增行与未变行用新文件的行号,删除行用旧文件的行号。`subagent` 与 `subagent_*` 卡片折叠时只画一行,行首是同样的状态符号,运行中旋转,交给后台的子 agent 则为暗色 `◆`:运行中显示工具名、任务描述,以及调用指定的模型与 `background`;结束后描述变暗,右端标出 `[done]`,交给后台的子 agent 标 `[started]`,失败标 `[failed]`。在被标记的行上按 `Space`,或按 `Ctrl+O`,即可展开完整卡片。非空的系统提示词与每一条注入的上下文——instructions、catalogs、snapshots、notices、relays 与 recalls——绘制为暗色 `⬡` 标题,其下是面向模型文本的前 `contextPreviewLines` 行,快照的每一份贡献具名写在其自身各行上方;空的系统提示词则省略。一次压缩(compaction)——无论来自 `/compact` 还是自动触发——绘制为一个上下文块,其强调色 `⬡` 标题写明来源,以及被替换内容与摘要各自的估算 token 数,如 `context compacted by /compact · ~6.4k → ~0.9k tokens` 或 `context compacted automatically in turn 12 · …`;标题之下,`compressed` 写明摘要替换的条目数与轮次、其中的每条提示(最多五条,每条一行),以及回复、按工具分列的工具结果、上下文块与更早摘要的计数,`preserved` 写明系统提示词以及之后每一轮仍逐字保留的内容;这两部分始终绘出,其下的摘要则像其他上下文块一样折叠到 `contextPreviewLines` 行。检查点消息本身不再重复绘制。日志以错误结束的 `/compact` 尝试会在会话重绘时打印 `/compact failed · <error>`,因为实时运行的命令会自己报告失败;失败的自动尝试不改变任何内容,也不绘制任何内容,与浏览器一致。承载的行数多于其绘制行数的工具卡片与上下文块,结尾都是同一条标记:该块被对话记录的焦点持有时为 `… <n> more rows · Space expands`,否则为 `… <n> more rows · Ctrl+O expands`。回复中的围栏代码、`read` 卡片的文件行、`edit` 或 `write` diff 卡片的变更行——其中 `+` 新增项标为绿色、`-` 删除项标为红色,符号后的源文本按文件扩展名对应的语言绘制——以及 `!` / `!!` 草稿、用户 shell 的 `$ command` 行(其 `$` 用强调色)与终端工具卡片中的 shell 命令,都使用语法高亮,配色主题由终端自身的背景在明暗之间选定;某种语言的语法会在第一个用到它的代码块出现时才加载,因此该块先以纯文本绘制、随后被重绘为彩色;这里没有对应语法的语言、既不支持 24 位也不支持 256 色的终端,以及 `codeHighlight: false`,都会把每个代码块画成纯文本。标题与列表标记使用橙色,链接与行内代码使用品红色,引用保持暗色。每种色相都是 Tokyo Night(Night)配色,当 `COLORTERM` 声明 `truecolor` 或 `24bit` 时按原色精确绘制,否则取 256 色索引中最接近的一色;背景带保留其 256 色灰阶与 diff 底色。流式推理、回复文字与工具参数到达时先入队,再按帧(默认约每秒 60 帧)分批绘制,因此一次网络突发会分摊到 `streamPaceFrames` 帧里,而不是一次落下,队列也从不拖慢模型调用。流式回复文字会淡入,而且每个词各走各的时钟:一个词以接近终端背景色的亮度出现,并经 `streamFadeSteps` 次、每次 `streamFadeStepMs` 提亮到它最终稳定的颜色,因此流得更快只会留下更长的一串正在提亮的词,而不会更暗。流式推理在同一时长内浮出:以抬高的颜色出现,再退回到稳定时的暗色斜体。工具卡片的每一列则在这段时长内从终端背景色亮起到它稳定时的调色板颜色;从持久化历史重绘的卡片不带流出或淡入,已经稳定下来的文字也不会再被调暗。
|
|
44
44
|
|
|
45
45
|
对话记录下方依次是 agent 工作时的旋转指示——`thinking`、`writing`、`calling <tool>`、重试或 `compacting`,各自旁边是它自己的盲文动画:环绕的点、逐行填满的线、绕行的单点、滑动的横条,或沉降又回满的方格——标签单词上带着一道扫过的高亮,并带着当前这次模型调用的实时 `↑` 发送与 `↓` 接收 token,以紧凑的 `k` / `M` / `B` 计数,随数据流入增长,并在提供方的 usage 块到达后落定——任何打开的提示、有消息等待时的带框 follow-ups 列表、本轮 todo 与每个子 agent 一行的 activity board(有行时才绘制;已完成内容划掉,状态符号以绿色、黄色或蓝色显示,进行中的那一项为旋转指示,todo 最多四行其后 `+<n> more`,每个子 agent 行是其旋转指示或 `✓` / `✗`、任务标签(Agent Teams 的 teammate 为 `<name> · <role>`),以及它自述正在做什么的最后一句话,截成终端的一行,运行中的子 agent 在前,最多三行其后 `+<n> more subagents`,不是焦点区域,在 `turn/end` 与 bind 时消失)、编辑器、子 agent 面板,以及页脚:未聚焦时是一行由两端向内构建的状态栏。编辑器的光标是终端自身的闪烁竖条:应用在启动时请求这一形状,退出时把你的默认形状还回去,而状态栏或面板持有键盘期间完全不绘制光标。模型为紫色,入口按键为品红色;进行中的轮次、上下文与 todo 信息分别使用黄色、品红色与绿色。模型锚定在左端且永不丢弃——超过 20 列时退回到裸模型名,只有仍然过宽的标签才会被省略号截断——离开编辑器的那两个按键则锚定在右端,写作 `Shift+↑ read · Shift+↓ status`,有 follow-ups 等待时则写作 `Shift+↑ select · Shift+↓ status`,窄到一定程度收缩为 `Shift+↑↓ nav`,不足 40 列时整体丢弃。关键事实填满剩下的中间部分,按状态栏顺序排列:推理强度(选择把推理交给模型时标为 `effort default`)、进行中轮次的已用时间、上下文窗口百分比、todo 计数,以及 workspace 路径(过长时以 `~` 与 `…/` 缩短)。中间部分容纳不下的每个分段都折进末尾的 `+N`,未聚焦行从不绘制的那些分段也一并折入——权限预设、token 用量(会话合计加上进行中的这次调用)、来自投影接缝的目标与计划模式标记,以及待发送附件的数量。模型请求重试以通知形式出现,与浏览器标记承载的事实相同。
|
|
46
46
|
|
|
@@ -169,7 +169,7 @@ follow-ups 面板持有键盘时:
|
|
|
169
169
|
|
|
170
170
|
每个聚焦的分段都在第二行展开其最重要的事实。除 `todo` 之外,`Enter` 把这些事实打印到对话记录,并指出改变它们的方式:模型分段指出 `/model`,推理强度分段指出 `Shift+Tab` 与 `/effort` 共用的选择器,权限分段指出其预设以及 `/permission` 选择器;`turn` 分段——绘制在权限与用量分段之间、形如 `turn <elapsed>`,且只在轮次进行时出现——给出轮次编号、其开始时间、已用时间与排队消息数量;用量、上下文、目标与计划分段打印 `/status` 报告中对应的小节,workspace 分段显示完整路径,附件分段列出待发送的附件。`todo` 分段展开按状态统计的计数以及正在进行的条目(若无正在进行的条目则为下一条待办),`Enter` 打开 agent 的 todo 列表,与 `/todos` 打开的是同一个列表。
|
|
171
171
|
|
|
172
|
-
在编辑器开头输入 `/` 会补全终端自身的命令与共享注册表的命令;任意位置的 `@` 补全引用。非空的 `!command` 或 `!!command` 行经 `ctx.shell` 在会话 cwd 以 `danger-full-access` 运行;草稿与对话记录中的 `$ command`
|
|
172
|
+
在编辑器开头输入 `/` 会补全终端自身的命令与共享注册表的命令;任意位置的 `@` 补全引用。非空的 `!command` 或 `!!command` 行经 `ctx.shell` 在会话 cwd 以 `danger-full-access` 运行;草稿与对话记录中的 `$ command` 行使用语法高亮,暗色输出或 JSON 树画在该行之下。`!` 会注入一条插件通知供下一步领取;`!!` 不会。单独的 `!` 仍是普通提示。草稿以 `!` 开头时,编辑器边框改为警告色。
|
|
173
173
|
|
|
174
174
|
| 命令 | 效果 |
|
|
175
175
|
|---|---|
|
|
@@ -336,6 +336,7 @@ runner 等待完整应用就绪(`ctx.get('loader')?.await()`),并在核心
|
|
|
336
336
|
| [`src/toast.ts`](src/toast.ts) | 临时按键提示行:其浮层、其时钟,以及它承载的各条文字 |
|
|
337
337
|
| [`src/pinned-prompt.ts`](src/pinned-prompt.ts) | 阅读器在轮次面板滚动后固定在顶部的提示行:符号、合并为一行的提示,以及背景带 |
|
|
338
338
|
| [`src/transcript.ts`](src/transcript.ts) | 呈现视图、用量与轮次结束原因的纯文本折叠、`$ command` 的 span,以及每条标记共用的那一套折叠措辞 |
|
|
339
|
+
| [`src/json-tree.ts`](src/json-tree.ts) | 把完整的 JSON 对象与数组绘成树行、提供语义 token 范围,并区分 shell 命令与暗色输出 |
|
|
339
340
|
| [`src/diff.ts`](src/diff.ts) | diff 卡片的行 diff、hunk 选择,以及卡片加框所依据的新增与删除标记 |
|
|
340
341
|
| [`src/style.ts`](src/style.ts) | 调色板:以真彩色或 256 色 SGR 表示的 Tokyo Night 色相,以及用这些色相绘制的语义角色(含 Markdown 回复所用的标题与链接色、工具名、调用对象与模型的色相、已完成 todo 内容所用的划线角色、提示所铺的背景带与被引导或注入的提示所铺的更深背景带、diff 卡片变更行的绿色与红色填充及符号颜色)、按键徽标是否可点击,以及派生的 pi-tui 主题 |
|
|
341
342
|
| [`src/highlight.ts`](src/highlight.ts) | 围栏代码、文件行与 shell 命令的语法高亮:某个块可能加载的语法、由背景选定的配色主题,以及一个 token 所用的 SGR |
|
|
@@ -2100,6 +2100,168 @@ function hunks(lines, context) {
|
|
|
2100
2100
|
return out;
|
|
2101
2101
|
}
|
|
2102
2102
|
//#endregion
|
|
2103
|
+
//#region lib/types/json-tree.js
|
|
2104
|
+
/**
|
|
2105
|
+
* Structured JSON output for terminal cards. Valid JSON objects and arrays
|
|
2106
|
+
* become tree rows with token ranges; the palette colors those ranges without
|
|
2107
|
+
* changing the plain rows used for wrapping and navigation.
|
|
2108
|
+
* @module @deepseek-ai/dsh-tui-app/json-tree
|
|
2109
|
+
*/
|
|
2110
|
+
/** Build one plain row and its token ranges from ordered segments. */
|
|
2111
|
+
function row(segments) {
|
|
2112
|
+
let text = "";
|
|
2113
|
+
const spans = [];
|
|
2114
|
+
for (const segment of segments) {
|
|
2115
|
+
const start = text.length;
|
|
2116
|
+
text += segment.text;
|
|
2117
|
+
if (segment.tone !== void 0) spans.push({
|
|
2118
|
+
start,
|
|
2119
|
+
end: text.length,
|
|
2120
|
+
tone: segment.tone
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
return {
|
|
2124
|
+
text,
|
|
2125
|
+
style: { spans }
|
|
2126
|
+
};
|
|
2127
|
+
}
|
|
2128
|
+
/** The indentation a nested value's children continue from its branch. */
|
|
2129
|
+
function childPrefix(prefix, connector) {
|
|
2130
|
+
return connector === "├─ " ? `${prefix}│ ` : `${prefix} `;
|
|
2131
|
+
}
|
|
2132
|
+
/** Entries and container kind of an object or array. */
|
|
2133
|
+
function containerEntries(value) {
|
|
2134
|
+
const array = Array.isArray(value);
|
|
2135
|
+
return {
|
|
2136
|
+
array,
|
|
2137
|
+
entries: array ? value.map((item, index) => [String(index), item]) : Object.entries(value)
|
|
2138
|
+
};
|
|
2139
|
+
}
|
|
2140
|
+
/** Append one labeled value and, for a nonempty container, its descendants. */
|
|
2141
|
+
function appendNested(rows, value, label, prefix, connector) {
|
|
2142
|
+
const guide = `${prefix}${connector}`;
|
|
2143
|
+
const labelSegment = [{
|
|
2144
|
+
text: label.text,
|
|
2145
|
+
tone: label.tone
|
|
2146
|
+
}, { text: ":" }];
|
|
2147
|
+
if (typeof value === "object" && value !== null) {
|
|
2148
|
+
const { array, entries } = containerEntries(value);
|
|
2149
|
+
if (entries.length === 0) {
|
|
2150
|
+
const empty = array ? "(empty array)" : "(empty object)";
|
|
2151
|
+
rows.push(row([
|
|
2152
|
+
{
|
|
2153
|
+
text: guide,
|
|
2154
|
+
tone: "guide"
|
|
2155
|
+
},
|
|
2156
|
+
...labelSegment,
|
|
2157
|
+
{ text: " " },
|
|
2158
|
+
{
|
|
2159
|
+
text: empty,
|
|
2160
|
+
tone: "empty"
|
|
2161
|
+
}
|
|
2162
|
+
]));
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2165
|
+
rows.push(row([{
|
|
2166
|
+
text: guide,
|
|
2167
|
+
tone: "guide"
|
|
2168
|
+
}, ...labelSegment]));
|
|
2169
|
+
const nested = childPrefix(prefix, connector);
|
|
2170
|
+
entries.forEach(([key, item], index) => {
|
|
2171
|
+
appendNested(rows, item, {
|
|
2172
|
+
text: array ? `[${key}]` : key,
|
|
2173
|
+
tone: array ? "index" : "key"
|
|
2174
|
+
}, nested, index === entries.length - 1 ? "╰─ " : "├─ ");
|
|
2175
|
+
});
|
|
2176
|
+
return;
|
|
2177
|
+
}
|
|
2178
|
+
const text = typeof value === "string" ? JSON.stringify(value) : String(value);
|
|
2179
|
+
const tone = typeof value === "string" ? "string" : typeof value === "number" ? "number" : typeof value === "boolean" ? "boolean" : "null";
|
|
2180
|
+
rows.push(row([
|
|
2181
|
+
{
|
|
2182
|
+
text: guide,
|
|
2183
|
+
tone: "guide"
|
|
2184
|
+
},
|
|
2185
|
+
...labelSegment,
|
|
2186
|
+
{ text: " " },
|
|
2187
|
+
{
|
|
2188
|
+
text,
|
|
2189
|
+
tone
|
|
2190
|
+
}
|
|
2191
|
+
]));
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Format a complete JSON object or array as a tree without object and array
|
|
2195
|
+
* braces. Strings remain JSON-quoted and escaped; empty containers name their
|
|
2196
|
+
* type. Other JSON values, malformed JSON, and mixed text return undefined.
|
|
2197
|
+
* @param text - the complete output text to parse.
|
|
2198
|
+
* @returns aligned plain rows and token ranges, or undefined to keep the original output.
|
|
2199
|
+
*/
|
|
2200
|
+
function jsonTreeText(text) {
|
|
2201
|
+
let value;
|
|
2202
|
+
try {
|
|
2203
|
+
value = JSON.parse(text);
|
|
2204
|
+
} catch {
|
|
2205
|
+
return;
|
|
2206
|
+
}
|
|
2207
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
2208
|
+
const { array, entries } = containerEntries(value);
|
|
2209
|
+
if (entries.length === 0) {
|
|
2210
|
+
const empty = row([{
|
|
2211
|
+
text: array ? "(empty array)" : "(empty object)",
|
|
2212
|
+
tone: "empty"
|
|
2213
|
+
}]);
|
|
2214
|
+
return {
|
|
2215
|
+
lines: [empty.text],
|
|
2216
|
+
json: [empty.style]
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
const rows = [];
|
|
2220
|
+
entries.forEach(([key, item], index) => {
|
|
2221
|
+
appendNested(rows, item, {
|
|
2222
|
+
text: array ? `[${key}]` : key,
|
|
2223
|
+
tone: array ? "index" : "key"
|
|
2224
|
+
}, "", index === entries.length - 1 ? "╰─ " : "├─ ");
|
|
2225
|
+
});
|
|
2226
|
+
return {
|
|
2227
|
+
lines: rows.map((item) => item.text),
|
|
2228
|
+
json: rows.map((item) => item.style)
|
|
2229
|
+
};
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* Color JSON token ranges and dim non-JSON shell-output rows. JSON tree rows
|
|
2233
|
+
* carry no code spans, so their ranges always refer to unstyled plain text.
|
|
2234
|
+
* @param rows - rows to paint.
|
|
2235
|
+
* @param json - JSON token ranges aligned with `rows`; absent entries are not JSON.
|
|
2236
|
+
* @param shellOutput - whether each non-JSON row is shell output to dim.
|
|
2237
|
+
* @param palette - active terminal palette.
|
|
2238
|
+
* @returns styled rows, with input rows left unchanged when no role applies.
|
|
2239
|
+
*/
|
|
2240
|
+
function paintJsonRows(rows, json, shellOutput, palette) {
|
|
2241
|
+
const tone = {
|
|
2242
|
+
guide: palette.dim,
|
|
2243
|
+
key: palette.tool,
|
|
2244
|
+
index: palette.heading,
|
|
2245
|
+
string: palette.success,
|
|
2246
|
+
number: palette.warning,
|
|
2247
|
+
boolean: palette.link,
|
|
2248
|
+
null: palette.dim,
|
|
2249
|
+
empty: palette.dim
|
|
2250
|
+
};
|
|
2251
|
+
return rows.map((rowText, index) => {
|
|
2252
|
+
const spans = json?.[index]?.spans;
|
|
2253
|
+
if (spans === void 0) return shellOutput?.[index] === true ? palette.dim(rowText) : rowText;
|
|
2254
|
+
let painted = "";
|
|
2255
|
+
let offset = 0;
|
|
2256
|
+
for (const span of spans) {
|
|
2257
|
+
painted += rowText.slice(offset, span.start);
|
|
2258
|
+
painted += tone[span.tone](rowText.slice(span.start, span.end));
|
|
2259
|
+
offset = span.end;
|
|
2260
|
+
}
|
|
2261
|
+
return painted + rowText.slice(offset);
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
//#endregion
|
|
2103
2265
|
//#region lib/types/stream-args.js
|
|
2104
2266
|
/**
|
|
2105
2267
|
* Lines for a generic card's raw input when the presenter supplied no content.
|
|
@@ -2549,23 +2711,43 @@ function toolCallText(argumentsJson, view, toolName) {
|
|
|
2549
2711
|
default: return assertNever(view, "tui tool call view");
|
|
2550
2712
|
}
|
|
2551
2713
|
}
|
|
2714
|
+
/** Plain text or a structured tree when the complete result is a JSON object or array. */
|
|
2715
|
+
function contentResultBody(content) {
|
|
2716
|
+
const text = contentText(content);
|
|
2717
|
+
const tree = jsonTreeText(text);
|
|
2718
|
+
if (tree !== void 0) return tree;
|
|
2719
|
+
return { lines: text.split("\n").filter((line) => line !== "") };
|
|
2720
|
+
}
|
|
2552
2721
|
/**
|
|
2553
|
-
* {@link toolResultLines} with
|
|
2554
|
-
*
|
|
2722
|
+
* {@link toolResultLines} with code spans for `read` and `diff` cards, JSON
|
|
2723
|
+
* token ranges for complete object or array output, and the shell-output
|
|
2724
|
+
* marker for terminal cards.
|
|
2555
2725
|
* @param view - the tool's `presentResult` view, when it has one.
|
|
2556
2726
|
* @param content - the model-facing result content.
|
|
2557
|
-
* @returns the rows and
|
|
2727
|
+
* @returns the rows and their aligned presentation metadata.
|
|
2558
2728
|
*/
|
|
2559
2729
|
function toolResultBody(view, content) {
|
|
2560
|
-
if (view === void 0) return
|
|
2730
|
+
if (view === void 0) return contentResultBody(content);
|
|
2561
2731
|
switch (view.card) {
|
|
2562
|
-
case "generic": return
|
|
2732
|
+
case "generic": return contentResultBody(view.content ?? content);
|
|
2563
2733
|
case "terminal": {
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2734
|
+
const tree = jsonTreeText(view.output ?? "");
|
|
2735
|
+
const lines = tree?.lines ?? (view.output ?? "").split("\n");
|
|
2736
|
+
const json = tree === void 0 ? void 0 : [...tree.json];
|
|
2737
|
+
while (tree === void 0 && lines.length > 0 && lines.at(-1) === "") lines.pop();
|
|
2738
|
+
if (view.exitCode !== void 0 && view.exitCode !== 0) {
|
|
2739
|
+
lines.push(`exit ${String(view.exitCode)}`);
|
|
2740
|
+
json?.push(void 0);
|
|
2741
|
+
}
|
|
2742
|
+
if (view.signal !== void 0) {
|
|
2743
|
+
lines.push(`signal ${view.signal}`);
|
|
2744
|
+
json?.push(void 0);
|
|
2745
|
+
}
|
|
2746
|
+
return {
|
|
2747
|
+
lines,
|
|
2748
|
+
shellOutput: true,
|
|
2749
|
+
...json === void 0 ? {} : { json }
|
|
2750
|
+
};
|
|
2569
2751
|
}
|
|
2570
2752
|
case "diff": return diffsBody(view.diffs);
|
|
2571
2753
|
case "search": {
|
|
@@ -5282,9 +5464,9 @@ var FenceMemo = class {
|
|
|
5282
5464
|
}
|
|
5283
5465
|
};
|
|
5284
5466
|
/**
|
|
5285
|
-
* A finished `!` / `!!` run: `$ command` in shellscript colour, then
|
|
5286
|
-
* output rows. Re-paints when a grammar lands
|
|
5287
|
-
* drops on `invalidate()`.
|
|
5467
|
+
* A finished `!` / `!!` run: `$ command` in shellscript colour, then dimmed
|
|
5468
|
+
* output rows or a semantic-colour JSON tree. Re-paints when a grammar lands
|
|
5469
|
+
* because {@link LastDrawn} drops on `invalidate()`.
|
|
5288
5470
|
*/
|
|
5289
5471
|
var UserShellBlock = class {
|
|
5290
5472
|
theme;
|
|
@@ -5312,8 +5494,16 @@ var UserShellBlock = class {
|
|
|
5312
5494
|
*/
|
|
5313
5495
|
render(width) {
|
|
5314
5496
|
return this.drawn.get(String(width), () => {
|
|
5315
|
-
const
|
|
5316
|
-
const
|
|
5497
|
+
const extra = this.rows.slice(1);
|
|
5498
|
+
const tree = extra[0] === void 0 ? void 0 : jsonTreeText(extra[0]);
|
|
5499
|
+
const displayed = tree === void 0 ? extra : [...tree.lines, ...extra.slice(1)];
|
|
5500
|
+
const { lines, code } = shellCommandBody(this.command, displayed);
|
|
5501
|
+
const json = tree === void 0 ? void 0 : [
|
|
5502
|
+
void 0,
|
|
5503
|
+
...tree.json,
|
|
5504
|
+
...extra.slice(1).map(() => void 0)
|
|
5505
|
+
];
|
|
5506
|
+
const painted = paintJsonRows(paintCodeRows(lines, code, this.theme.codeHighlight), json, lines.map((_, index) => index > 0), this.theme.palette);
|
|
5317
5507
|
const inner = Math.max(1, width);
|
|
5318
5508
|
const [command = "", ...output] = painted;
|
|
5319
5509
|
return [
|
|
@@ -5936,8 +6126,12 @@ var ToolBlock = class {
|
|
|
5936
6126
|
resultLines = [];
|
|
5937
6127
|
/** The code span behind each result row, for a `read` or `diff` result; absent otherwise. */
|
|
5938
6128
|
resultCode;
|
|
6129
|
+
/** JSON token ranges behind result rows that form a tree; absent otherwise. */
|
|
6130
|
+
resultJson;
|
|
5939
6131
|
/** Which result rows are diff additions or removals, for a `diff` result; absent otherwise. */
|
|
5940
6132
|
resultDiff;
|
|
6133
|
+
/** Whether non-JSON result rows are shell output, dimmed apart from the command. */
|
|
6134
|
+
shellOutput = false;
|
|
5941
6135
|
/** The facts a folded subagent card draws as one row; absent for every other tool. */
|
|
5942
6136
|
subagent;
|
|
5943
6137
|
expanded = false;
|
|
@@ -5998,7 +6192,8 @@ var ToolBlock = class {
|
|
|
5998
6192
|
} : {
|
|
5999
6193
|
kind: "call",
|
|
6000
6194
|
rows: call,
|
|
6001
|
-
...this.call.code === void 0 ? {} : { code: [...title.map(() => void 0), ...this.call.code] }
|
|
6195
|
+
...this.call.code === void 0 ? {} : { code: [...title.map(() => void 0), ...this.call.code] },
|
|
6196
|
+
...this.call.json === void 0 ? {} : { json: [...title.map(() => void 0), ...this.call.json] }
|
|
6002
6197
|
}];
|
|
6003
6198
|
if (this.status !== "running") parts.push(this.resultLines.length === 0 ? {
|
|
6004
6199
|
kind: "result",
|
|
@@ -6006,7 +6201,9 @@ var ToolBlock = class {
|
|
|
6006
6201
|
} : {
|
|
6007
6202
|
kind: "result",
|
|
6008
6203
|
rows: this.resultLines,
|
|
6009
|
-
...this.resultCode === void 0 ? {} : { code: this.resultCode }
|
|
6204
|
+
...this.resultCode === void 0 ? {} : { code: this.resultCode },
|
|
6205
|
+
...this.resultJson === void 0 ? {} : { json: this.resultJson },
|
|
6206
|
+
...this.shellOutput ? { shellOutput: true } : {}
|
|
6010
6207
|
});
|
|
6011
6208
|
this.sections = {
|
|
6012
6209
|
revision: this.revision,
|
|
@@ -6091,15 +6288,18 @@ var ToolBlock = class {
|
|
|
6091
6288
|
* @param isError - whether the tool reported failure.
|
|
6092
6289
|
* @param code - the span behind each row, for a result the card colours as code.
|
|
6093
6290
|
* @param diff - which rows are diff additions or removals, for a result the card boxes as a diff.
|
|
6291
|
+
* @param presentation - JSON token ranges and whether the rows are shell output.
|
|
6094
6292
|
*/
|
|
6095
|
-
setResult(lines, isError, code, diff) {
|
|
6293
|
+
setResult(lines, isError, code, diff, presentation = {}) {
|
|
6096
6294
|
if (diff !== void 0 && this.call.diff !== void 0) this.call = {
|
|
6097
6295
|
title: this.call.title,
|
|
6098
6296
|
lines: []
|
|
6099
6297
|
};
|
|
6100
6298
|
this.resultLines = lines;
|
|
6101
6299
|
this.resultCode = code;
|
|
6300
|
+
this.resultJson = presentation.json;
|
|
6102
6301
|
this.resultDiff = diff;
|
|
6302
|
+
this.shellOutput = presentation.shellOutput === true;
|
|
6103
6303
|
this.status = isError ? "error" : "done";
|
|
6104
6304
|
this.revision += 1;
|
|
6105
6305
|
this.measured = false;
|
|
@@ -6112,7 +6312,9 @@ var ToolBlock = class {
|
|
|
6112
6312
|
setBackground(lines) {
|
|
6113
6313
|
this.resultLines = lines;
|
|
6114
6314
|
this.resultCode = void 0;
|
|
6315
|
+
this.resultJson = void 0;
|
|
6115
6316
|
this.resultDiff = void 0;
|
|
6317
|
+
this.shellOutput = false;
|
|
6116
6318
|
this.status = "background";
|
|
6117
6319
|
this.revision += 1;
|
|
6118
6320
|
this.measured = false;
|
|
@@ -6278,9 +6480,16 @@ var ToolBlock = class {
|
|
|
6278
6480
|
...new Array(loading.length).fill(void 0),
|
|
6279
6481
|
...this.resultCode ?? new Array(this.resultLines.length).fill(void 0)
|
|
6280
6482
|
];
|
|
6483
|
+
const json = this.call.json === void 0 && this.resultJson === void 0 ? void 0 : [
|
|
6484
|
+
...this.call.json ?? new Array(this.call.lines.length).fill(void 0),
|
|
6485
|
+
...new Array(loading.length).fill(void 0),
|
|
6486
|
+
...this.resultJson ?? new Array(this.resultLines.length).fill(void 0)
|
|
6487
|
+
];
|
|
6488
|
+
const output = body.map((_, index) => this.shellOutput && index >= this.call.lines.length + loading.length);
|
|
6281
6489
|
const kept = this.expanded ? body : foldRows(body, this.theme.toolPreviewLines, (hidden) => foldMarker(hidden, marked ? "marked" : "transcript"));
|
|
6282
6490
|
const cut = !this.expanded && body.length > this.theme.toolPreviewLines;
|
|
6283
|
-
const
|
|
6491
|
+
const presentationLength = cut ? kept.length - 1 : kept.length;
|
|
6492
|
+
const painted = paintJsonRows(paintCodeRows(kept, code, this.theme.codeHighlight), json?.slice(0, presentationLength), output.slice(0, presentationLength), palette);
|
|
6284
6493
|
const shown = cut ? [...painted.slice(0, -1), paintKeys(palette, kept.at(-1), (text) => text)] : painted;
|
|
6285
6494
|
const callCount = Math.min(this.call.lines.length + loading.length, shown.length);
|
|
6286
6495
|
const marks = [
|
|
@@ -12518,11 +12727,14 @@ const MEASURING = createPalette(false);
|
|
|
12518
12727
|
function bodySource(block, part) {
|
|
12519
12728
|
if (block.blockKind === "tool" && part.kind === "call" && block.title !== "" && part.rows[0] === block.title) return {
|
|
12520
12729
|
rows: part.rows.slice(1),
|
|
12521
|
-
code: part.code?.slice(1)
|
|
12730
|
+
code: part.code?.slice(1),
|
|
12731
|
+
json: part.json?.slice(1)
|
|
12522
12732
|
};
|
|
12523
12733
|
return {
|
|
12524
12734
|
rows: part.rows,
|
|
12525
|
-
code: part.code
|
|
12735
|
+
code: part.code,
|
|
12736
|
+
json: part.json,
|
|
12737
|
+
shellOutput: part.shellOutput
|
|
12526
12738
|
};
|
|
12527
12739
|
}
|
|
12528
12740
|
/**
|
|
@@ -12643,7 +12855,9 @@ function drawSection(block, part, width, look, header) {
|
|
|
12643
12855
|
if (block.blockKind === "assistant" && part.kind === "reply") rows = [header, ...replyRows(part.rows, room, look).map((line) => `${indent}${line}`)];
|
|
12644
12856
|
else {
|
|
12645
12857
|
const source = bodySource(block, part);
|
|
12646
|
-
|
|
12858
|
+
const highlighted = paintCodeRows(source.rows, source.code, look.highlight);
|
|
12859
|
+
const output = source.shellOutput === true ? source.rows.map(() => true) : void 0;
|
|
12860
|
+
rows = [header, ...paintJsonRows(highlighted, source.json, output, look.palette).flatMap((row, index) => {
|
|
12647
12861
|
const tone = rowTone(block, part, source.rows[index]);
|
|
12648
12862
|
return wrapTextWithAnsi(row, room).map((line) => bodyRow(line, tone, indent, content, look));
|
|
12649
12863
|
})];
|
|
@@ -12722,7 +12936,7 @@ function sectionRowCount(cursor, blocks, width) {
|
|
|
12722
12936
|
const { block, part } = found;
|
|
12723
12937
|
const cache = sectionRowsCache(block, cursor.part);
|
|
12724
12938
|
const known = cache.measured;
|
|
12725
|
-
if (known !== void 0 && known.width === width && known.kind === part.kind && sameEntries(known.rows, part.rows) && sameEntries(known.code, part.code)) return known.count;
|
|
12939
|
+
if (known !== void 0 && known.width === width && known.kind === part.kind && sameEntries(known.rows, part.rows) && sameEntries(known.code, part.code) && sameEntries(known.json, part.json) && known.shellOutput === part.shellOutput) return known.count;
|
|
12726
12940
|
const lines = drawSection(block, part, width, {
|
|
12727
12941
|
palette: MEASURING,
|
|
12728
12942
|
held: false
|
|
@@ -12732,6 +12946,8 @@ function sectionRowCount(cursor, blocks, width) {
|
|
|
12732
12946
|
kind: part.kind,
|
|
12733
12947
|
rows: part.rows,
|
|
12734
12948
|
code: part.code,
|
|
12949
|
+
json: part.json,
|
|
12950
|
+
shellOutput: part.shellOutput,
|
|
12735
12951
|
count: lines.length
|
|
12736
12952
|
};
|
|
12737
12953
|
return lines.length;
|
|
@@ -12751,7 +12967,7 @@ function sectionRows(cursor, blocks, width, look) {
|
|
|
12751
12967
|
const header = block.blockKind === "user" ? "" : headerRow(block, part, Math.max(1, width - visibleWidth(GUTTER)), look);
|
|
12752
12968
|
const cache = sectionRowsCache(block, cursor.part);
|
|
12753
12969
|
const known = cache.drawn;
|
|
12754
|
-
if (known !== void 0 && known.width === width && known.kind === part.kind && known.header === header && known.look.palette === look.palette && known.look.tints === look.tints && known.look.highlight === look.highlight && known.highlightRevision === look.highlight?.revision && known.look.held === look.held && sameEntries(known.rows, part.rows) && sameEntries(known.code, part.code)) {
|
|
12970
|
+
if (known !== void 0 && known.width === width && known.kind === part.kind && known.header === header && known.look.palette === look.palette && known.look.tints === look.tints && known.look.highlight === look.highlight && known.highlightRevision === look.highlight?.revision && known.look.held === look.held && sameEntries(known.rows, part.rows) && sameEntries(known.code, part.code) && sameEntries(known.json, part.json) && known.shellOutput === part.shellOutput) {
|
|
12755
12971
|
drawnSections.delete(known);
|
|
12756
12972
|
drawnSections.set(known, cache);
|
|
12757
12973
|
return known.lines;
|
|
@@ -12765,6 +12981,8 @@ function sectionRows(cursor, blocks, width, look) {
|
|
|
12765
12981
|
header,
|
|
12766
12982
|
rows: part.rows,
|
|
12767
12983
|
code: part.code,
|
|
12984
|
+
json: part.json,
|
|
12985
|
+
shellOutput: part.shellOutput,
|
|
12768
12986
|
lines
|
|
12769
12987
|
});
|
|
12770
12988
|
return lines;
|
|
@@ -20439,7 +20657,7 @@ var TuiApp = class {
|
|
|
20439
20657
|
const moved = isError ? movedJobId(result.content) : void 0;
|
|
20440
20658
|
if (moved === void 0) {
|
|
20441
20659
|
const body = toolResultBody(this.presentResult(block.name, this.toolArguments.get(result.toolCallId), result.content, isError, event.data.meta), result.content);
|
|
20442
|
-
block.setResult(body.lines, isError, body.code, body.diff);
|
|
20660
|
+
block.setResult(body.lines, isError, body.code, body.diff, body);
|
|
20443
20661
|
} else block.setBackground([`◇ moved to the background as ${moved} · /jobs lists it`]);
|
|
20444
20662
|
this.spinners.delete(block);
|
|
20445
20663
|
this.updateSpinTicker();
|