Skip to content

Commit 5bead7c

Browse files
feat(core,settings,commit,webview): 提升提交生成与多仓库能力,新增模型注册/设置管理并修复 UI 与消息链路稳定性
本次 PR 汇总了多个版本迭代(含 v0.56.x ~ v0.59.0)的核心演进,重点围绕 **提交生成链路、AI/模型管理、设置体系、Webview/UI 架构** 进行增强,同时修复了多项稳定性与类型问题,并完善发布与工程化流程。 - **变更类型** - `feat`: 新增模型注册与目录同步、功能设置管理、Commit Chat 实时流式、提示词/i18n 能力、上下文检查器等 - `fix`: 修复提交去重丢消息、react-hooks lint/TS 报错、缓存键隔离、CI 发布解析、构建脚本兼容等问题 - `refactor`: 重构 commit 生成编排、core/service 架构、webview 通信与会话管理、settings/profile 流程、SCM 多仓库路由 - `chore/build/ci/release`: 依赖升级、发布脚本与工作流优化、日志与审计流程补充、版本发布推进 - **核心改动概览** 1. **Commit 生成与缓存体系增强** - 改进生成韧性、提示词感知缓存、分层配置对齐与 diff 快照一致性 - 统一/去重生成流水线,补全结果类型,返回结构化命令执行状态 - 隔离 Git/SVN 缓存键,减少跨场景污染与误命中 2. **SCM 与多仓库能力强化** - 加强多仓库边界校验与 provider 路由 - 优化跨仓库检测、仓库选择与关键路径日志,提升复杂工作区稳定性 3. **AI 与模型管理升级** - 新增 model registry 与 catalog 同步服务 - 标准化 AI provider 日志与运行时诊断 - 持续扩展 provider/模型兼容能力并优化配置管理 4. **Settings / Webview / UI 演进** - 新增 features settings 管理与高级运行时控制 - Webview 消息协议对齐,补充审计工作流,修复页面重入消息去重丢失 - 修复 settings 流程中的 hooks lint 与 TypeScript 错误,统一命令面板与欢迎页体验 - 增强提示词 UI、安全存储、国际化与页面交互细节(含最小宽度样式修正) 5. **工程化与发布流程** - 依赖与锁文件更新(含 `@types/vscode` 锁定) - CI/release 流程优化:changelog 解析、URL 输出、dry-run/手动触发等 - 多次发布版本推进(含 `v0.58.x`、`v0.59.0`) - **重点模块** - `core`, `commit`, `commands`, `scm` - `ai`, `model-registry`, `prompts` - `settings`, `webview`, `webview-ui` - `ci/build/release` 工具链与流程 整体上,该 PR 属于一次 **功能增强 + 架构重构 + 稳定性修复** 的综合升级,为后续跨仓库提交生成、模型扩展与设置体系演进打下了更稳固基础。
2 parents 01c60ea + 464630d commit 5bead7c

File tree

159 files changed

+11222
-5389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+11222
-5389
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Protocol Audit
2+
3+
on:
4+
pull_request:
5+
branches: ["**"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
protocol-audit:
10+
name: Message Protocol Audit (blocking)
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "20"
23+
24+
- name: Set up pnpm
25+
uses: pnpm/action-setup@v3
26+
with:
27+
version: 10.24.0
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Run protocol audit (phase B: blocking)
33+
id: audit
34+
run: |
35+
set -o pipefail
36+
pnpm protocol:check -- --format both | tee protocol-audit.log
37+
38+
- name: Upload protocol audit artifacts
39+
if: always()
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: protocol-audit-report
43+
if-no-files-found: warn
44+
path: |
45+
protocol-audit.log
46+
protocol-audit-report.json
47+
48+
- name: Write workflow summary
49+
if: always()
50+
run: |
51+
echo "## Message Protocol Audit (Phase B)" >> "$GITHUB_STEP_SUMMARY"
52+
echo "" >> "$GITHUB_STEP_SUMMARY"
53+
echo "- Mode: blocking (ERROR will fail job)" >> "$GITHUB_STEP_SUMMARY"
54+
echo "- Step outcome: \`${{ steps.audit.outcome }}\`" >> "$GITHUB_STEP_SUMMARY"
55+
echo "- Report artifact: \`protocol-audit-report\`" >> "$GITHUB_STEP_SUMMARY"

CHANGELOG.zh-CN.md

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
1-
## 0.59.0 (2026-03-13)
1+
## 0.59.0 (2026-03-25)
22

33
### 📦 src 模块
44

55
### ✨ Features
66

7-
- **commit-chat**: add real-time model streaming in webview chat ([2ead424](https://github.com/littleCareless/dish-ai-commit/commit/2ead424))
7+
- **commit**: improve generation resilience and prompt-aware cache ([79f57a1](https://github.com/littleCareless/dish-ai-commit/commit/79f57a1))
8+
- **settings**: add features settings management ([636425a](https://github.com/littleCareless/dish-ai-commit/commit/636425a))
9+
- **ai**: add model registry and catalog sync services ([14f5bc0](https://github.com/littleCareless/dish-ai-commit/commit/14f5bc0))
10+
11+
### 🐛 Bug Fixes
12+
13+
- **webview**: prevent message dedupe drops on page re-entry ([456066f](https://github.com/littleCareless/dish-ai-commit/commit/456066f))
14+
- **commit**: align layered generation config and diff snapshots ([07f9f8a](https://github.com/littleCareless/dish-ai-commit/commit/07f9f8a))
15+
16+
### ♻️ Code Refactoring
17+
18+
- **commands**: return structured execution status ([dc447b7](https://github.com/littleCareless/dish-ai-commit/commit/dc447b7))
19+
- **commit**: remove unused target resources path ([1794064](https://github.com/littleCareless/dish-ai-commit/commit/1794064))
20+
- **ai**: standardize provider logging and runtime diagnostics ([ea17db8](https://github.com/littleCareless/dish-ai-commit/commit/ea17db8))
21+
- **commit**: orchestrate generation flow and unify diff targeting ([58c0c59](https://github.com/littleCareless/dish-ai-commit/commit/58c0c59))
22+
- **core**: remove disconnected orchestration scaffolds ([92cc037](https://github.com/littleCareless/dish-ai-commit/commit/92cc037))
23+
- **core**: remove duplicate services and orphan command implementations ([3ede345](https://github.com/littleCareless/dish-ai-commit/commit/3ede345))
824

925
### 🔧 Chores
1026

11-
- branch 'feat-commit-chat-real-streaming' into develop ([6b5467a](https://github.com/littleCareless/dish-ai-commit/commit/6b5467a))
12-
- branch 'chore/save-current-changes-20260301' into develop ([f6e1bc1](https://github.com/littleCareless/dish-ai-commit/commit/f6e1bc1))
13-
- **chore**: save current local changes ([804ae6a](https://github.com/littleCareless/dish-ai-commit/commit/804ae6a))
14-
- **commit-chat**: type input handlers for strict ts checks ([446e3c7](https://github.com/littleCareless/dish-ai-commit/commit/446e3c7))
27+
- **scm**: harden multi-repo boundaries and provider routing ([41459a6](https://github.com/littleCareless/dish-ai-commit/commit/41459a6))
28+
- **fix**: isolate git/svn cache keys for prompts and commit cache ([beb63fa](https://github.com/littleCareless/dish-ai-commit/commit/beb63fa))
29+
- **chore**: checkpoint current changes ([f2bd596](https://github.com/littleCareless/dish-ai-commit/commit/f2bd596))
30+
- **commit**: complete generation result typing ([197cb45](https://github.com/littleCareless/dish-ai-commit/commit/197cb45))
31+
- **protocol**: add audit workflow and align webview messaging ([54f0cc8](https://github.com/littleCareless/dish-ai-commit/commit/54f0cc8))
32+
- **scm**: unify critical-path logging/menu and publish verification artifacts ([dc2bb3b](https://github.com/littleCareless/dish-ai-commit/commit/dc2bb3b))
33+
- **commit**: dedup generation pipeline and enable cross-repo routing ([b9704d9](https://github.com/littleCareless/dish-ai-commit/commit/b9704d9))
34+
- **ui**: resolve TypeScript errors in settings components ([6b773d8](https://github.com/littleCareless/dish-ai-commit/commit/6b773d8))
35+
- **ui**: unify command palette and welcome page ([2904def](https://github.com/littleCareless/dish-ai-commit/commit/2904def))
1536
- **style**: 添加最小宽度以防止内容被压缩 ([0d398ac](https://github.com/littleCareless/dish-ai-commit/commit/0d398ac))
1637
- v0.58.2 ([1976014](https://github.com/littleCareless/dish-ai-commit/commit/1976014))
1738
- **ci**: improve release workflow changelog parsing and URL output ([2bc78ea](https://github.com/littleCareless/dish-ai-commit/commit/2bc78ea))
@@ -20,28 +41,70 @@
2041

2142
### ✨ Features
2243

23-
- **commit-chat**: add real-time model streaming in webview chat ([2ead424](https://github.com/littleCareless/dish-ai-commit/commit/2ead424))
44+
- **commit**: improve generation resilience and prompt-aware cache ([79f57a1](https://github.com/littleCareless/dish-ai-commit/commit/79f57a1))
45+
- **settings**: add features settings management ([636425a](https://github.com/littleCareless/dish-ai-commit/commit/636425a))
46+
- **ai**: add model registry and catalog sync services ([14f5bc0](https://github.com/littleCareless/dish-ai-commit/commit/14f5bc0))
47+
48+
### 🐛 Bug Fixes
49+
50+
- **webview**: prevent message dedupe drops on page re-entry ([456066f](https://github.com/littleCareless/dish-ai-commit/commit/456066f))
51+
- **commit**: align layered generation config and diff snapshots ([07f9f8a](https://github.com/littleCareless/dish-ai-commit/commit/07f9f8a))
52+
53+
### ♻️ Code Refactoring
54+
55+
- **commands**: return structured execution status ([dc447b7](https://github.com/littleCareless/dish-ai-commit/commit/dc447b7))
56+
- **commit**: remove unused target resources path ([1794064](https://github.com/littleCareless/dish-ai-commit/commit/1794064))
57+
- **ai**: standardize provider logging and runtime diagnostics ([ea17db8](https://github.com/littleCareless/dish-ai-commit/commit/ea17db8))
58+
- **commit**: orchestrate generation flow and unify diff targeting ([58c0c59](https://github.com/littleCareless/dish-ai-commit/commit/58c0c59))
59+
- **core**: remove disconnected orchestration scaffolds ([92cc037](https://github.com/littleCareless/dish-ai-commit/commit/92cc037))
60+
- **core**: remove duplicate services and orphan command implementations ([3ede345](https://github.com/littleCareless/dish-ai-commit/commit/3ede345))
2461

2562
### 🔧 Chores
2663

27-
- branch 'feat-commit-chat-real-streaming' into develop ([6b5467a](https://github.com/littleCareless/dish-ai-commit/commit/6b5467a))
28-
- branch 'chore/save-current-changes-20260301' into develop ([f6e1bc1](https://github.com/littleCareless/dish-ai-commit/commit/f6e1bc1))
29-
- **chore**: save current local changes ([804ae6a](https://github.com/littleCareless/dish-ai-commit/commit/804ae6a))
30-
- **commit-chat**: type input handlers for strict ts checks ([446e3c7](https://github.com/littleCareless/dish-ai-commit/commit/446e3c7))
64+
- **scm**: harden multi-repo boundaries and provider routing ([41459a6](https://github.com/littleCareless/dish-ai-commit/commit/41459a6))
65+
- **fix**: isolate git/svn cache keys for prompts and commit cache ([beb63fa](https://github.com/littleCareless/dish-ai-commit/commit/beb63fa))
66+
- **chore**: checkpoint current changes ([f2bd596](https://github.com/littleCareless/dish-ai-commit/commit/f2bd596))
67+
- **commit**: complete generation result typing ([197cb45](https://github.com/littleCareless/dish-ai-commit/commit/197cb45))
68+
- **protocol**: add audit workflow and align webview messaging ([54f0cc8](https://github.com/littleCareless/dish-ai-commit/commit/54f0cc8))
69+
- **scm**: unify critical-path logging/menu and publish verification artifacts ([dc2bb3b](https://github.com/littleCareless/dish-ai-commit/commit/dc2bb3b))
70+
- **commit**: dedup generation pipeline and enable cross-repo routing ([b9704d9](https://github.com/littleCareless/dish-ai-commit/commit/b9704d9))
71+
- **ui**: resolve TypeScript errors in settings components ([6b773d8](https://github.com/littleCareless/dish-ai-commit/commit/6b773d8))
72+
- **ui**: unify command palette and welcome page ([2904def](https://github.com/littleCareless/dish-ai-commit/commit/2904def))
3173
- **style**: 添加最小宽度以防止内容被压缩 ([0d398ac](https://github.com/littleCareless/dish-ai-commit/commit/0d398ac))
3274
- v0.58.2 ([1976014](https://github.com/littleCareless/dish-ai-commit/commit/1976014))
3375
- **ci**: improve release workflow changelog parsing and URL output ([2bc78ea](https://github.com/littleCareless/dish-ai-commit/commit/2bc78ea))
3476

3577
### ✨ Features
3678

37-
- **commit-chat**: add real-time model streaming in webview chat ([2ead424](https://github.com/littleCareless/dish-ai-commit/commit/2ead424))
79+
- **commit**: improve generation resilience and prompt-aware cache ([79f57a1](https://github.com/littleCareless/dish-ai-commit/commit/79f57a1))
80+
- **settings**: add features settings management ([636425a](https://github.com/littleCareless/dish-ai-commit/commit/636425a))
81+
- **ai**: add model registry and catalog sync services ([14f5bc0](https://github.com/littleCareless/dish-ai-commit/commit/14f5bc0))
82+
83+
### 🐛 Bug Fixes
84+
85+
- **webview**: prevent message dedupe drops on page re-entry ([456066f](https://github.com/littleCareless/dish-ai-commit/commit/456066f))
86+
- **commit**: align layered generation config and diff snapshots ([07f9f8a](https://github.com/littleCareless/dish-ai-commit/commit/07f9f8a))
87+
88+
### ♻️ Code Refactoring
89+
90+
- **commands**: return structured execution status ([dc447b7](https://github.com/littleCareless/dish-ai-commit/commit/dc447b7))
91+
- **commit**: remove unused target resources path ([1794064](https://github.com/littleCareless/dish-ai-commit/commit/1794064))
92+
- **ai**: standardize provider logging and runtime diagnostics ([ea17db8](https://github.com/littleCareless/dish-ai-commit/commit/ea17db8))
93+
- **commit**: orchestrate generation flow and unify diff targeting ([58c0c59](https://github.com/littleCareless/dish-ai-commit/commit/58c0c59))
94+
- **core**: remove disconnected orchestration scaffolds ([92cc037](https://github.com/littleCareless/dish-ai-commit/commit/92cc037))
95+
- **core**: remove duplicate services and orphan command implementations ([3ede345](https://github.com/littleCareless/dish-ai-commit/commit/3ede345))
3896

3997
### 🔧 Chores
4098

41-
- branch 'feat-commit-chat-real-streaming' into develop ([6b5467a](https://github.com/littleCareless/dish-ai-commit/commit/6b5467a))
42-
- branch 'chore/save-current-changes-20260301' into develop ([f6e1bc1](https://github.com/littleCareless/dish-ai-commit/commit/f6e1bc1))
43-
- **chore**: save current local changes ([804ae6a](https://github.com/littleCareless/dish-ai-commit/commit/804ae6a))
44-
- **commit-chat**: type input handlers for strict ts checks ([446e3c7](https://github.com/littleCareless/dish-ai-commit/commit/446e3c7))
99+
- **scm**: harden multi-repo boundaries and provider routing ([41459a6](https://github.com/littleCareless/dish-ai-commit/commit/41459a6))
100+
- **fix**: isolate git/svn cache keys for prompts and commit cache ([beb63fa](https://github.com/littleCareless/dish-ai-commit/commit/beb63fa))
101+
- **chore**: checkpoint current changes ([f2bd596](https://github.com/littleCareless/dish-ai-commit/commit/f2bd596))
102+
- **commit**: complete generation result typing ([197cb45](https://github.com/littleCareless/dish-ai-commit/commit/197cb45))
103+
- **protocol**: add audit workflow and align webview messaging ([54f0cc8](https://github.com/littleCareless/dish-ai-commit/commit/54f0cc8))
104+
- **scm**: unify critical-path logging/menu and publish verification artifacts ([dc2bb3b](https://github.com/littleCareless/dish-ai-commit/commit/dc2bb3b))
105+
- **commit**: dedup generation pipeline and enable cross-repo routing ([b9704d9](https://github.com/littleCareless/dish-ai-commit/commit/b9704d9))
106+
- **ui**: resolve TypeScript errors in settings components ([6b773d8](https://github.com/littleCareless/dish-ai-commit/commit/6b773d8))
107+
- **ui**: unify command palette and welcome page ([2904def](https://github.com/littleCareless/dish-ai-commit/commit/2904def))
45108
- **style**: 添加最小宽度以防止内容被压缩 ([0d398ac](https://github.com/littleCareless/dish-ai-commit/commit/0d398ac))
46109
- v0.58.2 ([1976014](https://github.com/littleCareless/dish-ai-commit/commit/1976014))
47110
- **ci**: improve release workflow changelog parsing and URL output ([2bc78ea](https://github.com/littleCareless/dish-ai-commit/commit/2bc78ea))

REFACTOR_PROGRESS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,14 @@
5656
- 创建进度跟踪文档
5757
- 准备开始执行重构
5858

59+
### 2026-03-24 - 方案收敛(本轮瘦身)
60+
61+
- 主链未接入的编排层 scaffold 已删除:
62+
- `src/services/core/commit-generation-coordinator.ts`
63+
- `src/core/generation-orchestrator.ts`
64+
- `src/core/generation-transaction.ts`
65+
- `src/core/generation-gate.ts`
66+
- `StreamingGenerationHelper` 中未使用的 `GenerationGate` 引用已移除。
67+
- 本文件保留为历史记录,不再作为进行中任务清单。
68+
5969
---
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Generation Pipeline Dedup Baseline (Pre-change)
2+
3+
Date: 2026-03-24
4+
Change: `refactor-generation-pipeline-dedup`
5+
6+
## Scope
7+
8+
Critical path before refactor:
9+
10+
- `src/commands/base-command.ts`
11+
- `src/commands/generate-commit/generate-commit-command.ts`
12+
- `src/commands/generate-commit/handlers/cross-repository-handler.ts`
13+
- `src/scm/multi-repository-context-manager.ts`
14+
- `src/scm/scm-provider.ts`
15+
16+
## Baseline Metrics
17+
18+
1. SCM detection calls in single-repository commit path: **2**
19+
20+
- First detection in `prepare()` via `resolveSCMContext()`.
21+
- Second detection in `GenerateCommitCommand.handleSingleRepositoryScenario()`.
22+
23+
2. Model validation calls in commit path: **1 required + 1 fallback path**
24+
25+
- Required call in `BaseCommand.initializeAIContext()`.
26+
- Fallback call exists in `StreamingGenerationHelper.processModelConfiguration()` when pre-initialized provider/model are missing.
27+
28+
3. Cross-repository reachability: **Not reachable**
29+
30+
- `isCrossRepository` is hardcoded to `false` in `GenerateCommitCommand.parseArguments()`.
31+
32+
4. `console.*` usage in commit/SCM critical files: **54**
33+
34+
- `src/scm/scm-provider.ts`
35+
- `src/scm/multi-repository-context-manager.ts`
36+
- `src/commands/generate-commit/generate-commit-command.ts`
37+
38+
5. Orphan command implementation files (present but unregistered): **3**
39+
40+
- `src/commands/select-model-command.ts`
41+
- `src/commands/show-token-stats-command.ts`
42+
- `src/commands/reset-token-stats-command.ts`
43+
44+
## Evidence Commands
45+
46+
```bash
47+
rg -n "resolveSCMContext\(|detectSCMProvider\(|SCMFactory\.detectSCM\(" \
48+
src/commands/base-command.ts src/commands/generate-commit/generate-commit-command.ts
49+
50+
rg -n "ModelValidationService\.validateModel\(|initializeAIContext\(|processModelConfiguration\(" \
51+
src/commands/base-command.ts src/commands/generate-commit/utils/streaming-generation-helper.ts
52+
53+
rg -n "isCrossRepository = false|groupFilesByRepository|CrossRepositoryHandler" \
54+
src/commands/generate-commit/generate-commit-command.ts src/commands/generate-commit/handlers/cross-repository-handler.ts
55+
56+
rg -n "console\.(log|warn|error|info|debug)" \
57+
src/scm/scm-provider.ts src/scm/multi-repository-context-manager.ts src/commands/generate-commit/generate-commit-command.ts | wc -l
58+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Generation Pipeline Dedup Decisions
2+
3+
Date: 2026-03-24
4+
Change: `refactor-generation-pipeline-dedup`
5+
6+
## Canonical Paths
7+
8+
- SCM detection: `src/services/core/scm-detector-service.ts`
9+
- Model picker: `src/services/core/model-picker-service.ts`
10+
- Token statistics: `src/services/core/token-stats-service.ts`
11+
- Error handling: `src/services/error-handling/*`
12+
- Code review report generator: `src/services/reporting/code-review-report-generator.ts`
13+
14+
## Removed in This Refactor
15+
16+
- `src/services/scm-detector-service.ts`
17+
- `src/services/model-picker-service.ts`
18+
- `src/services/token-stats-service.ts`
19+
- `src/services/error-classification.ts`
20+
- `src/services/error-context.ts`
21+
- `src/services/error-translation.ts`
22+
- `src/services/enhanced-error-handler.ts`
23+
- `src/services/code-review-report-generator.ts`
24+
- `src/commands/select-model-command.ts`
25+
- `src/commands/show-token-stats-command.ts`
26+
- `src/commands/reset-token-stats-command.ts`
27+
- `src/services/core/commit-generation-coordinator.ts`
28+
- `src/core/generation-orchestrator.ts`
29+
- `src/core/generation-transaction.ts`
30+
- `src/core/generation-gate.ts`
31+
32+
## No-Gray-Area Rule Applied
33+
34+
Each disconnected key module now has an explicit status:
35+
36+
- Removed now.

0 commit comments

Comments
 (0)