Files
MailUI4Agents/.gitignore
JianFeeeee 7603560a72 chore(git): 忽略并取消跟踪 .tmp/(一次 git add -A 把 554 个编译缓存扫进了版本库)
`f6feb7c` 那次提交把 `.tmp/node-compile-cache/**` 与 `.tmp/studtmp-*` 一起带进了版本库
(554 个文件,2.6MB)—— 它们只是 electron-builder / node 的临时产物,
正是 `BUILD.md` 里说的那个 `TMPDIR` 落点。

两件事:
1. 根 `.gitignore` 加 `.tmp/`(按目录整体忽略,而不是逐个文件),并写明这次的教训:
   缓存进库没有意义,还会**掩盖真实的改动面**(一次 `git add -A` 就让 diff 淹没在缓存里);
2. `git rm -r --cached .tmp` 取消跟踪(文件仍在磁盘上,只是不再入库)。

以后在同一个工作区里 `git add -A` 之前,先看一眼 `git status` 里有没有 `.tmp/` 这类构建目录。
2026-09-14 13:54:12 +08:00

79 lines
2.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ---- 依赖与构建产物 ----
#
# 前端只在**构建期**用到 npm`npm run build` 出的 dist/ 被 cp 进
# server/internal/static/static/ 再由 go:embed 编进二进制。
# 部署机上没有 node产物就是「一个二进制 + 一个 .db 文件」。
# 因此这三样都不进版本库:装依赖与构建都能从 package-lock.json 复现。
client/electron/node_modules/
# 构建期的临时目录electron-builder / fpm / hvigor 的 TMPDIR 落点,见 client/electron/BUILD.md
# 2026-09-14 教训:这里曾被一次 `git add -A` 把 554 个 node 编译缓存文件扫进版本库 ——
# 缓存进库既没意义又会掩盖真实的改动面,所以按目录整体忽略。
.tmp/
client/electron/dist/
plugins/*/node_modules/
# dsh-mail-bridge 是 TypeScript 写的dist/ 是 tsc 的产物。
# 与 client/electron/dist 同一个理由:装依赖与构建都能从 package-lock.json 复现,
# 产物不进版本库。注意它**必须在装插件前构建**package.json 的
# main 指向 dist/index.jsdeploy/install.sh 负责这一步。
plugins/*/dist/
# go:embed 的输入目录 = client/electron/dist 的副本,同属构建产物。
#
# 但目录本身要留下go:embed 要求它存在才能编译,否则新克隆连
# `go test ./...` 都跑不起来 —— 只改后端的人不该被迫先装 node。
# 因此忽略构建产物,只保留 placeholder.html见该文件内注释
# 之所以不叫 index.html是因为那正是 Vite 产物的名字,会被反复覆盖)。
server/internal/static/static/*
!server/internal/static/static/placeholder.html
# Go 构建产物
server/agentmail-gateway
server/gw
*.test
# ---- 运行态数据 ----
#
# SQLite 库与附件目录:生产在 /opt/agentmail/data
# 本地调试可能落在仓库里,绝不能提交(含真实邮件与凭证哈希)。
*.db
*.db-shm
*.db-wal
data/
attachments/
# ---- 凭证 ----
#
# 管理员密码、Agent 密钥、opencode server password 都在 env 文件里。
.env
*.env
# ---- Agent 工具的运行态目录 ----
#
# 这些是 pi / omo 在仓库里落的会话与后台任务状态,属于本机运行痕迹,
# 不是项目的一部分。
.pi/
.omo/
.pi-glla/
.codegraph
# ---- Python 工具缓存 ----
#
# client/electron/src/icons/generate.py 是图标生成脚本cairosvg + Pillow
# 静态检查器跑 ruff 时会在同目录落 .ruff_cache/,不是项目内容。
.ruff_cache/
__pycache__/
*.pyc
# ---- 编辑器与系统 ----
.DS_Store
*.swp
.idea/
.vscode/
plugins/homeagent-mail-bridge/build/
# 构建产物(曾误提交)
server/server
plugins/zcode-mail-bridge/test/manual/gate-e2e-evidence.json