|
41 | 41 | } |
42 | 42 | .thinking-badge:hover { border-color: var(--accent); color: var(--accent2); background: var(--abg); } |
43 | 43 | .thinking-badge svg { width: 11px; height: 11px; flex-shrink: 0; } |
44 | | -.mw.assistant.thinking-msg { background: transparent; padding: 2px 12px 2px 44px; } |
| 44 | +.mw.assistant.thinking-msg { background: transparent; padding: 2px 12px 2px 34px; } |
45 | 45 | .mw.assistant.thinking-msg .msg { background: transparent; box-shadow: none; padding: 0; } |
46 | 46 |
|
47 | | -/* ─── Tool result block ─── */ |
48 | | -.tool-result-block { |
49 | | - border: 1px solid var(--border); border-radius: var(--r-sm); |
50 | | - background: var(--tool-bg); font-size: 11px; overflow: hidden; margin: 2px 0; |
51 | | -} |
52 | | -.tr-header { |
53 | | - display: flex; align-items: center; gap: 6px; padding: 5px 10px; |
54 | | - cursor: pointer; user-select: none; color: var(--muted); |
55 | | - transition: background .1s; font-family: var(--font-mono); |
56 | | -} |
57 | | -.tr-header:hover { background: var(--s2); } |
58 | | -.tr-header .tr-arrow { font-size: 10px; transition: transform .2s; flex-shrink: 0; } |
59 | | -.tr-header.open .tr-arrow { transform: rotate(90deg); } |
60 | | -.tr-content { margin: 0; padding: 8px 10px; border-top: 1px solid var(--border); overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow-y: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text); display: none; } |
61 | | -.tr-content.open { display: block; } |
62 | | -.mw.user.tool-result-msg { background: transparent; padding: 2px 12px; } |
63 | | -.mw.user.tool-result-msg .msg { background: transparent; box-shadow: none; padding: 0; border: none; } |
64 | 47 |
|
65 | 48 | /* ─── Thinking modal ─── */ |
66 | 49 | .thinking-modal-body { |
@@ -7553,28 +7536,6 @@ <h3 id="rlModalTitle">Ліміт вичерпано</h3> |
7553 | 7536 | return w; |
7554 | 7537 | } |
7555 | 7538 |
|
7556 | | - // ── Tool result: render as collapsible block ── |
7557 | | - if (m.type === 'tool_result') { |
7558 | | - const w = document.createElement('div'); |
7559 | | - w.className = 'mw user tool-result-msg'; |
7560 | | - if (m.id) w.dataset.msgId = String(m.id); |
7561 | | - const raw = m.content || ''; |
7562 | | - const lines = raw.split('\n'); |
7563 | | - const lineCount = lines.length; |
7564 | | - const preview = lines.slice(0, 2).join('\n'); |
7565 | | - const block = document.createElement('div'); |
7566 | | - block.className = 'tool-result-block'; |
7567 | | - const toolLabel = m.tool_name ? escH(m.tool_name) + ' result' : 'tool result'; |
7568 | | - block.innerHTML = `<div class="tr-header" onclick="this.classList.toggle('open');this.nextElementSibling.classList.toggle('open')"><span class="tr-arrow">▶</span><span style="font-size:11px;color:var(--muted)">${toolLabel}</span><span style="margin-left:4px;color:var(--text);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${escH(preview.substring(0,80))}${lineCount > 2 ? '…' : ''}</span><span style="font-size:10px;color:var(--muted);flex-shrink:0;margin-left:6px">${lineCount} line${lineCount !== 1 ? 's' : ''}</span></div><pre class="tr-content">${escH(raw)}</pre>`; |
7569 | | - const div = document.createElement('div'); |
7570 | | - div.className = 'msg'; |
7571 | | - div.appendChild(block); |
7572 | | - w.appendChild(div); |
7573 | | - if (prepend) { const f = msgsEl.querySelector('.mw, .agent-team-card'); if (f) msgsEl.insertBefore(w, f); else msgsEl.prepend(w); } |
7574 | | - else msgsEl.appendChild(w); |
7575 | | - return w; |
7576 | | - } |
7577 | | - |
7578 | 7539 | const w = document.createElement('div'); |
7579 | 7540 | w.className = `mw ${m.role}`; |
7580 | 7541 | if (m.id) w.dataset.msgId = String(m.id); |
@@ -7810,7 +7771,7 @@ <h3 id="rlModalTitle">Ліміт вичерпано</h3> |
7810 | 7771 | // Single mode: scan backward for consecutive tool rows before this text message |
7811 | 7772 | const tc = {}; |
7812 | 7773 | for (let j = i - 1; j >= 0; j--) { |
7813 | | - if (raw[j].type === 'thinking' || raw[j].type === 'tool_result') continue; |
| 7774 | + if (raw[j].type === 'thinking') continue; |
7814 | 7775 | if (raw[j].type !== 'tool' || raw[j].agent_id) break; |
7815 | 7776 | const tn = raw[j].tool_name || 'tool'; |
7816 | 7777 | tc[tn] = (tc[tn] || 0) + 1; |
|
0 commit comments