@colinlu50/openclaw-lark-stream 260327.2.1 → 260327.2.3

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
@@ -87,35 +87,43 @@ openclaw gateway restart
87
87
 
88
88
  | Option | Default | Description |
89
89
  |--------|---------|-------------|
90
- | `footer.status` | on | Completion state (`Completed` / `Error` / `Stopped`) |
91
- | `footer.elapsed` | ✅ on | Total response time (e.g. `Elapsed 3.2s`) |
92
- | `footer.tokens` | ✅ on | Input / output token counts (e.g. `↑ 19k ↓ 145`) |
93
- | `footer.context` | ✅ on | Context window usage percentage (e.g. `1% ctx`) |
94
- | `footer.cache` | off | Cache hit details (e.g. `Cache 18k/1k (94%)`) |
95
- | `footer.model` | ❌ off | Model name (e.g. `claude-3-7-sonnet`) |
96
-
97
- Default footer looks like:
90
+ | `footer.verbose` | off | Verbose mode: use full text labels instead of compact format |
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 rate (must enable separately) |
96
+ | `footer.model` | ❌ off | Model name (must enable separately) |
97
+
98
+ `verbose` only controls **display format** — each item's on/off is independent:
99
+
100
+ | Item | Compact (default) | Verbose |
101
+ |------|------------------|---------|
102
+ | status | `✅` / `❌` / `⏹` | `Completed` / `Error` / `Stopped` |
103
+ | elapsed | `8.3s` | `Elapsed 8.3s` |
104
+ | context | `1% ctx` | `Context 19k/200k (10%)` |
105
+ | cache | `94% cache` | `Cache 18k/1k (94%)` |
106
+ | tokens / model | same | same |
107
+
108
+ Default footer:
98
109
 
99
110
  ```
100
111
  ✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
101
112
  ```
102
113
 
103
- Enable everything:
114
+ Enable verbose mode + cache + model:
104
115
 
105
116
  ```bash
106
- openclaw config set channels.feishu.footer.status true
107
- openclaw config set channels.feishu.footer.elapsed true
108
- openclaw config set channels.feishu.footer.tokens true
109
- openclaw config set channels.feishu.footer.context true
117
+ openclaw config set channels.feishu.footer.verbose true
110
118
  openclaw config set channels.feishu.footer.cache true
111
119
  openclaw config set channels.feishu.footer.model true
112
120
  openclaw gateway restart
113
121
  ```
114
122
 
115
- With all options enabled:
123
+ Result:
116
124
 
117
125
  ```
118
- · 8.3s · ↑ 19k ↓ 145 · Cache 18k/1k (94%) · 1% ctx · claude-3-7-sonnet
126
+ Completed · Elapsed 8.3s · ↑ 19k ↓ 145 · Cache 18k/1k (94%) · Context 19k/200k (10%) · claude-3-7-sonnet
119
127
  ```
120
128
 
121
129
  Example — hide token counts, show model name:
package/README.md CHANGED
@@ -87,35 +87,43 @@ openclaw gateway restart
87
87
 
88
88
  | 配置项 | 默认 | 说明 |
89
89
  |--------|------|------|
90
- | `footer.status` | | 完成状态(`已完成` / `出错` / `已停止`) |
91
- | `footer.elapsed` | ✅ 开 | 总响应耗时(如 `耗时 3.2s`) |
92
- | `footer.tokens` | ✅ 开 | 本次 input / output token 数(如 `↑ 19k ↓ 145`) |
93
- | `footer.context` | ✅ 开 | context window 使用百分比(如 `1% ctx`) |
94
- | `footer.cache` | | 缓存命中详情(如 `缓存 18k/1k (94%)`) |
95
- | `footer.model` | ❌ 关 | 模型名称(如 `claude-3-7-sonnet`) |
96
-
97
- 默认底栏效果:
90
+ | `footer.verbose` | | 详细模式:各项改用文字标签展示 |
91
+ | `footer.status` | ✅ 开 | 完成状态 |
92
+ | `footer.elapsed` | ✅ 开 | 总响应耗时 |
93
+ | `footer.tokens` | ✅ 开 | input / output token |
94
+ | `footer.context` | | context window 使用率 |
95
+ | `footer.cache` | ❌ 关 | 缓存命中(需单独开启) |
96
+ | `footer.model` | ❌ 关 | 模型名称(需单独开启) |
97
+
98
+ `verbose` 只控制**展示格式**,各项的开关相互独立:
99
+
100
+ | 项目 | 简要(默认) | 详细(verbose) |
101
+ |------|------------|----------------|
102
+ | status | `✅` / `❌` / `⏹` | `已完成` / `出错` / `已停止` |
103
+ | elapsed | `8.3s` | `耗时 8.3s` |
104
+ | context | `1% ctx` | `上下文 19k/200k (10%)` |
105
+ | cache | `94% cache` | `缓存 18k/1k (94%)` |
106
+ | tokens / model | 相同 | 相同 |
107
+
108
+ 默认效果:
98
109
 
99
110
  ```
100
111
  ✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
101
112
  ```
102
113
 
103
- 全部开启:
114
+ 开启详细模式 + cache + model:
104
115
 
105
116
  ```bash
106
- openclaw config set channels.feishu.footer.status true
107
- openclaw config set channels.feishu.footer.elapsed true
108
- openclaw config set channels.feishu.footer.tokens true
109
- openclaw config set channels.feishu.footer.context true
117
+ openclaw config set channels.feishu.footer.verbose true
110
118
  openclaw config set channels.feishu.footer.cache true
111
119
  openclaw config set channels.feishu.footer.model true
112
120
  openclaw gateway restart
113
121
  ```
114
122
 
115
- 全部开启后效果:
123
+ 效果:
116
124
 
117
125
  ```
118
- · 8.3s · ↑ 19k ↓ 145 · 缓存 18k/1k (94%) · 1% ctx · claude-3-7-sonnet
126
+ 已完成 · 耗时 8.3s · ↑ 19k ↓ 145 · 缓存 18k/1k (94%) · 上下文 19k/200k (10%) · claude-3-7-sonnet
119
127
  ```
120
128
 
121
129
  示例 — 关闭 token 展示,开启模型名称:
package/dist/index.js CHANGED
@@ -114376,6 +114376,7 @@ var init_handler_registry = __esm({
114376
114376
  function resolveFooterConfig(cfg) {
114377
114377
  if (!cfg) return { ...DEFAULT_FOOTER_CONFIG };
114378
114378
  return {
114379
+ verbose: cfg.verbose ?? DEFAULT_FOOTER_CONFIG.verbose,
114379
114380
  status: cfg.status ?? DEFAULT_FOOTER_CONFIG.status,
114380
114381
  elapsed: cfg.elapsed ?? DEFAULT_FOOTER_CONFIG.elapsed,
114381
114382
  tokens: cfg.tokens ?? DEFAULT_FOOTER_CONFIG.tokens,
@@ -114389,6 +114390,7 @@ var init_footer_config = __esm({
114389
114390
  "src/core/footer-config.ts"() {
114390
114391
  "use strict";
114391
114392
  DEFAULT_FOOTER_CONFIG = {
114393
+ verbose: false,
114392
114394
  status: true,
114393
114395
  elapsed: true,
114394
114396
  tokens: true,
@@ -114783,22 +114785,23 @@ function formatFooterRuntimeSegments(params) {
114783
114785
  const { footer, metrics, elapsedMs, isError, isAborted } = params;
114784
114786
  const zhParts = [];
114785
114787
  const enParts = [];
114788
+ const verbose = footer?.verbose ?? false;
114786
114789
  if (footer?.status) {
114787
114790
  if (isError) {
114788
- zhParts.push("\u274C");
114789
- enParts.push("\u274C");
114791
+ zhParts.push(verbose ? "\u51FA\u9519" : "\u274C");
114792
+ enParts.push(verbose ? "Error" : "\u274C");
114790
114793
  } else if (isAborted) {
114791
- zhParts.push("\u23F9");
114792
- enParts.push("\u23F9");
114794
+ zhParts.push(verbose ? "\u5DF2\u505C\u6B62" : "\u23F9");
114795
+ enParts.push(verbose ? "Stopped" : "\u23F9");
114793
114796
  } else {
114794
- zhParts.push("\u2705");
114795
- enParts.push("\u2705");
114797
+ zhParts.push(verbose ? "\u5DF2\u5B8C\u6210" : "\u2705");
114798
+ enParts.push(verbose ? "Completed" : "\u2705");
114796
114799
  }
114797
114800
  }
114798
114801
  if (footer?.elapsed && elapsedMs != null) {
114799
114802
  const d = formatElapsed(elapsedMs);
114800
- zhParts.push(d);
114801
- enParts.push(d);
114803
+ zhParts.push(verbose ? `\u8017\u65F6 ${d}` : d);
114804
+ enParts.push(verbose ? `Elapsed ${d}` : d);
114802
114805
  }
114803
114806
  if (footer?.tokens && metrics) {
114804
114807
  const inTokens = typeof metrics.inputTokens === "number" ? Math.max(0, metrics.inputTokens) : void 0;
@@ -114817,10 +114820,15 @@ function formatFooterRuntimeSegments(params) {
114817
114820
  if (read != null && write != null && inputVal != null) {
114818
114821
  const total = read + write + inputVal;
114819
114822
  const hit = total > 0 ? Math.round(read / total * 100) : 0;
114820
- const left = compactNumber(read);
114821
- const right = compactNumber(write);
114822
- zhParts.push(`\u7F13\u5B58 ${left}/${right} (${hit}%)`);
114823
- enParts.push(`Cache ${left}/${right} (${hit}%)`);
114823
+ if (verbose) {
114824
+ const left = compactNumber(read);
114825
+ const right = compactNumber(write);
114826
+ zhParts.push(`\u7F13\u5B58 ${left}/${right} (${hit}%)`);
114827
+ enParts.push(`Cache ${left}/${right} (${hit}%)`);
114828
+ } else {
114829
+ zhParts.push(`${hit}% cache`);
114830
+ enParts.push(`${hit}% cache`);
114831
+ }
114824
114832
  }
114825
114833
  }
114826
114834
  if (footer?.context && metrics) {
@@ -114828,9 +114836,16 @@ function formatFooterRuntimeSegments(params) {
114828
114836
  const total = typeof freshTotal === "number" ? Math.max(0, freshTotal) : void 0;
114829
114837
  const ctx = typeof metrics.contextTokens === "number" ? Math.max(0, metrics.contextTokens) : void 0;
114830
114838
  if (total != null && ctx != null) {
114839
+ const totalLabel = compactNumber(total);
114840
+ const ctxLabel = compactNumber(ctx);
114831
114841
  const pct = ctx > 0 ? Math.round(total / ctx * 100) : 0;
114832
- zhParts.push(`${pct}% ctx`);
114833
- enParts.push(`${pct}% ctx`);
114842
+ if (verbose) {
114843
+ zhParts.push(`\u4E0A\u4E0B\u6587 ${totalLabel}/${ctxLabel} (${pct}%)`);
114844
+ enParts.push(`Context ${totalLabel}/${ctxLabel} (${pct}%)`);
114845
+ } else {
114846
+ zhParts.push(`${pct}% ctx`);
114847
+ enParts.push(`${pct}% ctx`);
114848
+ }
114834
114849
  }
114835
114850
  }
114836
114851
  if (footer?.model && metrics?.model) {