@colinlu50/openclaw-lark-stream 260327.2.0 → 260327.2.2
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.en.md +127 -86
- package/README.md +127 -86
- package/dist/index.js +23 -12
- package/dist/index.js.map +2 -2
- package/package.json +70 -70
package/README.en.md
CHANGED
|
@@ -1,86 +1,127 @@
|
|
|
1
|
-
English | [中文](./README.md)
|
|
2
|
-
|
|
3
|
-
# OpenClaw Lark/Feishu Plugin — Stream Card Edition
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
Based on the official [openclaw-lark](https://github.com/larksuite/openclaw-lark) plugin, with **real-time streaming output**, **reasoning display**, and **tool call indicators**.
|
|
8
|
-
|
|
9
|
-
## ✨ What's Changed
|
|
10
|
-
|
|
11
|
-
The official plugin delivers LLM block results all at once after completion. This version enables:
|
|
12
|
-
|
|
13
|
-
- **Real-time streaming output** — each block's content is progressively appended to the streaming card as it's generated
|
|
14
|
-
- **Group chat streaming** — streaming output works in group chats as well
|
|
15
|
-
- **Reasoning display** — think content from reasoning models (DeepSeek-R1, Claude 3.7, etc.) streams live
|
|
16
|
-
- **Tool call indicators** — when the agent calls a tool, the card shows the current tool
|
|
17
|
-
- **
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- **2026.3.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
openclaw config set channels.feishu.
|
|
66
|
-
openclaw config set channels.feishu.replyMode.
|
|
67
|
-
openclaw
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
openclaw
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
English | [中文](./README.md)
|
|
2
|
+
|
|
3
|
+
# OpenClaw Lark/Feishu Plugin — Stream Card Edition
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
Based on the official [openclaw-lark](https://github.com/larksuite/openclaw-lark) plugin, with **real-time streaming output**, **reasoning display**, and **tool call indicators**.
|
|
8
|
+
|
|
9
|
+
## ✨ What's Changed
|
|
10
|
+
|
|
11
|
+
The official plugin delivers LLM block results all at once after completion. This version enables:
|
|
12
|
+
|
|
13
|
+
- **Real-time streaming output** — each block's content is progressively appended to the streaming card as it's generated
|
|
14
|
+
- **Group chat streaming** — streaming output works in group chats as well
|
|
15
|
+
- **Reasoning display** — think content from reasoning models (DeepSeek-R1, Claude 3.7, etc.) streams live
|
|
16
|
+
- **Tool call indicators** — when the agent calls a tool, the card shows the current tool name in real-time
|
|
17
|
+
- **Process panel** — on completion, all reasoning blocks and tool calls are folded into a single expandable "Process" panel in chronological order
|
|
18
|
+
- **Token usage** — the card footer shows input/output token counts and context window usage percentage by default
|
|
19
|
+
|
|
20
|
+
## 📢 News
|
|
21
|
+
|
|
22
|
+
- **2026.3.27 v2** — Collapsed panels merged into a single "Process" panel; footer now shows token usage and context % by default
|
|
23
|
+
- **2026.3.27 v1** — Compatible with OpenClaw >= 2026.3.22; added AskUserQuestion interactive tool; panels appear in chronological order; fixed card table limit error 230099
|
|
24
|
+
- **2026.3.23** — First release with real-time streaming output and tool call indicators (for OpenClaw < 2026.3.22, use the `0322` branch)
|
|
25
|
+
|
|
26
|
+
## 📦 Installation
|
|
27
|
+
|
|
28
|
+
Requires [OpenClaw](https://openclaw.ai) and Node.js (>= v22).
|
|
29
|
+
|
|
30
|
+
The install script automatically detects your OpenClaw version and installs the right plugin:
|
|
31
|
+
- OpenClaw **>= 2026.3.22** → installs the latest version (reasoning streaming, AskUserQuestion, etc.)
|
|
32
|
+
- OpenClaw **< 2026.3.22** → installs the legacy-compatible version
|
|
33
|
+
|
|
34
|
+
> [!NOTE]
|
|
35
|
+
> **Alibaba Cloud OpenClaw plans are not supported** (permission restrictions). Please use a self-hosted server.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx -y @colinlu50/openclaw-lark-stream install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
To update an existing installation:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx -y @colinlu50/openclaw-lark-stream update
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### From source (for development)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd ~/.openclaw/extensions
|
|
51
|
+
git clone https://github.com/ColinLu50/openclaw-lark-stream.git openclaw-lark-stream
|
|
52
|
+
cd openclaw-lark-stream && npm install && npm run build
|
|
53
|
+
openclaw gateway restart
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## ⚙️ Configuration
|
|
57
|
+
|
|
58
|
+
### Streaming Output
|
|
59
|
+
|
|
60
|
+
Streaming is enabled by default after installation. To disable:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
openclaw config set channels.feishu.streaming false
|
|
64
|
+
openclaw config set channels.feishu.replyMode.direct card
|
|
65
|
+
openclaw config set channels.feishu.replyMode.group card
|
|
66
|
+
openclaw config set channels.feishu.replyMode.default card
|
|
67
|
+
openclaw gateway restart
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
To re-enable:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
openclaw config set channels.feishu.streaming true
|
|
74
|
+
openclaw config set channels.feishu.replyMode.direct streaming
|
|
75
|
+
openclaw config set channels.feishu.replyMode.group streaming
|
|
76
|
+
openclaw config set channels.feishu.replyMode.default streaming
|
|
77
|
+
openclaw gateway restart
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Card Footer
|
|
81
|
+
|
|
82
|
+
Each footer item can be toggled independently via `channels.feishu.footer.*`. Restart after changes:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
openclaw gateway restart
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
| Option | Default | Description |
|
|
89
|
+
|--------|---------|-------------|
|
|
90
|
+
| `footer.verbose` | ❌ off | Verbose mode: text labels + enables cache and model by default |
|
|
91
|
+
| `footer.status` | ✅ on | Completion state |
|
|
92
|
+
| `footer.elapsed` | ✅ on | Total response time |
|
|
93
|
+
| `footer.tokens` | ✅ on | Input / output token counts |
|
|
94
|
+
| `footer.context` | ✅ on | Context window usage |
|
|
95
|
+
| `footer.cache` | ❌ off | Cache hit details (on by default in verbose mode) |
|
|
96
|
+
| `footer.model` | ❌ off | Model name (on by default in verbose mode) |
|
|
97
|
+
|
|
98
|
+
**Default (compact):**
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Verbose mode (`footer.verbose true`):**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Completed · Elapsed 8.3s · ↑ 19k ↓ 145 · Cache 18k/1k (94%) · Context 19k/200k (10%) · claude-3-7-sonnet
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Enable verbose mode:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
openclaw config set channels.feishu.footer.verbose true
|
|
114
|
+
openclaw gateway restart
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Example — hide token counts, show model name:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
openclaw config set channels.feishu.footer.tokens false
|
|
121
|
+
openclaw config set channels.feishu.footer.model true
|
|
122
|
+
openclaw gateway restart
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 📄 License
|
|
126
|
+
|
|
127
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,86 +1,127 @@
|
|
|
1
|
-
[English](./README.en.md) | 中文
|
|
2
|
-
|
|
3
|
-
# OpenClaw 飞书插件 — 流式卡片版
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
基于官方 [openclaw-lark](https://github.com/larksuite/openclaw-lark) 插件,支持**实时流式输出**、**推理过程展示**和**工具调用状态**。
|
|
8
|
-
|
|
9
|
-
## ✨ 改动说明
|
|
10
|
-
|
|
11
|
-
官方插件在 LLM 生成完一个 block 后才一次性推送结果。本版本实现了:
|
|
12
|
-
|
|
13
|
-
- **实时流式输出** — 每个 block 的内容在生成过程中逐步追加到流式卡片
|
|
14
|
-
- **群聊流式输出** — 群聊中也可使用流式输出
|
|
15
|
-
- **推理过程展示** — 推理模型(DeepSeek-R1、Claude 3.7 等)的 think
|
|
16
|
-
- **工具调用状态** — agent
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- **2026.3.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
openclaw config set channels.feishu.
|
|
66
|
-
openclaw config set channels.feishu.replyMode.
|
|
67
|
-
openclaw
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
openclaw
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
[English](./README.en.md) | 中文
|
|
2
|
+
|
|
3
|
+
# OpenClaw 飞书插件 — 流式卡片版
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
基于官方 [openclaw-lark](https://github.com/larksuite/openclaw-lark) 插件,支持**实时流式输出**、**推理过程展示**和**工具调用状态**。
|
|
8
|
+
|
|
9
|
+
## ✨ 改动说明
|
|
10
|
+
|
|
11
|
+
官方插件在 LLM 生成完一个 block 后才一次性推送结果。本版本实现了:
|
|
12
|
+
|
|
13
|
+
- **实时流式输出** — 每个 block 的内容在生成过程中逐步追加到流式卡片
|
|
14
|
+
- **群聊流式输出** — 群聊中也可使用流式输出
|
|
15
|
+
- **推理过程展示** — 推理模型(DeepSeek-R1、Claude 3.7 等)的 think 内容实时流出
|
|
16
|
+
- **工具调用状态** — agent 调用工具时,卡片顶部实时显示当前工具名称
|
|
17
|
+
- **思考过程面板** — 完成后,所有推理块和工具调用按发生顺序折叠进一个「思考过程」可展开面板
|
|
18
|
+
- **Token 用量展示** — 卡片底部默认显示 input/output token 数和 context 使用百分比
|
|
19
|
+
|
|
20
|
+
## 📢 News
|
|
21
|
+
|
|
22
|
+
- **2026.3.27 v2** — 折叠面板合并为单个「思考过程」;底栏默认显示 token 用量和 context 使用率
|
|
23
|
+
- **2026.3.27 v1** — 适配 OpenClaw >= 2026.3.22;新增 AskUserQuestion 交互式提问工具;推理块与工具调用面板按发生顺序排列;修复卡片表格超限错误 230099
|
|
24
|
+
- **2026.3.23** — 发布第一版,支持实时流式输出和工具调用状态展示(适配 OpenClaw < 2026.3.22,请切换到 `0322` 分支)
|
|
25
|
+
|
|
26
|
+
## 📦 安装
|
|
27
|
+
|
|
28
|
+
需要 [OpenClaw](https://openclaw.ai) 和 Node.js(>= v22)。
|
|
29
|
+
|
|
30
|
+
安装脚本会自动检测 OpenClaw 版本并安装对应的插件版本:
|
|
31
|
+
- OpenClaw **>= 2026.3.22** → 自动安装最新版(支持推理流式、AskUserQuestion 等)
|
|
32
|
+
- OpenClaw **< 2026.3.22** → 自动安装兼容旧版的插件
|
|
33
|
+
|
|
34
|
+
> [!NOTE]
|
|
35
|
+
> **不支持阿里云 OpenClaw 套餐**(权限限制),请使用自建服务器安装。
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx -y @colinlu50/openclaw-lark-stream install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
已安装后更新:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx -y @colinlu50/openclaw-lark-stream update
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 从源码安装(开发用)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd ~/.openclaw/extensions
|
|
51
|
+
git clone https://github.com/ColinLu50/openclaw-lark-stream.git openclaw-lark-stream
|
|
52
|
+
cd openclaw-lark-stream && npm install && npm run build
|
|
53
|
+
openclaw gateway restart
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## ⚙️ 配置
|
|
57
|
+
|
|
58
|
+
### 流式输出
|
|
59
|
+
|
|
60
|
+
安装后默认开启流式输出。如需关闭:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
openclaw config set channels.feishu.streaming false
|
|
64
|
+
openclaw config set channels.feishu.replyMode.direct card
|
|
65
|
+
openclaw config set channels.feishu.replyMode.group card
|
|
66
|
+
openclaw config set channels.feishu.replyMode.default card
|
|
67
|
+
openclaw gateway restart
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
重新开启:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
openclaw config set channels.feishu.streaming true
|
|
74
|
+
openclaw config set channels.feishu.replyMode.direct streaming
|
|
75
|
+
openclaw config set channels.feishu.replyMode.group streaming
|
|
76
|
+
openclaw config set channels.feishu.replyMode.default streaming
|
|
77
|
+
openclaw gateway restart
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 卡片底栏
|
|
81
|
+
|
|
82
|
+
底栏各项均可通过 `channels.feishu.footer.*` 独立开关,修改后重启生效:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
openclaw gateway restart
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
| 配置项 | 默认 | 说明 |
|
|
89
|
+
|--------|------|------|
|
|
90
|
+
| `footer.verbose` | ❌ 关 | 详细模式:文字标签 + 自动开启 cache 和 model |
|
|
91
|
+
| `footer.status` | ✅ 开 | 完成状态 |
|
|
92
|
+
| `footer.elapsed` | ✅ 开 | 总响应耗时 |
|
|
93
|
+
| `footer.tokens` | ✅ 开 | input / output token 数 |
|
|
94
|
+
| `footer.context` | ✅ 开 | context window 使用率 |
|
|
95
|
+
| `footer.cache` | ❌ 关 | 缓存命中详情(verbose 模式下默认开) |
|
|
96
|
+
| `footer.model` | ❌ 关 | 模型名称(verbose 模式下默认开) |
|
|
97
|
+
|
|
98
|
+
**默认(简要):**
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**详细模式(`footer.verbose true`):**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
已完成 · 耗时 8.3s · ↑ 19k ↓ 145 · 缓存 18k/1k (94%) · 上下文 19k/200k (10%) · claude-3-7-sonnet
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
开启详细模式:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
openclaw config set channels.feishu.footer.verbose true
|
|
114
|
+
openclaw gateway restart
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
示例 — 关闭 token 展示,开启模型名称:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
openclaw config set channels.feishu.footer.tokens false
|
|
121
|
+
openclaw config set channels.feishu.footer.model true
|
|
122
|
+
openclaw gateway restart
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 📄 许可证
|
|
126
|
+
|
|
127
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -114375,13 +114375,15 @@ var init_handler_registry = __esm({
|
|
|
114375
114375
|
// src/core/footer-config.ts
|
|
114376
114376
|
function resolveFooterConfig(cfg) {
|
|
114377
114377
|
if (!cfg) return { ...DEFAULT_FOOTER_CONFIG };
|
|
114378
|
+
const verbose = cfg.verbose ?? DEFAULT_FOOTER_CONFIG.verbose;
|
|
114378
114379
|
return {
|
|
114380
|
+
verbose,
|
|
114379
114381
|
status: cfg.status ?? DEFAULT_FOOTER_CONFIG.status,
|
|
114380
114382
|
elapsed: cfg.elapsed ?? DEFAULT_FOOTER_CONFIG.elapsed,
|
|
114381
114383
|
tokens: cfg.tokens ?? DEFAULT_FOOTER_CONFIG.tokens,
|
|
114382
|
-
cache: cfg.cache ?? DEFAULT_FOOTER_CONFIG.cache,
|
|
114384
|
+
cache: cfg.cache ?? (verbose ? true : DEFAULT_FOOTER_CONFIG.cache),
|
|
114383
114385
|
context: cfg.context ?? DEFAULT_FOOTER_CONFIG.context,
|
|
114384
|
-
model: cfg.model ?? DEFAULT_FOOTER_CONFIG.model
|
|
114386
|
+
model: cfg.model ?? (verbose ? true : DEFAULT_FOOTER_CONFIG.model)
|
|
114385
114387
|
};
|
|
114386
114388
|
}
|
|
114387
114389
|
var DEFAULT_FOOTER_CONFIG;
|
|
@@ -114389,6 +114391,7 @@ var init_footer_config = __esm({
|
|
|
114389
114391
|
"src/core/footer-config.ts"() {
|
|
114390
114392
|
"use strict";
|
|
114391
114393
|
DEFAULT_FOOTER_CONFIG = {
|
|
114394
|
+
verbose: false,
|
|
114392
114395
|
status: true,
|
|
114393
114396
|
elapsed: true,
|
|
114394
114397
|
tokens: true,
|
|
@@ -114783,22 +114786,23 @@ function formatFooterRuntimeSegments(params) {
|
|
|
114783
114786
|
const { footer, metrics, elapsedMs, isError, isAborted } = params;
|
|
114784
114787
|
const zhParts = [];
|
|
114785
114788
|
const enParts = [];
|
|
114789
|
+
const verbose = footer?.verbose ?? false;
|
|
114786
114790
|
if (footer?.status) {
|
|
114787
114791
|
if (isError) {
|
|
114788
|
-
zhParts.push("\u51FA\u9519");
|
|
114789
|
-
enParts.push("Error");
|
|
114792
|
+
zhParts.push(verbose ? "\u51FA\u9519" : "\u274C");
|
|
114793
|
+
enParts.push(verbose ? "Error" : "\u274C");
|
|
114790
114794
|
} else if (isAborted) {
|
|
114791
|
-
zhParts.push("\u5DF2\u505C\u6B62");
|
|
114792
|
-
enParts.push("Stopped");
|
|
114795
|
+
zhParts.push(verbose ? "\u5DF2\u505C\u6B62" : "\u23F9");
|
|
114796
|
+
enParts.push(verbose ? "Stopped" : "\u23F9");
|
|
114793
114797
|
} else {
|
|
114794
|
-
zhParts.push("\u5DF2\u5B8C\u6210");
|
|
114795
|
-
enParts.push("Completed");
|
|
114798
|
+
zhParts.push(verbose ? "\u5DF2\u5B8C\u6210" : "\u2705");
|
|
114799
|
+
enParts.push(verbose ? "Completed" : "\u2705");
|
|
114796
114800
|
}
|
|
114797
114801
|
}
|
|
114798
114802
|
if (footer?.elapsed && elapsedMs != null) {
|
|
114799
114803
|
const d = formatElapsed(elapsedMs);
|
|
114800
|
-
zhParts.push(`\u8017\u65F6 ${d}`);
|
|
114801
|
-
enParts.push(`Elapsed ${d}`);
|
|
114804
|
+
zhParts.push(verbose ? `\u8017\u65F6 ${d}` : d);
|
|
114805
|
+
enParts.push(verbose ? `Elapsed ${d}` : d);
|
|
114802
114806
|
}
|
|
114803
114807
|
if (footer?.tokens && metrics) {
|
|
114804
114808
|
const inTokens = typeof metrics.inputTokens === "number" ? Math.max(0, metrics.inputTokens) : void 0;
|
|
@@ -114828,9 +114832,16 @@ function formatFooterRuntimeSegments(params) {
|
|
|
114828
114832
|
const total = typeof freshTotal === "number" ? Math.max(0, freshTotal) : void 0;
|
|
114829
114833
|
const ctx = typeof metrics.contextTokens === "number" ? Math.max(0, metrics.contextTokens) : void 0;
|
|
114830
114834
|
if (total != null && ctx != null) {
|
|
114835
|
+
const totalLabel = compactNumber(total);
|
|
114836
|
+
const ctxLabel = compactNumber(ctx);
|
|
114831
114837
|
const pct = ctx > 0 ? Math.round(total / ctx * 100) : 0;
|
|
114832
|
-
|
|
114833
|
-
|
|
114838
|
+
if (verbose) {
|
|
114839
|
+
zhParts.push(`\u4E0A\u4E0B\u6587 ${totalLabel}/${ctxLabel} (${pct}%)`);
|
|
114840
|
+
enParts.push(`Context ${totalLabel}/${ctxLabel} (${pct}%)`);
|
|
114841
|
+
} else {
|
|
114842
|
+
zhParts.push(`${pct}% ctx`);
|
|
114843
|
+
enParts.push(`${pct}% ctx`);
|
|
114844
|
+
}
|
|
114834
114845
|
}
|
|
114835
114846
|
}
|
|
114836
114847
|
if (footer?.model && metrics?.model) {
|