In-Situ Recursive Discussions for AI-Generated Markdown (Zero-Login Demo)
Traditional AI chat interfaces (like ChatGPT, Claude, and Gemini) have a fundamental UX flaw: everything flows to the bottom. If an LLM writes a 600-word response and you have a doubt about a sentence at the top, you ar
Traditional AI chat interfaces (like ChatGPT, Claude, and Gemini) have a fundamental UX flaw: everything flows to the bottom.
If an LLM writes a 600-word response and you have a doubt about a sentence at the top, you are forced to scroll to the very bottom, manually re-quote the text, and ask your questionβcompletely breaking your reading flow.
To solve this, I built @zefina/inline-discussions: an open-source React engine that brings Google Docs-style contextual threads directly inside AI Markdown responses.
1) Video Demo:
#ai #uxdesign #generativeai #productivity #llm #zefina #techinnovation #softwareengineering #sarvamai | Jagath Saradagi
Why are AI chats still linear? π€― Weβve all felt the "Chatbot Loop." Youβre reading a long, complex AI response. You get a doubt in paragraph one, you ask a question, and the answer appears... at the very bottom. Then comes the scroll: Scroll down for the clarification. Scroll back up to find your place. Repeat. π It breaks your cognitive flow and wastes your time. I built Zefina to fix this. I call it the "No-Nav" Experience. Instead of forcing you to the bottom, Zefina lets the AI answer right next to your doubt. It dynamically creates space inside the message, branches the conversation, and "slices" the context so the AI stays hyper-focused on exactly what youβre looking at. No more losing your place. No more endless scrolling. Just a recursive knowledge tree that grows with your curiosity. π³β¨ π‘ A common real-life pain point this solves: "Imagine youβve just finished studying an entire subject unit using an AI. You asked several follow-up questions to clarify complex parts. A week later, you return to revise. You remember asking for a simpler explanation of a specific paragraph, but that explanation is now buried at the bottom of a massive chat. To find it, you have to scroll through screens of text, find the answer, and then jump back up to see the original context. With Zefina, those clarifications are pinned exactly where they belongβright next to the source text. Revision becomes a seamless journey." βοΈ Technical Note: Zefina is built with React and Framer Motion. The recursive brain is powered by Groq (Llama 3.3 70B), optimized with custom context-slicing logic for precise intra-message threading. Iβm looking for feedback from fellow builders and researchersβhow do you handle long AI conversations today? Would this recursive approach change how you work? Letβs discuss! π I'm curious to get the perspective of the experts building the future of LLM interfaces. What do Andrej Karpathy , Logan Kilpatrick , Wulfie Bain or Amjad Masad think about moving away from linear scroll toward recursive knowledge trees? I'd also love to hear from the local leaders at Vivek Raghavan and Pratyush Kumar βon how this 'context-slicing' could optimize Indic LLM workflows. #AI #UXDesign #GenerativeAI #Productivity #LLM #Zefina #TechInnovation #SoftwareEngineering #SarvamAI
2)Live Interactive Playground:
3)GitHub Repository:
JagathSaradagi
/
inline-discussions
In-Situ Recursive Discussions for AI-generated Markdown Responses
@zefina/inline-discussions
Recursive discussions, anchored directly inside AI-generated Markdown responses.
Traditional AI chat interfaces force users to ask follow-up questions at the very bottom of a conversationβeven when their doubt concerns one particular sentence in a long response.
@zefina/inline-discussions solves this by placing discussions where the question originates. Users can select any passage in an AI-generated Markdown response, open an inline input at that exact sentence, and create nested, recursive discussions without modifying or breaking the original Markdown response.
Features
- π― Precise Text Anchoring: Maps browser DOM selections back to exact raw Markdown source offsets using AST character maps.
- π³ Sibling-Block AST Injection: Splits Markdown paragraphs into valid sibling blocks at anchor boundaries. Original Markdown source text remains completely immutable.
- π Recursive Threading: Supports infinite nesting of discussions inside discussions (discussions branching from discussions).
- π§© Zero-Host Lock-In: Decoupled from any database, AI model, or backend. Theβ¦
How It Works
Highlight Any Sentence: Select any text in an AI response to open an in-situ ask box directly beneath that sentence.
DOM-to-AST Source Mapping: The engine maps browser text selections back to raw Markdown source coordinates using AST character maps.
Sibling-Block AST Injection: Instead of illegally nesting
tags, the compiler splits the parent paragraph into valid sibling blocks.
Arbitrary Recursion: You can highlight text inside a nested clarification at Depth 1 to branch a Depth 2 discussion, creating structured conversation trees.
The engine is completely headless, works with any AI model or backend, and is AGPL-3.0 dual-licensed.
Check out the interactive playground and let me know your thoughts!
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.