Repository navigation
Our largest update ever - Loach v1.6.0 with the Library, sources sized to your context window, HTML preview and macOS improvements #50
ztcs-software
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Loach v1.6.0 is the largest update Loach has ever had - roughly twice the size of any release before it. Most of it is one idea: letting your models work with your own material. The new Library keeps your notes, documents and web pages in one place, attaches them to any chat or Space, and sends the model only as much as fits its context window, with search that works by keyword out of the box and by meaning once you add an embedding model. Around it come HTML previews in the code canvas, images scaled down before they cost you thousands of tokens, ten new slash commands and a Loach that finally feels at home on macOS.
👉 Download Loach v1.6.0
or update directly from the app in
Settings → Updates.The Library
The Library is a new page in the sidebar for everything you hand your models: texts you write or paste right in the app (Markdown works), files - text and code, PDFs, Word documents and images, up to 20 MB each - and web links. A link is fetched once and kept as a dated snapshot of the page's text, and
Refreshfetches it again when the page changes. Group items into datasets, like "Thesis research", and a whole set attaches in one click. A dataset only groups items, it doesn't copy them, so one item can sit in as many datasets as you like.To use something in a chat, click the + next to the message box and choose
From Library, or type#and a few letters to pick it inline. Sources are linked, not copied: fix a typo in a Library text and every chat and Space using it sees the new version on its next message. It works the other way too - a reply worth keeping goes to the Library from its…menu, and so do the files attached to any of your messages. Deleting an item tells you first which datasets, Spaces and chats are using it.Sources sized to the context window
Pasting a whole document into a prompt works until it doesn't. Small sources still go to the model in full, in the system prompt, where they stay the same from turn to turn - so a local model's prompt cache keeps them and the next reply starts fast. Once your sources outgrow half the context window, Loach switches to excerpts: for each message it finds the passages most relevant to it (and to your previous question, so a short follow-up still finds its subject) and sends only those. Excerpts are picked again for every message, so they don't pile up in the history.
That's the
Automode, and it's the default. TheSourceschip next to the message box also offersFull textandExcerptsif you'd rather decide yourself. Every reply that drew on sources says how, like "Read 3 sources in full" or "Used 6 excerpts from 3 sources", and expanding it shows which sources and the exact excerpts the model saw - so you can tell whether a wrong answer came from the model or from what it was given. One tip for OpenAI-compatible servers: they don't tell Loach how big their window is, so it assumes 32k. If your model's window is different, set the context length in the parameters panel. It isn't sent to the server, but it's what your sources are sized by.Search by keyword and by meaning
Every source is indexed for keyword search the moment you add it - no setup, nothing leaves your machine, and accents are folded, so
geslafindsgęślą. Keyword search only finds passages that share your words, though. For search by meaning, which finds the passage that answers your question even when it's phrased differently, add an embedding model inSettings → Library.Download & usepulls a small one into Ollama in one click (EmbeddingGemma and a few others are suggested), which keeps everything local. You can also use the OpenAI-compatible endpoint fromSettings → Providers- just know that the text of your sources, and of each message that searches them, then goes to that endpoint, even in chats with a local model.Indexing runs in the background and keyword search keeps working meanwhile. If the embedding model stops answering, searches fall back to keywords instead of every message waiting on it, and the reply's sources chip tells you so. Chinese, Japanese and Thai text isn't split into words, so for those languages an embedding model makes a real difference.
Spaces use the Library too
A Space's
Sourcestab now takes Library items and whole datasets next to the files you upload to it, shows how much of the context window they take, and has a switch on each one to pause it without removing it. The newSettingstab gathers what used to be spread around: the Space's default model, memory auto-save, source mode and image scaling. Spaces made before 1.6 keep sending their sources in full, exactly as they did before - switching them toAutois up to you, so nothing changes under your feet after the update.HTML preview
Ask a model for a landing page or a small widget and you can now see it without saving a file first. HTML code blocks get a
Previewbutton, and the code canvas aCode / Previewswitch, for code blocks and.htmlattachments alike. The page renders in a sandbox on an origin of its own: it can't reach Loach, your chats or your files, can't open windows or navigate away, and runs offline, so nothing it links to on the web loads. A page built on a CDN library like Tailwind or Chart.js shows without it.Scripts are off when a page first opens, so you see its markup and styles only. If you want it to actually run,
Run scriptsturns them on for that page alone, andReloadstarts it over. One caveat on macOS and Linux: the preview shares Loach's own thread there, so a script stuck in an endless loop freezes the app until you quit it. The button's tooltip says so too.Image scaling
A full-size phone photo costs thousands of tokens, and many local vision models read it worse, not better. So Loach now scales images down before they're sent, to 1024 px on the longest side by default. The original stays in your chat at full size - only the copy the model gets is smaller.
Choose
Scale down(to a pixel cap or a percentage of the original) orOriginalinSettings → Features. Library images have their own setting inSettings → Library, and a Space'sSettingstab and a chat's parameters panel can override both, withDefaultmeaning "follow the level above". If you work with screenshots full of small text, the per-chat override is the one to reach for.More slash commands
/stop,/find,/import,/label,/folder,/tone,/set,/unload,/themeand/lockjoin the palette, so more of the app is a few keystrokes away:/label greencolors the chat,/folder Workfiles it (and makes the folder if there isn't one),/set temperature 0.2changes a parameter within the panel's own ranges,/unloadfrees the Ollama model from memory and/locklocks the app if you have an app lock set. The palette also completes model, Space, snippet and persona names as you type. Bare/modelopens the model picker, and bare/personaor/tonetells you which one is in effect.At home on macOS
Loach on a Mac now behaves like a Mac app. The window uses the native traffic-light buttons, the menu bar icon shows the fish instead of a solid square, keyboard shortcuts use Cmd alone, and clicking the Dock icon brings the window back. Closing the window hides Loach rather than quitting it, the way most Mac apps work - and if you've set an app lock, closing it locks Loach too.
Other changes
Cmd/Ctrl + K) covers the Library, andin:librarynarrows it down.Fixes
max_tokensor a custom temperature are retried with the fields they accept, so they work again.IMPORT~1.MD) are refused, and an edited file keeps its Windows permissions.Cmd/Ctrl + /works where/needs Shift, and UTF-16 and Windows-1250/1252 text files open correctly as attachments.counttool treats an emoji or accented letter as one character.Good to know
Backups made by 1.6.0 include the Library, so Loach 1.5 and older won't restore them. 1.6.0 still restores backups from older versions.
👉 View the full changelog in GitHub Releases
All reactions