跳到正文
DEV Community· Joe Simo·· 3 小時前AI 評分51

Lazy Changelog 在瀏覽器內用 Gemma 3 1B 生成版本説明

Lazy Changelog, where Gemma writes your release notes inside the browser

AI 導讀

Lazy Changelog 會先將 git log 整理成版本説明草稿,再由在瀏覽器分頁運行的 Gemma 3 1B 改寫 New、Fixed 和 Faster 條目。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Release notes are the chore that always gets skipped. Everything users need to know is already in the commits, but it is written for the person who made the change: fix(ui): dark mode toggle not persisting after refresh. Turning that into "Dark mode toggle persists after refresh" for thirty commits is boring, so it does not happen.

Lazy Changelog does it for you. You run one command, paste, and copy:

git log --oneline $(git describe --tags --abbrev=0)..HEAD
  1. An instant draft, before any AI. The moment you paste, a small parser groups commits into New, Fixed, Faster, Docs and Behind the scenes. It strips feat: style prefixes, gitmoji, [tags] and hashes, keeps PR numbers like (#212), puts breaking changes at the top, and quietly drops merges, version bumps, wip and fixup! commits and duplicates. You can copy this draft right away.
  2. Then Gemma rewrites the lines users care about. Gemma 3 1B runs inside the browser tab and rewrites each New, Fixed and Faster line in plain words, one at a time, so you watch them change.
  3. After the first time, there is nothing to click. The weights stay cached. Next time you open the page, the model loads by itself and rewrites whatever you paste.

Who gets to be lazier: anyone who ships a library, an app or a side project and owes their users a "what changed" note.

Release notes rewritten by Gemma in the browser

Demo

Live: https://lazy-changelog.vercel.app

Click Try an example to load a sample log, then Load Gemma 3 1B. The first load downloads the model once (about 760 MB with WebGPU, about 1 GB on the CPU path). No account, no key.

Here is a real run of the example log on the live site, on the CPU path:

Commit Release note
feat(reports): export reports as CSV (#212) Export your reports as CSV (#212)
fix(ui): dark mode toggle not persisting after refresh Dark mode toggle persists after refresh
fix: resolve race condition in websocket reconnect The websocket reconnect process is now stable
perf(gallery): lazy load images Lazy load images (kept as written)

Not every line gets better, and the app says so. Turn on Show commits to see the commit behind each line, and which ones Gemma left alone:

Each release note with the commit it came from

Code

GitHub logo Joe-Simo / lazy-changelog

Paste your git log, get release notes people can read. Gemma 3 1B rewrites them in your browser.

Lazy Changelog

Paste your git log. Get release notes people can read. Nothing leaves your browser.

Live: https://lazy-changelog.vercel.app

Release notes rewritten in the browser

Why

Writing release notes is the chore everyone skips. The information is already in your commits; it is just written for you, not for your users. Lazy Changelog does the boring part for you:

  1. Run one command in your repo:

    git log --oneline $(git describe --tags --abbrev=0)..HEAD
  2. Paste the output.

  3. Copy the Markdown.

How it works

Instant draft, no model needed. A small parser (src/lib/parse.ts) reads the log the moment you paste it. It groups commits into New, Fixed, Faster, Docs and Behind the scenes, strips conventional commit prefixes, gitmoji, [tags] and hashes, keeps PR numbers, puts breaking changes first, and drops noise like merges, version bumps, wip and fixup! commits and duplicates. This draft is labeled as a draft.

Then Gemma rewrites the lines users care…

MIT licensed. Next.js, React, TypeScript, Tailwind CSS, Transformers.js. Tests cover the parser and the reply checks (npm test).

How I Built It

The model. Gemma 3 1B instruct, in the ONNX build from the Hugging Face onnx-community, run with Transformers.js in a Web Worker so the page never freezes. With WebGPU it uses 4-bit weights (q4f16). Without WebGPU it falls back to WebAssembly on the CPU with 8-bit weights (uint8), because the 4-bit file needs an operator the WebAssembly runtime does not have. I tried the smaller Gemma 3 270M first; it was fast, but in my tests its rewrites were wrong too often, so I went with 1B.

Small jobs, not one big prompt. A 1B model is good at one short task and bad at a long one. So the parser does everything that can be done with rules (grouping, cleanup, noise removal), and Gemma only gets one commit subject at a time, with a short instruction for its kind and three examples. Fixes get "this bug is now fixed, say what works now", which matters: without it, a small model happily turns "crash when uploading files" into a feature. Decoding is greedy and capped at 32 new tokens.

Never show junk as if it were good. Every reply goes through a checker before it reaches the screen. It is thrown away if it is empty, too short or too long, repeats the prompt, starts chatting ("Sure", "I'm ready"), contains stray characters, shares no real word with the commit, or simply echoes the commit back. When that happens, the original line stays and is marked "kept as written". On the CPU path this happens more often, and I would rather show an honest original than a confident wrong sentence.

Lazy by default. After the first successful load, the app remembers it and loads the model on its own. Pasting a new log rewrites it automatically after a short pause. Loading, download progress, empty states and errors all have their own clear message, and if the model cannot load at all, the instant draft is still there to copy.

Why Does Open Innovation Matter?

Commit logs are private more often than not: unreleased features, customer names in branch names, security fixes that are not public yet. With a closed API, using this tool would mean sending that history to someone else's server and putting an API key somewhere.

Because Gemma's weights are open and Transformers.js and ONNX Runtime Web are open source, the whole thing runs in the tab. There is no backend at all, so there is nothing to pay for per request, no key to leak, and no server that ever sees your commits. That is also what lets it be free to host and free to use. An open model running on your own machine is the only way this tool can be both private and lazy.

Prize Categories

Best Use of Gemma

Disclosure: I built this project and wrote this post with heavy help from an AI agent. Every result shown above came from real runs of the live app.

來源:DEV Community · dev.to