Akarsh Gopal

TreeChat

Branching AI chat: select any passage to explore it in a side branch, then bring the takeaway back.

Role
Personal project
Started
Sep 2026
Stack
TypeScript, React, Vite, Tailwind CSS
Licence
MIT
Links
treechat.ccSource on GitHub
TreeChat: a conversation on the left, with a branch about one highlighted passage open in its own lane on the right
treechat.cc in demo mode, with a branch open beside the passage it grew from.

What it is

Six one-tap lenses on any passage: Explain, Example, Source?, Challenge, Simpler, Deeper.

A branching AI chat. Select any passage in a reply to explore it in a side branch that opens in its own lane beside the passage, then bring the takeaway back to the conversation it came from.

There is no TreeChat server and no account. Add an OpenRouter key for real answers, or try it straight away with demo replies.

How branching works

Downward is time, rightward is depth. Every thread on the open path gets a full-height lane with its own composer, and a line in the gutter ties a branch to the passage it grew from as they scroll. Bring back drafts an editable takeaway and appends it to the parent conversation, keeping the branch one click away.

Long threads are folded into a running summary in the background once older messages grow past roughly 8k tokens, and branches get their parent’s summary plus the turns before the passage.

Documents, locally

PDFs, Markdown and text files are indexed in the browser: split into chunks, embedded with a small sentence-embedding model running in a Web Worker, and stored in IndexedDB. Files, text and vectors never leave the browser; only the retrieved excerpts are sent with your question.