Skip to content

feat(M0): 初始化工程脚手架、CI 流水线与源码分层骨架 - #1

Merged
ThreeFish-AI merged 6 commits into
feature/1.x.xfrom
ThreeFish-AI/vscode-idea-git-plugin
Jun 27, 2026
Merged

feat(M0): 初始化工程脚手架、CI 流水线与源码分层骨架#1
ThreeFish-AI merged 6 commits into
feature/1.x.xfrom
ThreeFish-AI/vscode-idea-git-plugin

Conversation

@ThreeFish-AI

Copy link
Copy Markdown
Owner

背景

落地 M0 里程碑:初始化 Hyper Git VS Code 扩展的工程脚手架、CI 流水线与源码分层骨架。完整方案基于循证调研,采用路径 B:消费内置 vscode.git 稳定 API + 自建 changelist registry + 独立视图容器自绘 IDEA 风格 UI(不接管原生 Source Control 视图)。

交付内容

  • 工程基线:pnpm + esbuild + TypeScript(strict) + ESLint9 flat + Prettier;.npmrc(node-linker=hoisted);engines.vscode ^1.85.0@types/vscode ~1.85.0 严格对齐(让 tsc 拦截越界 API)。
  • 源码分层骨架(正交分解):engine/(纯逻辑,零 vscode 依赖) / adapter/(唯一接触 vscode API) / agent/(AI 接缝预留) / shared/protocol.ts(Webview↔Host 消息契约单一事实源) / infra/
  • 引擎纯逻辑engine/scm-mapping(FileStatus → gitDecoration.* 主题色映射)、engine/commit/pipeline(Checkin hook 责任链,对齐 IDEA CheckinHandler.ReturnResult)。
  • AI 接缝ILlmProvider / IPreCommitInspector 接口 + Null 实现(M5 实现真实能力)。
  • 质量基础设施:Vitest(engine 单测) + @vscode/test-electron + Mocha(adapter 集成)。
  • CI 流水线:lint → build → test 矩阵(ubuntu/mac/win + Linux xvfb) → package vsix → artifact;tag v* → 双市场发布(Marketplace + OpenVSX,覆盖 Cursor/Windsurf)。
  • 扩展贡献点:活动栏视图容器 hyper-git + hyperGit.changes 树视图(M0 占位,M1 接入真实 changelist)+ hyperGit.showVersion 命令 + 配置项(commit 模板 / Conventional Commits / AI 开关预留)。

验收(本地全绿)

结果
check-types / lint / package
test:unit(Vitest) ✅ 9/9(533ms)
test:integration(test-electron) ✅ 1/1(真实 VS Code 1.126 中扩展激活)
vsce package hyper-git-0.1.0.vsix(7.93 KB)

后续里程碑

M1 Git Adapter + 多 changelist Changes TreeView → M2 Commit 窗口 → M3 Log/Branches/Diff → M4 Shelf/Partial/Stash → M5 AI Agent。

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
@ThreeFish-AI
ThreeFish-AI merged commit f56f848 into feature/1.x.x Jun 27, 2026
4 checks passed
@ThreeFish-AI
ThreeFish-AI deleted the ThreeFish-AI/vscode-idea-git-plugin branch June 27, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant