diff --git a/backend/src/controllers/assistantController.js b/backend/src/controllers/assistantController.js index b16beac..d30c12b 100644 --- a/backend/src/controllers/assistantController.js +++ b/backend/src/controllers/assistantController.js @@ -707,7 +707,7 @@ async function ask(req, res) { const pageCtx = String((req.body && req.body.context) || '').slice(0, 4000); const mode = ['hint', 'check'].includes(req.body && req.body.mode) ? req.body.mode : 'answer'; let history = (req.body && req.body.history); - history = Array.isArray(history) ? history.slice(-6) : []; + history = Array.isArray(history) ? history.slice(-14) : []; const hits = searchFaq(q, 3); const faqJson = hits.map(h => ({ id: h.id, q: h.q, a: h.a, url: h.url || null })); @@ -769,7 +769,7 @@ async function askStream(req, res) { const pageCtx = String((req.body && req.body.context) || '').slice(0, 4000); const mode = ['hint', 'check'].includes(req.body && req.body.mode) ? req.body.mode : 'answer'; let history = (req.body && req.body.history); - history = Array.isArray(history) ? history.slice(-6) : []; + history = Array.isArray(history) ? history.slice(-14) : []; const hits = searchFaq(q, 3); const faqJson = hits.map(h => ({ id: h.id, q: h.q, a: h.a, url: h.url || null })); sse('meta', { answers: faqJson }); diff --git a/frontend/js/assistant.js b/frontend/js/assistant.js index 0d10f79..e03a65f 100644 --- a/frontend/js/assistant.js +++ b/frontend/js/assistant.js @@ -301,7 +301,9 @@ // плавное появление сообщений reduceMotion ? '' : '.asst-msg{animation:asstMsgIn .26s cubic-bezier(.4,0,.2,1);}', '@keyframes asstMsgIn{from{opacity:0;transform:translateY(7px);}to{opacity:1;transform:translateY(0);}}', - '.asst-memnote{font-size:.66rem;color:#9aa5b4;margin-top:9px;line-height:1.45;border-top:1px solid rgba(15,23,42,.05);padding-top:8px;}', + '.asst-memnote{display:flex;gap:7px;align-items:flex-start;font-size:.66rem;color:#9aa5b4;margin-top:9px;line-height:1.45;border-top:1px solid rgba(15,23,42,.05);padding-top:9px;}', + '.asst-memnote .ic{width:13px;height:13px;flex:none;margin-top:1px;color:#b6abdd;}', + '.asst-memnote b{color:#7e3eca;font-weight:700;}', '.asst-bubble.open{opacity:1;transform:translateY(0);pointer-events:auto;}', '.asst-x{position:absolute;top:12px;right:12px;width:28px;height:28px;border:none;background:transparent;color:#94a3b8;z-index:3;', ' cursor:pointer;border-radius:8px;font-size:19px;line-height:1;transition:all .14s;}', @@ -590,7 +592,8 @@ '
' + chips + modes + '