feat(sidebar+assistant): filtre Recents/Sauvegardes (#99), pastille Deep Research (#100) et icone du bouton + (BUG-049)
CI / lint (push) Failing after 1m20s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 59s

This commit is contained in:
2026-09-16 20:16:41 -04:00
parent 8f26a418a9
commit 4231f2e929
22 changed files with 491 additions and 80 deletions
+25
View File
@@ -1908,6 +1908,31 @@ async function main() {
b._panel.remove();
});
await test("ext menu Deep Research adds a chip instead of composer text", async () => {
localStorage.clear();
document.body.replaceChildren();
const b = new BooksLM();
b._panel = b._render();
document.body.appendChild(b._panel);
const ta = b._panel.querySelector("textarea");
ta.value = "";
b._toggleExtMenu();
const btn = b._panel.querySelector('.bookslm-ext-item[data-ext-id="deep_research"]');
assert.ok(btn, "Deep Research entry present in the + panel");
btn.click();
await sleep(20);
const chip = b._panel.querySelector(".bookslm-chip-deep-research");
assert.ok(chip, "a Deep Research chip is added");
assert.equal(ta.value, "", "the composer stays empty (no injected directive)");
assert.equal(b._activeDeepResearch, true, "the deep-research flag is set");
// Removing the chip clears the flag.
chip.querySelector(".bookslm-chip-remove").click();
assert.ok(!b._panel.querySelector(".bookslm-chip-deep-research"), "the chip is removed");
assert.equal(b._activeDeepResearch, false, "the flag is cleared with the chip");
b._panel.remove();
localStorage.clear();
});
// ── Summary ──
console.log(`\n${passCount}/${testCount} tests passed`);
if (passCount !== testCount) {