feat(assistant): #91 refonte Notion de la zone de discussion — question ancrée en haut, fil chronologique, étapes repliables, barre Copier/Ajouter
CI / lint (push) Successful in 1m23s
CI / security (push) Successful in 55s
CI / test (push) Successful in 2m55s
CI / build (push) Successful in 50s
CI / e2e (push) Successful in 10m58s

This commit is contained in:
2026-09-15 15:51:19 -04:00
parent 256f5a4a03
commit cdb4d29676
9 changed files with 4114 additions and 3936 deletions
+30 -16
View File
@@ -9434,22 +9434,30 @@ body.popup-mode .content-area {
.bookslm-activity.done .bookslm-activity-spinner,
.bookslm-activity.error .bookslm-activity-spinner { animation: none; border-top-color: currentColor; }
@keyframes bookslm-spin { to { transform: rotate(360deg); } }
.bookslm-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
/* The newest turn (the assistant's answer being written) is pinned to the
very top of the messages window via flex `order`, so a submitted post and
its live result stay visible regardless of auto-scroll and prior history. */
.bookslm-msg { display: flex; flex-direction: column; gap: 4px; }
.bookslm-msg.latest { order: -1; }
.bookslm-msg-meta { font-size: 10px; color: var(--text-secondary); opacity: 0.85;
/* Notion-style AI thread: only this zone scrolls; entries stack vertically
with generous spacing. The latest user post is anchored to the top of the
visible area on send (scrollIntoView block:start + scroll-margin). */
.bookslm-messages { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex;
flex-direction: column; gap: 24px; }
.bookslm-msg { display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 14px; }
.bookslm-msg.user { align-self: flex-end; max-width: 80%; }
.bookslm-msg.assistant { align-self: stretch; width: 100%; }
.bookslm-msg-meta { font-size: 11px; color: var(--text-secondary); opacity: 0.75;
padding: 0 2px; align-self: flex-start; user-select: none; }
.bookslm-copy-btn { align-self: flex-end; font-size: 10px; padding: 2px 8px;
border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
color: var(--text-secondary); cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.bookslm-msg:hover .bookslm-copy-btn { opacity: 1; }
.bookslm-copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.bookslm-bubble { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.bookslm-bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bookslm-bubble.assistant { align-self: flex-start; background: var(--surface2); color: var(--text-primary); border-bottom-left-radius: 4px; }
/* Hover-revealed action bar (Copier / Ajouter). */
.bookslm-msg-actions { display: flex; gap: 6px; margin-top: 4px; opacity: 0;
transition: opacity 0.15s; }
.bookslm-msg.user .bookslm-msg-actions { justify-content: flex-end; }
.bookslm-msg:hover .bookslm-msg-actions,
.bookslm-msg-actions:focus-within { opacity: 1; }
.bookslm-msg-action { display: inline-flex; align-items: center; gap: 5px;
font-size: 11px; padding: 3px 9px; border-radius: 6px; border: 1px solid transparent;
background: transparent; color: var(--text-secondary); cursor: pointer; }
.bookslm-msg-action:hover { background: var(--surface2); color: var(--text-primary);
border-color: var(--border); }
.bookslm-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.bookslm-bubble.user { align-self: flex-end; background: var(--surface2); color: var(--text-primary); border-bottom-right-radius: 6px; }
.bookslm-bubble.assistant { align-self: flex-start; background: transparent; padding: 0; width: 100%; max-width: 100%; color: var(--text-primary); }
.bookslm-bubble.assistant code { background: rgba(0,0,0,0.2); padding: 1px 4px; border-radius: 3px; font-size: 0.9em; }
.bookslm-bubble.assistant pre { background: rgba(0,0,0,0.3); padding: 10px; border-radius: 6px; overflow-x: auto; margin: 8px 0; }
.bookslm-sources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
@@ -9484,7 +9492,13 @@ body.popup-mode .content-area {
/* Agent-mode toggle in the header. */
.bookslm-header button.bookslm-btn-agent.active { color: var(--accent); background: var(--surface2); }
/* Tool-call trace shown above an assistant answer (agent mode). */
.bookslm-tool-trace { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
/* Agent tool calls collapse into a discreet “N steps” line (Notion-style). */
.bookslm-tool-trace { margin: 0 0 8px; }
.bookslm-tool-trace summary { font-size: 11px; color: var(--text-secondary);
cursor: pointer; user-select: none; list-style: none; }
.bookslm-tool-trace summary::before { content: '> '; }
.bookslm-tool-trace[open] summary { margin-bottom: 4px; }
.bookslm-tool-trace .bookslm-tool-line { padding-left: 12px; }
.bookslm-tool-line { font-size: 11px; color: var(--text-secondary); }
.bookslm-tool-line.failed { color: #f87171; }
/* Mutation confirmation card (two-step propose/apply). */