Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Preview Build (roadmap2026)
run-name: Preview Build - ${{ github.actor }}

on:
push:
branches:
- roadmap2026
workflow_dispatch:

env:
REPO_PATH: ${{ github.repository }}
NODE_VERSION: '20.19.2'
PNPM_VERSION: '10.8.1'

jobs:
build-preview:
name: Build ROO CODEP Preview
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Typo in Job Name

Build ROO CODEP Preview should be Build ROO CODE Preview (missing the 'E' in CODE).

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: roadmap2026

- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run Tests
run: |
cd src
npx vitest run core/image-storage/__tests__/ImageManager.spec.ts core/memory/__tests__/MemoryMonitor.test.ts core/task/__tests__/message-index.test.ts core/task/__tests__/Task.imageIntegration.test.ts core/task/__tests__/Task.debounce.test.ts core/task/__tests__/Task.dispose.test.ts
continue-on-error: false

- name: Build Extension
run: |
pnpm clean
pnpm build
pnpm bundle
- name: Package VSIX
run: pnpm vsix

- name: Get Version
id: get-version
run: |
VERSION=$(node -p "require('./src/package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extension Version: $VERSION"
- name: Upload VSIX Artifact
uses: actions/upload-artifact@v4
with:
name: roo-codep-preview-${{ steps.get-version.outputs.version }}
path: bin/*.vsix
retention-days: 30

- name: Create Release
if: github.event_name == 'workflow_dispatch'
uses: softprops/action-gh-release@v2
with:
tag_name: preview-v${{ steps.get-version.outputs.version }}
name: ROO CODEP Preview v${{ steps.get-version.outputs.version }}
body: |
## ROO CODEP Preview Build
🔬 **This is a PREVIEW version for testing roadmap2026 improvements**
### Included Improvements:
- ✅ Phase 1: Premature completion fixes
- ✅ Phase 2: Message importance scoring & smart retention
- ✅ Phase 3: Image externalization, memory monitoring, and performance optimizations
### Test Results:
- 76 tests passed
### Installation:
1. Download the `.vsix` file below
2. Open VS Code
3. Go to Extensions view (Ctrl+Shift+X)
4. Click "..." menu → "Install from VSIX..."
5. Select the downloaded file
⚠️ **Note**: This is a preview build for testing purposes. Do not use in production.
files: bin/*.vsix
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Summary
run: |
echo "## 🎉 Preview Build Complete!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version**: ${{ steps.get-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "**Branch**: roadmap2026" >> $GITHUB_STEP_SUMMARY
echo "**Build Time**: $(date)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Artifacts" >> $GITHUB_STEP_SUMMARY
echo "- VSIX file uploaded as artifact" >> $GITHUB_STEP_SUMMARY
echo "- Available for 30 days" >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ logs

# Qdrant
qdrant_storage/
qdrant/qdrant_data
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Inconsistent Ignore Pattern

Line 51 uses qdrant_storage/ (with trailing slash) while line 52 uses qdrant/qdrant_data (without trailing slash). For consistency and clarity, both should use the same pattern style. Recommend:

qdrant_storage/
qdrant/qdrant_data/

132 changes: 132 additions & 0 deletions docs/01-project-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Roo-Code 项目概览

## 项目简介

Roo-Code 是一个基于 VSCode 的 AI 编程助手扩展,通过集成多种 AI 模型和智能工具,帮助开发者更高效地完成编程任务。

## 技术架构

### 架构模式

- **Monorepo 架构**: 使用 pnpm workspace 管理多个包
- **VSCode 扩展**: 基于 VSCode Extension API 构建
- **事件驱动**: 大量使用 EventEmitter 模式进行组件通信
- **单例模式**: 核心服务(如 CodeIndexManager)采用单例设计
- **工厂模式**: ServiceFactory 负责创建和管理服务实例

### 核心技术栈

- **语言**: TypeScript
- **测试框架**: Vitest
- **构建工具**: esbuild
- **包管理**: pnpm workspace
- **前端**: React + Vite
- **AI 集成**: 支持 Anthropic、OpenAI、OpenRouter 等多种 AI 提供商
- **浏览器自动化**: Puppeteer
- **向量数据库**: Qdrant

## 核心组件

### 1. Task (任务系统)

- 管理任务生命周期
- 处理 API 对话
- 协调工具调用
- 管理子任务

### 2. Terminal (终端系统)

- **TerminalRegistry**: 终端池管理(最多5个)
- **Terminal**: VSCode 终端集成
- **ExecaTerminal**: 命令执行引擎

### 3. ClineProvider (提供者)

- WebView 生命周期管理
- 任务创建和切换
- 状态同步
- 配置管理

### 4. CodeIndexManager (索引管理)

- 代码库语义索引
- 向量搜索
- 增量更新
- 缓存管理

## 项目结构

```
Roo-Code/
├── src/ # 核心扩展代码
│ ├── core/ # 核心功能模块
│ ├── api/ # API 集成
│ ├── integrations/ # 外部集成
│ └── services/ # 业务服务
├── webview-ui/ # React WebView UI
├── packages/ # 共享包
│ ├── types/ # 类型定义
│ ├── cloud/ # 云服务
│ └── evals/ # 评估系统
├── apps/ # 应用程序
│ ├── web-roo-code/ # 官方网站
│ ├── web-evals/ # 评估 Web 界面
│ └── vscode-e2e/ # E2E 测试
└── qdrant/ # 向量数据库配置
```

## 关键技术特性

### Shell Integration

- 与 VSCode 终端深度集成
- 实时捕获命令输出
- 智能终端复用

### Sliding Window Context

- 对话历史管理
- 自动截断机制(75%阈值)
- 保持上下文连贯性

### Context Condensing

- LLM 驱动的智能压缩
- 保留最近3条消息
- 确保至少20%的压缩率

### MCP (Model Context Protocol)

- 扩展工具能力
- 统一的工具接口
- 支持自定义工具

### Git Checkpoints

- 基于 Git 的检查点系统
- 支持任务回滚
- 保护代码安全

## 开发工作流

1. **任务创建**: 用户通过 WebView 或命令面板创建任务
2. **API 对话**: Task 通过 API 与 AI 模型交互
3. **工具调用**: AI 决策后调用相应工具
4. **状态同步**: 结果同步回 WebView 显示
5. **任务完成**: 用户确认或继续迭代

## 扩展能力

- **多模型支持**: 支持20+种 AI 模型
- **多语言支持**: 国际化支持多种语言
- **模式系统**: 可自定义不同工作模式
- **云同步**: 支持云端状态同步
- **代码索引**: 语义搜索代码库

## 相关文档

- [命令执行流程](./02-command-execution-flow.md)
- [上下文压缩机制](./03-context-compression.md)
- [完整工作流程](./04-complete-workflow.md)
- [目录结构详解](./05-directory-structure.md)
- [代码库索引流程](./06-codebase-indexing.md)
Loading