Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
70411ef
refactor: remove unused type declaration files and backup package.jso…
BernardXiong Jul 20, 2025
0c4d586
feat: add environment installation and management features with statu…
BernardXiong Jul 24, 2025
b141784
feat: update version to 0.4.12 and add SDK management features with R…
BernardXiong Jul 28, 2025
b29432f
feat: add layout and SDK manager views with styles
BernardXiong Jul 28, 2025
427d396
feat: add TypeScript declaration file for Vue components
BernardXiong Jul 28, 2025
0e3f265
feat: 添加 RT-Thread 配置文件说明文档,更新环境设置和日志显示功能
BernardXiong Jul 30, 2025
1068998
添加ref到忽略名单中
BernardXiong Aug 5, 2025
e784052
feat: 添加 CLAUDE.md 文件,提供 RT-Thread 开发指导和常用命令
BernardXiong Aug 5, 2025
b035515
feat: 重构环境和工具链设置视图,优化样式和功能,添加工具链配置页面
BernardXiong Aug 5, 2025
4359912
Refactor SDK and Env Management in Webview
BernardXiong Aug 6, 2025
833b72b
feat: 优化SDK版本选择功能,添加单选按钮样式,保存SDK配置到.config文件
BernardXiong Aug 7, 2025
f2a091d
feat: 更新头部logo文本,添加“配置”以明确功能
BernardXiong Aug 9, 2025
aac066b
feat: 注释掉删除和保存操作的成功提示消息
BernardXiong Aug 9, 2025
05b48df
feat: 添加“关于”页面到命令树,注册相关命令
BernardXiong Aug 10, 2025
30c76d1
feat: 添加日志模态窗口,支持实时更新日志显示及强制关闭功能
BernardXiong Aug 10, 2025
c27c26f
feat: 添加依赖项 @xterm/addon-fit 和 @xterm/xterm 到 package.json
BernardXiong Aug 10, 2025
22795e1
feat: 更新 package-lock.json 版本并添加 @xterm/addon-fit 和 @xterm/xterm 依赖,启…
BernardXiong Aug 11, 2025
f744539
feat: 将安装过程中的消息本地化为中文,增强用户体验
BernardXiong Aug 19, 2025
df42067
feat: 增加banner 组件
Aug 20, 2025
6306c92
Merge branch 'main' into sunxianfu
Aug 20, 2025
e71531e
feat: 引入 banner
Aug 20, 2025
09dbc27
feat: 统一banner
Aug 20, 2025
6233c38
Merge branch 'sunxianfu' into 'dev'
Aug 21, 2025
99b78a1
feat: 修改版本号
Aug 21, 2025
aacb4a9
更新.gitlab-ci.yml文件
Aug 21, 2025
92c4d71
更新.gitlab-ci.yml文件
Aug 22, 2025
3522691
feat: 增加打包命令
Aug 22, 2025
3bcdc64
Merge branch 'sunxianfu' of https://support.rt-thread.com/cooperation…
Aug 22, 2025
57404d4
更新.gitlab-ci.yml文件
Aug 22, 2025
8a26632
feat: 修改标题
Aug 23, 2025
7d30e93
Merge branch 'sunxianfu' of https://support.rt-thread.com/cooperation…
Aug 23, 2025
94f7db9
Merge branch 'sunxianfu' into 'dev'
BernardXiong Aug 23, 2025
857fa2b
feat: 修复切换 tab 显示问题,修改标题
Aug 26, 2025
b635a1f
Merge branch 'sunxianfu' into 'dev'
BernardXiong Aug 26, 2025
4d5b25a
feat: 修复标题问题
Aug 26, 2025
2af5f2e
Merge branch 'sunxianfu' into 'dev'
BernardXiong Aug 26, 2025
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ node_modules
.vscode-test/
*.vsix
package-lock.json

# Reference code (not included in build)
ref/

# Auto-generated type declaration files
src/vue/auto-imports.d.ts
src/vue/components.d.ts
19 changes: 19 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
image: node:22
stages:
- deploy

deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
script:
- npm config set registry https://registry.npmmirror.com
- npm install -g @vscode/vsce
- npm install
- npm run compile
- npm run package:vs
- ls ./
artifacts:
paths:
- "*.vsix" # 所有 .vsix 文件(如 dist/extension.vsix)
expire_in: 1 week # 产物保留 1 周(可选,默认 30 天)
environment: production
when: manual # 标记为手动作业
3 changes: 3 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vscode/**
.vscode-test/**
src/**
ref/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
Expand All @@ -9,7 +10,9 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
**/.vscode-test.*
# Exclude all node_modules except marked
**/node_modules/**
!node_modules/marked/**
**/.git/**
**/package-lock.json
**/.DS_Store
Expand Down
91 changes: 91 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# CLAUDE.md

此文件为 Claude Code (claude.ai/code) 在本仓库中工作时提供指导。

## 项目概述

这是一个用于 RT-Thread 和 RT-Thread Smart 开发的 VS Code 扩展。该扩展遵循最小化干预 VS Code 的原则,同时允许用户使用 RT-Thread 的脚本功能进行个性化定制。

## 常用命令

### 开发相关
```bash
# Install dependencies
npm install

# Build Vue frontend (required before extension build)
npm run build:vue

# Compile TypeScript extension
npm run compile

# Watch mode for development
npm run watch

# Lint the code
npm run lint

# Run tests
npm run test

# Build extension package
npm run vscode:prepublish
```

### Vue 前端开发(在 src/vue 工作区中)
```bash
cd src/vue
npm install
npm run dev # Development server
npm run build # Production build
```

## 架构说明

### 扩展结构
- **主入口**: `src/extension.ts` - 基于 `rtconfig.h` 或 `.vscode/workspace.json` 的存在来激活
- **两种运行模式**:
- **项目模式** (`isRTThread`): 包含 `rtconfig.h` 的单个 RT-Thread 项目
- **工作区模式** (`isRTThreadWorksapce`): 通过 `.vscode/workspace.json` 管理的多个 BSP 项目

### 核心组件
1. **Webviews** (`src/webviews/`): 管理基于 Vue 的 UI 面板
- 设置、关于、创建项目、项目视图
- 每个 webview 在 `src/vue/` 中都有对应的 Vue 应用

2. **项目管理** (`src/project/`):
- 文件资源管理器的树形提供器
- 用于视觉指示的文件装饰提供器
- BSP 项目的命令执行

3. **终端集成** (`src/terminal.ts`):
- 管理 RT-Thread 终端会话
- 执行构建命令和自定义菜单命令

4. **虚拟环境** (`src/venv.ts`):
- Windows 特定的 Python 虚拟环境设置
- 管理 env 脚本安装

### 配置文件
- **`.vscode/workspace.json`**: 多 BSP 工作区配置
- **`.vscode/project.json`**: 单个项目文件结构(由 scons 生成)
- **`~/.env/cfg.json`**: RT-Thread 源码路径配置
- **`~/.env/tools/scripts/sdk_cfg.json`**: 工具链配置

### 构建系统
- TypeScript 编译为 CommonJS 用于 VS Code 扩展
- Vue 3 + Element Plus 前端使用 Vite 构建
- 多页面 Vue 应用构建到 `out/` 目录
- 通过 `smart.parallelBuidNumber` 设置支持并行构建

### 关键设置
- `smart.menuCommands`: 自定义终端命令数组
- `smart.parallelBuidNumber`: 并行构建的 CPU 核心数

## 重要说明

1. 扩展仅在 RT-Thread 项目中激活(包含 `rtconfig.h` 或工作区配置)
2. Windows 系统在首次运行时需要设置 Python 虚拟环境
3. 必须先构建 Vue 前端再编译扩展
4. 扩展集成了 Python 扩展(`ms-python.python`)
5. 文件装饰器在工作区模式下标记当前活动的 BSP
Loading