From 38a1399c386176bae196455270d1cf84fac673a1 Mon Sep 17 00:00:00 2001 From: Serge Alex Date: Mon, 2 Nov 2026 07:11:42 +0300 Subject: [PATCH] feat-sse-len-in-meta --- injected/chat-logger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/injected/chat-logger.js b/injected/chat-logger.js index ea6ea1c..2878ed8 100644 --- a/injected/chat-logger.js +++ b/injected/chat-logger.js @@ -206,7 +206,7 @@ accum: accum, delta: delta, chars: ctxChars, - chat_id: chatId, parent_id: pid, sse_calls: sseCalls, req_keys: reqKeys, est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 + chat_id: chatId, parent_id: pid, sse_calls: sseCalls, sse_len: assistant.length, sse_len: assistant.length, req_keys: reqKeys, est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 } lines.push(JSON.stringify(meta)); try { window.dispatchEvent(new CustomEvent('dshmem:metrics', { detail: JSON.stringify({ accum: accum, delta: delta, chars: ctxChars, est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 }) })) } catch (e) { } }