编辑:还是原来的 textarea,防抖自动保存不变,占位提示换成了 Markdown 语法提示(和待办/工单编辑器一致)。 预览:用项目里已有的 MarkdownView 渲染,支持标题、列表、任务勾选框、代码块、链接、图片(本地图和外链都会经后端转成 dataURL 显示),点链接走系统浏览器。 几个细节:切到预览前会先把防抖窗口内没落盘的改动存一次,避免丢内容;切换状态记在 localStorage,下次进工作台保持上次选的模式;空笔记在预览下显示「(暂无内容)」占位。按钮复用了 md 编辑器已有的 mdEdit/mdPreviewTab 文案,所以中英文都已经有了,不需要新增词条。
Code Count
Code Count is a Wails v2 desktop application for local source-code and Git analytics. The Go backend scans source files with gocloc, reads Git history through the installed git executable, and persists analysis snapshots in SQLite. The Vue 3 frontend provides Chinese/English and light/dark themes.
Requirements
- Go 1.25+
- Node.js 20+
- Wails CLI 2.12+
- Git (optional; required only for Git analytics)
Development
cd frontend
npm install
cd ..
wails dev
The database is created under the operating system's user configuration directory in CodeCount/code-count.db. Its location can be changed from Settings.
Tests and builds
go test ./...
cd frontend
npm run build
cd ..
wails build
Windows builds produce build/bin/code-count.exe. Run wails build -platform darwin/universal on macOS to create the macOS application bundle.
About
This is the official Wails Vue template.
You can configure the project by editing wails.json. More information about the project settings can be found
here: https://wails.io/docs/reference/project-config
Live Development
To run in live development mode, run wails dev in the project directory. This will run a Vite development
server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser
and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect
to this in your browser, and you can call your Go code from devtools.
Building
To build a redistributable, production mode package, use wails build.