feat(checkpoint): 添加 Checkpoint 可视化管理功能
Core 层增强:
- 添加 safety.ts: 7点安全检查机制
- 添加 session-tracker.ts: 会话级检查点跟踪
- 添加 lock.ts: 并发控制文件锁
- 添加 lfs.ts: Git LFS 大文件支持
- 添加 path-validator.ts: 路径验证
- 添加 commit-message.ts: 智能提交消息生成
- 增强 manager.ts: 支持三种恢复模式、unrevert 撤销回滚
Server 层:
- 添加 checkpoints.ts: 16个 REST API 端点
- GET/POST /checkpoints: 列表/创建检查点
- GET/DELETE /checkpoints/🆔 获取/删除检查点
- GET /checkpoints/:id/diff: 获取差异
- POST /checkpoints/:id/restore: 恢复到检查点
- POST /checkpoints/unrevert: 撤销回滚
- GET /checkpoints/:id/safety-check: 安全检查
UI 层:
- 添加 CheckpointPanel.tsx: 检查点列表面板
- 添加 CheckpointDiffViewer.tsx: 差异查看器
- 添加 RestoreDialog.tsx: 恢复确认对话框
- 添加 16 个 API 客户端函数
- 添加完整的 TypeScript 类型定义
Web/Desktop 集成:
- 添加 History 按钮到工具栏
- 集成 CheckpointPanel 组件
This commit is contained in:
@@ -44,6 +44,53 @@ export type {
|
||||
CommandOperationResult,
|
||||
} from './commands/index.js';
|
||||
|
||||
// Checkpoint
|
||||
export {
|
||||
CheckpointManager,
|
||||
getCheckpointManager,
|
||||
initCheckpointManager,
|
||||
resetCheckpointManager,
|
||||
ShadowGit,
|
||||
createShadowGit,
|
||||
hashWorkingDir,
|
||||
CheckpointSafetyChecker,
|
||||
createSafetyChecker,
|
||||
SessionTracker,
|
||||
createSessionTracker,
|
||||
CheckpointLock,
|
||||
LFSPatternLoader,
|
||||
createLFSPatternLoader,
|
||||
isCommonLargeFile,
|
||||
COMMON_LARGE_FILE_EXTENSIONS,
|
||||
WorkspacePathValidator,
|
||||
createPathValidator,
|
||||
CommitMessageGenerator,
|
||||
createCommitMessageGenerator,
|
||||
RestoreMode,
|
||||
DEFAULT_CHECKPOINT_CONFIG,
|
||||
} from './checkpoint/index.js';
|
||||
|
||||
export type {
|
||||
CheckpointMetadata,
|
||||
CheckpointConfig,
|
||||
CheckpointTrigger,
|
||||
FileChange,
|
||||
FileChangeType,
|
||||
DiffInfo,
|
||||
FileDiff,
|
||||
RollbackOptions,
|
||||
RollbackResult,
|
||||
CheckpointEvent,
|
||||
CheckpointEventType,
|
||||
CheckpointEventListener,
|
||||
RollbackRecord,
|
||||
UnrevertResult,
|
||||
SafetyCheckResult,
|
||||
SessionState,
|
||||
SessionStats,
|
||||
PathValidationResult,
|
||||
} from './checkpoint/index.js';
|
||||
|
||||
const program = new Command();
|
||||
|
||||
// MCP 管理器实例
|
||||
|
||||
Reference in New Issue
Block a user