Skip to content

Repository files navigation

Coda — Long-Term Memory for OpenCode

A memory layer for OpenCode AI sessions. It imports session history from Qwen Code and OpenCode, structures it into searchable JSON, and provides a React dashboard to browse everything.

How it helps

Instead of the AI starting fresh every session, this preserves context across sessions — past decisions, project patterns, preferences, and command history. It auto-generates PERSONAL_CONTEXT.md which OpenCode reads at session start, and produces per-project summary files for targeted context injection.

Quick Start

git clone <your-repo>
npm install
npm run import   # first run exports all sessions (can be slow)
npm run dev      # start the React dashboard
  • First import — exports all ~275+ sessions from Qwen Code and OpenCode
  • Subsequent imports — incremental, only new/changed sessions

How it works

Qwen Code JSONL  ──┐
OpenCode SQLite  ──┤──▶ import.js ──▶ src/data/*.json ──▶ React Dashboard
PERSONAL_CONTEXT.md ─┘                                    └──▶ AI context injection

The import script reads from your local Qwen Code data (/mnt/internal/.qwen/) and OpenCode sessions (via opencode export), normalizes them, and writes structured JSON to src/data/. It also generates PERSONAL_CONTEXT.md with an overview of your projects and recent activity.

Customize your profile

Edit your details in the "My Context" tab of the dashboard, or edit src/data/personal-context.json directly, then run npm run import to regenerate everything.

Project structure

Component Path
Import script scripts/import.js
DB query helper scripts/query-sessions.py
Context editor helper scripts/edit-context.js
Session data (JSON) src/data/*.json
Project summaries src/data/project-summaries/*.md
Dashboard UI src/App.jsx + src/components/*.jsx
Personal context PERSONAL_CONTEXT.md

Important

All session data stays local on your machine. Personal identity information lives only in src/data/personal-context.json and PERSONAL_CONTEXT.md — both are gitignored by default so you can safely push the framework to GitHub.

About

A memory layer for OpenCode AI sessions. It imports session history from Qwen Code and OpenCode, structures it into searchable JSON, and provides a React dashboard to browse everything.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages