minecodex 2.0.23 → 2.0.24
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.
|
@@ -109,15 +109,15 @@ export function sessionStatusSnapshot(state, threadId) {
|
|
|
109
109
|
const turnSpeeds = new Map();
|
|
110
110
|
for (const sample of state.speedMeasurements) {
|
|
111
111
|
const elapsed = sample.end - sample.start - boundedToolWaitMs(sample.tools, sample.start, sample.end, sample.outputs);
|
|
112
|
-
if (!sample.turnId || elapsed
|
|
112
|
+
if (!sample.turnId || !Number.isFinite(elapsed) || elapsed <= 0) continue;
|
|
113
113
|
const turn = turnSpeeds.get(sample.turnId) ?? { tokens:0, ms:0, samples:0 };
|
|
114
114
|
turn.tokens += sample.output;
|
|
115
115
|
turn.ms += elapsed;
|
|
116
116
|
turn.samples += 1;
|
|
117
117
|
turnSpeeds.set(sample.turnId, turn);
|
|
118
118
|
}
|
|
119
|
-
//
|
|
120
|
-
const recentTurns = [...state.turns].filter(id => turnSpeeds.has(id)).slice(-
|
|
119
|
+
// 按回合顺序取最近五个有效回合;同轮多步合并,无数据的回合不占名额。
|
|
120
|
+
const recentTurns = [...state.turns].filter(id => turnSpeeds.has(id)).slice(-5);
|
|
121
121
|
for (const id of recentTurns) {
|
|
122
122
|
const turn = turnSpeeds.get(id);
|
|
123
123
|
decodeTokens += turn.tokens;
|
|
@@ -7,14 +7,14 @@ const copyByLocale = { "zh-CN": {
|
|
|
7
7
|
firstToken: "平均首字延迟", input: "输入", cached: "缓存输入", output: "输出",
|
|
8
8
|
sum: "合计", capacity: "窗口容量", contextShare: "上下文占用", compactions: "压缩次数",
|
|
9
9
|
instructions: "指令", messages: "消息", toolHistory: "工具交互", other: "未分类",
|
|
10
|
-
speedHelp: "关于 TPS", speedInfo: "GPT 等模型不公开完整思考过程及逐 Token 生成时间。TPS 取最近
|
|
10
|
+
speedHelp: "关于 TPS", speedInfo: "GPT 等模型不公开完整思考过程及逐 Token 生成时间。TPS 取最近 5 个有有效数据的回合,不足 5 轮时按已有数据计算。它是基于可观测事件估算的体感响应速度,仅供参考,不代表模型真实的 Token 生成速度。",
|
|
11
11
|
}, en: {
|
|
12
12
|
turns: "turns", steps: "steps", speed: "TPS", cache: "Cache", cacheDetail: "Cache hit",
|
|
13
13
|
statistics: "Session stats", usage: "Token usage", context: "Context", total: "Total",
|
|
14
14
|
firstToken: "Avg first token", input: "Input", cached: "Cached input", output: "Output",
|
|
15
15
|
sum: "Sum", capacity: "Window size", contextShare: "Context used", compactions: "Compactions",
|
|
16
16
|
instructions: "Instructions", messages: "Messages", toolHistory: "Tool activity", other: "Unclassified",
|
|
17
|
-
speedHelp: "About TPS", speedInfo: "Models such as GPT do not expose their full reasoning process or per-token generation timing. TPS uses the latest
|
|
17
|
+
speedHelp: "About TPS", speedInfo: "Models such as GPT do not expose their full reasoning process or per-token generation timing. TPS uses the latest 5 turns with valid timing data, or fewer if unavailable. It estimates perceived response speed from observable events, rather than the model’s actual token generation speed.",
|
|
18
18
|
} };
|
|
19
19
|
function selectedCopy() {
|
|
20
20
|
const language = document.documentElement.lang || navigator.languages?.[0] || navigator.language || "en";
|