paseo-dsh 0.2.13 → 0.2.14
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/client/stream-stats.tsx +3 -8
- package/package.json +1 -1
package/client/stream-stats.tsx
CHANGED
|
@@ -32,13 +32,6 @@ function formatNumber(value: number): string {
|
|
|
32
32
|
return String(Math.round(value)).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function formatCompact(value: number): string {
|
|
36
|
-
if (value >= 1_000_000) return `${(value / 1_000_000).toFixed(1)}M`;
|
|
37
|
-
if (value >= 10_000) return `${Math.round(value / 1000)}K`;
|
|
38
|
-
if (value >= 1000) return `${(value / 1000).toFixed(1)}K`;
|
|
39
|
-
return String(Math.round(value));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
35
|
function contextLine(data: StreamStats): string | undefined {
|
|
43
36
|
if (data.contextUsed === undefined || data.contextMax === undefined || data.contextMax <= 0) {
|
|
44
37
|
return undefined;
|
|
@@ -79,7 +72,9 @@ function StreamStatsRow({ item, theme, layout }: PluginTimelineItemProps<StreamS
|
|
|
79
72
|
}
|
|
80
73
|
if (data.firstTokenMs !== undefined) summary.push(`首字 ${formatLatency(data.firstTokenMs)}`);
|
|
81
74
|
if (data.tokensPerSecond !== undefined) summary.push(`${Math.round(data.tokensPerSecond)} tok/s`);
|
|
82
|
-
if (data.
|
|
75
|
+
if (data.contextUsed !== undefined && data.contextMax !== undefined && data.contextMax > 0) {
|
|
76
|
+
summary.push(`上下文 ${Math.round(Math.min(1, data.contextUsed / data.contextMax) * 100)}%`);
|
|
77
|
+
}
|
|
83
78
|
if (data.cacheHit !== undefined) summary.push(`缓存命中 ${Math.round(data.cacheHit * 100)}%`);
|
|
84
79
|
if (summary.length === 0 && data.firstTokenMs !== undefined) {
|
|
85
80
|
summary.push(`首字 ${formatLatency(data.firstTokenMs)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "DeepSeek Harness (dsh) as a native Paseo provider: question cards, plan mode, thinking levels, steering, images and a real slash menu. 把 DeepSeek Harness 接成 Paseo 原生 provider。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paseo",
|