@colinlu50/openclaw-lark-stream 260328.1.2 → 260329.1.0

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 CHANGED
@@ -2,9 +2,12 @@ English | [中文](./README.md)
2
2
 
3
3
  # OpenClaw Lark/Feishu Plugin — Stream Card Edition
4
4
 
5
- ![demo](./demo.gif)
6
-
7
5
  Based on the official [openclaw-lark](https://github.com/larksuite/openclaw-lark) plugin, with **real-time streaming output** and **agent execution visibility**.
6
+ <img src="./assets/demo.gif" width="480" />
7
+ <sub>▲ Real streaming in group chats with full execution trace</sub>
8
+
9
+ <img src="./assets/demo_footer.png" width="480" />
10
+ <sub>▲ Card footer: status, elapsed time, token usage, context usage — each toggleable independently</sub>
8
11
 
9
12
  ## ✨ What's Changed
10
13
 
@@ -108,7 +111,8 @@ openclaw gateway restart
108
111
  | elapsed | `8.3s` | `Elapsed 8.3s` |
109
112
  | context | `1% ctx` | `Context 19k/200k (10%)` |
110
113
  | cache | `94% cache` | `Cache 18k/1k (94%)` |
111
- | tokens / model | same | same |
114
+ | tokens | `↑ 19k 145` | `In 19k Out 145` |
115
+ | model | same | same |
112
116
 
113
117
  Default footer:
114
118
 
@@ -128,7 +132,7 @@ openclaw gateway restart
128
132
  Result:
129
133
 
130
134
  ```
131
- Completed · Elapsed 8.3s · 19k 145 · Cache 18k/1k (94%) · Context 19k/200k (10%) · claude-3-7-sonnet
135
+ Completed · Elapsed 8.3s · In 19k Out 145 · Cache 18k/1k (94%) · Context 19k/200k (10%) · claude-3-7-sonnet
132
136
  ```
133
137
 
134
138
  Example — hide token counts, show model name:
package/README.md CHANGED
@@ -2,9 +2,16 @@
2
2
 
3
3
  # OpenClaw 飞书插件 — 流式卡片版
4
4
 
5
- ![demo](./demo.gif)
6
-
7
5
  基于官方 [openclaw-lark](https://github.com/larksuite/openclaw-lark) 插件,支持**实时流式输出**和 **Agent 执行过程可视化**。
6
+ <img src="./assets/demo.gif" width="480" />
7
+
8
+ <sub>▲ 群中真流式输出,并显示全部执行逻辑</sub>
9
+
10
+ <img src="./assets/demo_footer.png" width="480" />
11
+
12
+ <sub>▲ 卡片底栏:完成状态、响应耗时、token 用量、context 使用率,均可独立开关</sub>
13
+
14
+
8
15
 
9
16
  ## ✨ 改动说明
10
17
 
@@ -108,7 +115,8 @@ openclaw gateway restart
108
115
  | elapsed | `8.3s` | `耗时 8.3s` |
109
116
  | context | `1% ctx` | `上下文 19k/200k (10%)` |
110
117
  | cache | `94% cache` | `缓存 18k/1k (94%)` |
111
- | tokens / model | 相同 | 相同 |
118
+ | tokens | `↑ 19k 145` | `输入 19k 输出 145` |
119
+ | model | 相同 | 相同 |
112
120
 
113
121
  默认效果:
114
122
 
@@ -128,7 +136,7 @@ openclaw gateway restart
128
136
  效果:
129
137
 
130
138
  ```
131
- 已完成 · 耗时 8.3s · 19k 145 · 缓存 18k/1k (94%) · 上下文 19k/200k (10%) · claude-3-7-sonnet
139
+ 已完成 · 耗时 8.3s · 输入 19k 输出 145 · 缓存 18k/1k (94%) · 上下文 19k/200k (10%) · claude-3-7-sonnet
132
140
  ```
133
141
 
134
142
  示例 — 关闭 token 展示,开启模型名称:
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { execSync } from "node:child_process";
4
4
  import { createInterface } from "node:readline";
package/dist/index.js CHANGED
@@ -114809,8 +114809,13 @@ function formatFooterRuntimeSegments(params) {
114809
114809
  if (inTokens != null && outTokens != null) {
114810
114810
  const inLabel = compactNumber(inTokens);
114811
114811
  const outLabel = compactNumber(outTokens);
114812
- zhParts.push(`\u2191 ${inLabel} \u2193 ${outLabel}`);
114813
- enParts.push(`\u2191 ${inLabel} \u2193 ${outLabel}`);
114812
+ if (verbose) {
114813
+ zhParts.push(`\u8F93\u5165 ${inLabel} \u8F93\u51FA ${outLabel}`);
114814
+ enParts.push(`In ${inLabel} Out ${outLabel}`);
114815
+ } else {
114816
+ zhParts.push(`\u2191 ${inLabel} \u2193 ${outLabel}`);
114817
+ enParts.push(`\u2191 ${inLabel} \u2193 ${outLabel}`);
114818
+ }
114814
114819
  }
114815
114820
  }
114816
114821
  if (footer?.cache && metrics) {
@@ -122869,7 +122874,8 @@ var feishuOutbound = {
122869
122874
  };
122870
122875
 
122871
122876
  // src/messaging/outbound/actions.ts
122872
- import { extractToolSend, jsonResult, readStringParam, readReactionParams } from "openclaw/plugin-sdk";
122877
+ import { jsonResult, readStringParam, readReactionParams } from "openclaw/plugin-sdk/param-readers";
122878
+ import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
122873
122879
 
122874
122880
  // src/messaging/outbound/reactions.ts
122875
122881
  init_lark_client();