-
Notifications
You must be signed in to change notification settings - Fork 40
feat: LLM memory window.llmMemory #97
Copy link
Copy link
Open
Labels
UI/UXRelated to designRelated to designelectronRelated to electron.jsRelated to electron.jsenhancementNew feature or requestNew feature or requestllmRelated to aiRelated to aipriority: highFor important issues that affect many users or major functionality of the projectFor important issues that affect many users or major functionality of the project
Metadata
Metadata
Assignees
Labels
UI/UXRelated to designRelated to designelectronRelated to electron.jsRelated to electron.jsenhancementNew feature or requestNew feature or requestllmRelated to aiRelated to aipriority: highFor important issues that affect many users or major functionality of the projectFor important issues that affect many users or major functionality of the project
This feature adds opt-in memory so the browser can remember prompts/responses across P2P apps and improve continuity.
Summary
llm.json.llm.json.Implementation
llm.jsonstorageSchema
Example:
{ "version": 1, "entries": [ { "ts": "2025-11-18T00:00:00.000Z", "appId": "p2p-editor", "sessionId": "f4c2…", "role": "user", "content": "Create a page with 🕸️…", "model": "qwen2.5-coder:3b", "meta": { "tokens": { "input": 42, "output": 0 } } }, { "ts": "2025-11-18T00:00:02.000Z", "appId": "p2p-editor", "sessionId": "f4c2…", "role": "assistant", "content": "<html>…</html>", "model": "qwen2.5-coder:3b", "meta": { "tokens": { "input": 0, "output": 310 } } } ] }Integrations
Unified preload bridge (
src/pages/unified-preload.js):window.llmMemoryAPI:add(entry),list({ appId, limit }),clear()respecting the settings toggle.P2P Editor (
src/pages/p2p/editor/ai-generator.js):saveLLMHistory({ appId, role, content, model, sessionId }).AI Chat (
src/pages/p2p/ai-chat/index.html):Reusable History component
src/pages/p2p/components/llm-history.jsappId, search incontent, limit N.onSelect(entry)for restore/edit.Settings (opt-in toggle)
src/settings-manager.js:settings.llm.memoryEnabled: boolean (defaultfalse).Clear history
resetP2PDatainsrc/settings-manager.jsto also removellm.json(and recreate empty on next use).Docs
LLM.mdwith the newwindow.llmMemoryAPI with examples.Privacy
Limitations
cc @RangerMauve