Files
md-preview/agent/README.md
Richard Wu 1e8cbea902 feat: zoom content with Ctrl+wheel (5% step, 50-300%)
- Ctrl+wheel zooms preview and editor; 90ms throttle; preventDefault stops WebView2 page zoom
- Range widened to 50-300%, step unified at 5% for wheel, toolbar buttons and Ctrl +/-
- No mouse-anchor (same scrolling behavior as button zoom)
- Add agent/AGENTS.md: workspace boundary is the top rule; build/test temp dirs stay in target/
- build.ps1 redirects TEMP/TMP into target/tmp
2026-10-21 16:23:00 +08:00

50 lines
2.0 KiB
Markdown
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.

# agent/ — MD Preview 维护者工作区
这里是本项目的“Agent 附属区”:文档、构建/冒烟脚本、测试夹具与验证记录。应用代码仍在 `src/`。
## 规则
维护本仓库前先读 [`AGENTS.md`](AGENTS.md):**最高优先级是工作区边界——任何工作区外的文件修改都必须先停下询问用户。**
## 目录
| 路径 | 用途 |
|---|---|
| `AGENTS.md` | Agent 运行规则(工作区边界、改动流程) |
| `docs/HANDOFF.md` | 主交接文档(工具链、构建、坑、验收) |
| `docs/scan-2026-10-21.md` | 代码扫描:残留、bug、修复建议 |
| `docs/roadmap.md` | 功能路线图与验收标准 |
| `scripts/build.ps1` | release 构建 → 固定 exe 路径 → 校验 |
| `tests/smoke.ps1` | cargo test + 关联检查 + 可选隔离启动 |
| `tests/fixtures/` | 手工/冒烟用 Markdown 样例 |
| `reports/` | 验证截图与记录(png 入库,日志忽略) |
| `notes/` | 草稿 |
## 不变量
1. **产物路径固定**:`D:\Scripts\md-preview\MD-Preview-windows-x64.exe`。默认 `.md` 打开方式指向它,不要改名/移动。
2. **离线**:不引入联网、自动更新、遥测;外部链接交给系统浏览器。
3. **轻量**:不为小功能引入新库;优先原生 JS/CSS 与已有依赖。
4. **测试**:`cargo test` 必须保持全绿;UI 行为用 `tests/fixtures` 做手工/冒烟回归。
## 常用命令
```powershell
# 构建并校验(推荐)
.\agent\scripts\build.ps1
# 只跑测试
cargo test
# 冒烟(含注册表与可选启动)
.\agent\tests\smoke.ps1 -Launch
```
## 环境注意
工作区是 **Medium** 完整性级别。DSH 用 `workspace-write` 打开时进程是 **Low**,会写不动(EPERM / os error 5)。改代码、编译、替换 exe 需要 DSH 以 **danger-full-access** 运行,或在你自己的普通 PowerShell 里执行。详见 `docs/HANDOFF.md` 第 4 节。
## Git
仓库由用户自行初始化(私有)。`backup/` 与成品 exe 不入库;`agent/` 全量入库。