Skip to content

Commit 63f722b

Browse files
committed
feat: chat history memory — multi-turn AI conversations with LLM-powered search query refinement
- chatHistory array tracks user/assistant messages (10-turn cap) - LLM-powered refineSearchQuery() rewrites follow-up queries via M.requestAiTask() - fallback proper-noun extraction when model is unavailable - all 5 workers inject history between system prompt and user message - Clear Chat resets conversation memory - consolidated worker files to public/ (deleted 6 root-level duplicates) - fixed worker shadowing bug where public/ copies overrode root source files
1 parent 4b269cf commit 63f722b

15 files changed

+434
-1613
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ TextAgent has undergone significant evolution since its inception. What started
459459

460460
| Date | Commits | Feature / Update |
461461
|------|---------|-----------------|
462+
| **2026-03-13** | | 💬 **Chat History Memory** — AI chat now maintains conversation context across turns; `chatHistory` array tracks user/assistant messages (10-turn cap); LLM-powered `refineSearchQuery()` rewrites follow-up questions into self-contained web search queries via `M.requestAiTask()`; fallback proper-noun extraction when model is busy; all 5 workers (Qwen, Groq, OpenRouter, Gemini, LFM) inject history between system prompt and user message; "Clear Chat" resets memory; consolidated worker files to `public/` (deleted 6 root-level duplicates that shadowed source in Vite dev) |
462463
| **2026-03-13** | | 🔍 **4 New Search Providers** — added Tavily (AI-optimized, returns clean summarized results for LLM injection, 1,000/mo free), Google Custom Search Engine (official Google results, 100/day free), Wikipedia API (free encyclopedia search), and Wikidata API (free structured knowledge); total providers now 7; updated all dropdown selectors (AI panel, AI cards, Agent cards); Wikipedia/Wikidata skip API key prompt |
463464
| **2026-03-13** | | 🔍 **Search thinking block** — web search results now appear in a collapsible "thinking" `<details>` block *before* the AI response streams; two-phase UX: spinner appears instantly when search starts, populates with results (or "no results") when complete; source citation pills below; removed duplicate inline search details from AI response bubbles; fixed duplicate user message bug in `sendToAi()` dedup check |
464465
| **2026-03-13** | | 📐 **LaTeX coding block** — new `📐 LaTeX` toolbar button in Coding dropdown inserts `$$...$$` display math blocks; default template `\frac{\sqrt{2025} + \sqrt{3025}}{\sqrt{25}}` evaluates to 20 via Nerdamer; MathJax renders in preview; Playwright test added |

ai-worker-gemini.js

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)