fix: input alignment

This commit is contained in:
Alexej Wolff
2026-02-11 01:07:43 +01:00
parent c404b1e17c
commit 2bfe8d95cc
9 changed files with 169 additions and 91 deletions
+2 -2
View File
@@ -493,7 +493,7 @@ app.get("/api/admin/stats", requireAuth, async (req, res) => {
// Считаем статистику для каждой истории
const storyStats = userStories.map((story) => {
const session = userSessions.find(
(s) => s.storyId === story._id.toString()
(s) => s.storyId === story._id.toString(),
);
const messages = session?.messages || [];
const messageCount = messages.length;
@@ -501,7 +501,7 @@ app.get("/api/admin/stats", requireAuth, async (req, res) => {
// Примерный подсчёт токенов (1 токен ≈ 3 символа для русского)
const totalChars = messages.reduce(
(sum, msg) => sum + (msg.content?.length || 0),
0
0,
);
const tokens = Math.round(totalChars / 3);