Comment by hemantv

Comment by hemantv

I built Codeblocks for myself because I wanted something more flexible—a chat client where I could control every aspect of how conversations work with AI.

The goal was to experiment with local LLMs and find novel ways they could help with my work. Along the way, it turned into a full desktop app with features I actually wanted: total privacy (everything on my machine), the ability to connect to any provider, smart context management that doesn't break long conversations, and deep customization.

While it's designed with local LLMs in mind, that's not a limitation—you can use any provider you like or mix and match as needed.

---

## Key Features

### Connect to Any LLM Provider

Use whatever works for you:

- OpenAI (GPT-4, GPT-4o, etc.) - Anthropic (Claude 3.5 Sonnet, Opus, Haiku) - Google Gemini - xAI (Grok) - OpenRouter (access to 100+ models) - Local models: Ollama, LM Studio - Any OpenAI-compatible API

Switch between providers whenever you want. Use different models for different tasks—GPT-4 for code, Claude for writing, local models when you want everything offline. Compare responses. No lock-in, just flexibility.

---

### Smart Context Management

Long conversations work the way they should—without falling apart or losing important details.

*How it works:*

- Recent messages stay fully intact - Older content gets summarized automatically (you can use a cheaper model for this if you want) - Images, code blocks, and attachments are handled intelligently - Real-time visual indicator shows your token usage

*You get to choose the strategy:*

- Keep everything until you hit the limit - Keep only recent messages - Auto-summarize older messages - Reference content without including the full text

The goal was to make it so you can chat through 100+ messages without thinking about token limits. The app figures out what to keep detailed, what to compress, and what to just reference.

---

### Conversation Workflows

*Forking:* See a message where you want to try a different direction? Just click it to branch off a new conversation from that point. The original stays intact, and you can explore freely.

*Regeneration:* Not happy with a response? Regenerate it—with the same model or switch to a different one. All versions stick around, so you can flip between them and see what works best.

*Multiple chats:* Keep several conversations going at once. Quick navigation through the sidebar makes it easy to jump between them.

*Model Control:* Configure which model to use per chat, set custom system prompts, and adjust temperature settings. Each conversation can have its own unique setup.

---

### Rich Text Editor

Powered by Lexical (Facebook's text editor):

- Full markdown support with live preview - Syntax highlighting for code - Drag-and-drop for images

Code blocks get syntax highlighting and one-click copying. Works great in both light and dark themes.

---

### Search & Organization

*Search:* Find anything instantly—across all your conversations, message versions, tags, everything. Results show up as you type.

*Tags:* Create custom tags with colors, throw multiple tags on each chat, filter by whatever you need. You can see which tags you're using most too.

*Filters:* Mix search with tags to zero in on exactly what you're looking for.

---

### Keyboard Shortcuts

Stay productive with hotkeys:

| Shortcut | Action | | -------- | ---------------- | | `⌘N` | New chat | | `⌘/` | Focus chat input | | `⌘⇧S` | Toggle sidebar | | `⌘T` | Tag manager | | `⌘F` | Search | | `⌘↵` | Send message | | `Esc` | Stop generation | | `⌘,` | Settings | | `?` | Show help |

---

### Privacy & Local Storage

Everything lives in `~/.codeblocks/` as JSON files on your computer. That's it. No cloud sync.

Your API keys? On your machine. Your conversations? On your machine. Want to go completely offline? Works perfectly with local models.

Backing up is as simple as copying the folder somewhere safe. The file format is readable JSON, so you're never locked in.

---

### Vision Support

Works with vision-enabled models (GPT-4o, Claude 3.5 Sonnet, Gemini):

- Attach images to messages - Smart context management for images - Configurable image inclusion strategies

---

### Customization

- Light/dark/auto themes - Custom colors and styling - Per-model temperature and context settings - Custom system prompts per chat - Configurable logging levels

---

## Tech Stack

Built with:

- *Electron 30* for desktop integration - *React 18 + TypeScript* for the UI - *Vite 5* for fast builds - *Lexical* for the rich text editor - *Vercel AI SDK* for unified LLM access - *Tailwind CSS 4* for styling - *Ant Design* components

Architecture: Local JSON storage, type-safe with Zod schemas, real-time streaming support, clean IPC separation.

---

## Current Limitations

It's an alpha, so there are definitely rough edges:

- Mostly tested on macOS, so Windows/Linux might be quirky - Schema changes might require manually migrating your data - Error handling could be better in some spots - No export/import UI yet (just copy the files manually for now) - Everything's in English only

Basically, it works well for me, but your mileage may vary. Feel free to report issues as you find them.

---

## What's Next

Planning to add:

- *Custom tools from UI* - Define your own tools that LLMs can call, directly from the interface - *Integrations from UI* - Connect to external services and APIs through a simple UI (no code required) - *Custom tools (programmatic)* - Write your own tools with full control for advanced use cases - *Chat folders* - Hierarchical organization with drag-and-drop - *Export/import* - Markdown export, backup automation - *Analytics* - Token tracking, cost estimates, usage stats

The idea is to make customization accessible—whether you want to click through a UI or write code, both options will be there.

---

## Feedback Welcome

This is an early alpha—still figuring things out. If you try it and have thoughts on what works, what doesn't, or what you'd like to see, please let me know!

Your input helps shape where this goes next.

---

## Who This Is For

Honestly? I built this for myself to experiment with local LLMs and try out ideas for how AI could help with my work. But it might be useful if you're:

- Someone who wants *full control* over how your AI conversations work - *Experimenting with local models* and want a solid interface for them - Looking to *switch between providers* or compare different models - Into *privacy* and want everything on your machine - The kind of person who likes to *customize things* and tweak settings

The flexibility is the whole point—use it however makes sense for you.

---

## Core Ideas

What I was going for:

1. *Your data stays yours* - Everything on your machine, under your control 2. *No lock-in* - Use any provider, switch whenever 3. *Context that works* - Smart management so long conversations don't break 4. *Flexibility* - Fork conversations, compare models, customize everything 5. *Built for local LLMs* - But works with anything

The whole project is about having options and being able to experiment freely.

Replies hemantv · 2025-10-26
Open on HN
Loading the discussion…

Domain filters

Stories from these domains are hidden from every list. Subdomains match too: blocking substack.com also hides danluu.substack.com.

    New collection

    Delete this collection?

    About YAVCHN

    YAVCHN is a reader for Hacker News and Lobsters, with articles and discussions in separate windows or Classic pages.

    Created by Paul Parks and built with PUDL.

    YAVCHN source code on GitHub

    Privacy policy · Terms of use

    Help

    Keyboard

    j / k
    Move down and up the story list. The arrow keys scroll whatever has focus.
    Enter
    Read the marked story in the article reader.
    ]
    Read the next story in the same article-reader applet. Back returns to the previous story.
    p
    Pin or unpin the marked story, which keeps it in Pinned.
    n / N
    Move to the next or previous top-level comment in the window in front.
    c
    Collapse or expand that comment.
    f
    Hide or show the story list.
    Esc
    Close a menu or this help.
    Access key m
    Go to the menu bar. Most browsers take it with Alt on Windows and Linux, and Safari with Control and Option.
    ?
    Show this help.

    Windows

    Each story opens in a window holding its article above its discussion; drag the bar between them to share the room differently. A window can be moved by its title bar, resized from any edge, snapped to a half or a corner by dragging it there, maximised, or minimised to the bar at the foot of the page. Use Window > New reader window to open an empty reader, or Story > Open in new reader window to open another reader for the current article. Docked readers keep their articles when you select another story from the sidebar. Minimized readers can be restored and reused for their site. A window's Next story link reads on down the list in the same window.

    A link in a comment or an article to another Hacker News or Lobsters thread opens that thread in a window too. A link to a single HN comment opens the comment above its replies.

    While a story's window is in front, the Story and Discussion menus in the menu bar hold its commands: pinning, Next story, sorting, collapsing every thread, jumping to the first new comment. Each window also remembers where you were in its article and discussion, so a reload, or Back to a story that Next took you past, finds your place again. Closing a window forgets it.

    The whole arrangement lives in the address, so a bookmark or a shared link brings it back, and Back undoes the last change. Moving between Hacker News, Lobsters, their lists, Pinned and Find changes only the list, and leaves the windows open.

    The list

    The pin at the start of a row keeps the story in Pinned, and the cross at its end hides it. Pinned can be narrowed by words in the title, site or author, by source, and to the stories you haven't opened yet, and ordered by when you pinned them, by points or by comments; the filters are part of the address, so a filtered view can be bookmarked. Scroll past the end of the list to load more. Domain filters, in the View menu, hide every story from a site.

    Collections are named lists of stories. Story > Add to collection files the story in front into one or more of them, and the Collections feed shows them all or one at a time; the menu that chooses collections also creates, renames, and deletes them. A note is your own text on a story. Choose Add note in a story's toolbar to write one; it saves as you type. Rows with a note carry the note mark, and the Notes feed lists every noted story and searches the text of your notes.

    Browsing view

    View > Windowed and View > Classic select the browsing view and save your default in this browser. Window view reuses a reader for each feed. Classic view opens stories and applets as pages. Open as a page is a one-off action that does not change your saved default. Use the Windowed selector to return an article to a window. Direct page links always open as pages.

    Applets

    The Applets menu in the menu bar holds three tools, each a window of its own. Replies to me takes your Hacker News user name and lists the replies to your last thirty comments and stories, checking again every three minutes while it is open, and marking what is new since you last marked them read. Look up a user opens a profile on Hacker News or Lobsters, with their submissions and recent comments, as a commenter's name in any discussion does; the bar at the top of a profile looks up someone else in the same window, and Back returns to the one before. Who is hiring? filters the posts of HN's monthly hiring threads by the words you type.

    They read only what the sites publish to everyone, so none of them asks for a login, and your user name stays in this browser anonymously and is included in retained applet state when signed in.

    Find

    Find takes any link and lists every time it was submitted to Hacker News and Lobsters, so you can read each discussion of it.

    About

    YAVCHN never sees your Hacker News or Lobsters login. The discussion is fetched from each site's public API; to vote or reply, follow the link above the discussion, or the arrow beside a comment, to the source's own site. Without a YAVCHN account, your data stays in this browser. When signed in, pins, collections, notes, blocked domains, and retained reading state are stored with your account and synchronized across devices. Hidden stories and layout stay in this browser. The privacy policy has the details.

    Open source: github.com/paulmooreparks/yavchn. Built with PUDL.