@colinlu50/openclaw-lark-stream 260327.2.1 → 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 +15 -19
- package/README.md +15 -19
- package/dist/index.js +23 -12
- package/dist/index.js.map +2 -2
- package/package.json +70 -70
package/README.en.md
CHANGED
|
@@ -87,35 +87,31 @@ openclaw gateway restart
|
|
|
87
87
|
|
|
88
88
|
| Option | Default | Description |
|
|
89
89
|
|--------|---------|-------------|
|
|
90
|
-
| `footer.
|
|
91
|
-
| `footer.
|
|
92
|
-
| `footer.
|
|
93
|
-
| `footer.
|
|
94
|
-
| `footer.
|
|
95
|
-
| `footer.
|
|
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) |
|
|
96
97
|
|
|
97
|
-
Default
|
|
98
|
+
**Default (compact):**
|
|
98
99
|
|
|
99
100
|
```
|
|
100
101
|
✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
**Verbose mode (`footer.verbose true`):**
|
|
104
105
|
|
|
105
|
-
```
|
|
106
|
-
|
|
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
|
|
110
|
-
openclaw config set channels.feishu.footer.cache true
|
|
111
|
-
openclaw config set channels.feishu.footer.model true
|
|
112
|
-
openclaw gateway restart
|
|
106
|
+
```
|
|
107
|
+
Completed · Elapsed 8.3s · ↑ 19k ↓ 145 · Cache 18k/1k (94%) · Context 19k/200k (10%) · claude-3-7-sonnet
|
|
113
108
|
```
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
Enable verbose mode:
|
|
116
111
|
|
|
117
|
-
```
|
|
118
|
-
|
|
112
|
+
```bash
|
|
113
|
+
openclaw config set channels.feishu.footer.verbose true
|
|
114
|
+
openclaw gateway restart
|
|
119
115
|
```
|
|
120
116
|
|
|
121
117
|
Example — hide token counts, show model name:
|
package/README.md
CHANGED
|
@@ -87,35 +87,31 @@ openclaw gateway restart
|
|
|
87
87
|
|
|
88
88
|
| 配置项 | 默认 | 说明 |
|
|
89
89
|
|--------|------|------|
|
|
90
|
-
| `footer.
|
|
91
|
-
| `footer.
|
|
92
|
-
| `footer.
|
|
93
|
-
| `footer.
|
|
94
|
-
| `footer.
|
|
95
|
-
| `footer.
|
|
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 模式下默认开) |
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
**默认(简要):**
|
|
98
99
|
|
|
99
100
|
```
|
|
100
101
|
✅ · 8.3s · ↑ 19k ↓ 145 · 1% ctx
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
**详细模式(`footer.verbose true`):**
|
|
104
105
|
|
|
105
|
-
```
|
|
106
|
-
|
|
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
|
|
110
|
-
openclaw config set channels.feishu.footer.cache true
|
|
111
|
-
openclaw config set channels.feishu.footer.model true
|
|
112
|
-
openclaw gateway restart
|
|
106
|
+
```
|
|
107
|
+
已完成 · 耗时 8.3s · ↑ 19k ↓ 145 · 缓存 18k/1k (94%) · 上下文 19k/200k (10%) · claude-3-7-sonnet
|
|
113
108
|
```
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
开启详细模式:
|
|
116
111
|
|
|
117
|
-
```
|
|
118
|
-
|
|
112
|
+
```bash
|
|
113
|
+
openclaw config set channels.feishu.footer.verbose true
|
|
114
|
+
openclaw gateway restart
|
|
119
115
|
```
|
|
120
116
|
|
|
121
117
|
示例 — 关闭 token 展示,开启模型名称:
|
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("\u274C");
|
|
114789
|
-
enParts.push("\u274C");
|
|
114792
|
+
zhParts.push(verbose ? "\u51FA\u9519" : "\u274C");
|
|
114793
|
+
enParts.push(verbose ? "Error" : "\u274C");
|
|
114790
114794
|
} else if (isAborted) {
|
|
114791
|
-
zhParts.push("\u23F9");
|
|
114792
|
-
enParts.push("\u23F9");
|
|
114795
|
+
zhParts.push(verbose ? "\u5DF2\u505C\u6B62" : "\u23F9");
|
|
114796
|
+
enParts.push(verbose ? "Stopped" : "\u23F9");
|
|
114793
114797
|
} else {
|
|
114794
|
-
zhParts.push("\u2705");
|
|
114795
|
-
enParts.push("\u2705");
|
|
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(d);
|
|
114801
|
-
enParts.push(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) {
|