diff --git a/src/vscode_plugin/changelog.md b/src/vscode_plugin/changelog.md
new file mode 100644
index 0000000000000000000000000000000000000000..d559bd8acfae6e35016b7adc8928fa93e3431885
--- /dev/null
+++ b/src/vscode_plugin/changelog.md
@@ -0,0 +1,18 @@
+# ChangeLog
+
+## 0.0.2 - 2024-12-17
+
+### 新增功能
+
+1. 新增napi && aki snippets,详见:[snippetsApi](https://gitee.com/openharmony/napi_generator/tree/master/src/vscode_plugin/docs/snippetsApi.md)
+
+2. 新增 OpenHarmony 交叉编译功能,详见:[OpenHarmony 交叉编译](https://gitee.com/openharmony/napi_generator/tree/master/src/vscode_plugin/doc/ohCrossCompile.md)
+
+### Bug修复
+
+暂无
+
+### 其它变更
+
+插件的readme文件更新:添加了关于 snippets 功能和 OpenHarmony 交叉编译 功能的说明,方便用户在VSCode插件市场查看插件信息时快速了解新增功能的使用方法。
+
diff --git a/src/vscode_plugin/docs/snippetsApi.md b/src/vscode_plugin/docs/snippetsApi.md
new file mode 100644
index 0000000000000000000000000000000000000000..429755f0fc2ccad3099ed8c6e17d47fcb2f52efc
--- /dev/null
+++ b/src/vscode_plugin/docs/snippetsApi.md
@@ -0,0 +1,194 @@
+# Snippets
+
+**Napi snippets**
+
+
+
+ | 版本 |
+ 场景 |
+ 命令 |
+ 描述 |
+
+
+ | 0.0.1 |
+ 类 |
+ napiclass |
+ napi类使用场景代码片段 |
+
+
+ | 结构体 |
+ napistruct |
+ napi结构体使用场景代码片段 |
+
+
+ | 线程安全 |
+ napiasyncthreadsafefunc |
+ napi线程安全使用场景代码片段 |
+
+
+ | 枚举 |
+ napienum |
+ napi枚举使用场景代码片段 |
+
+
+ | 异步工作 |
+ napiasyncwork |
+ napi异步工作使用场景代码片段 |
+
+
+ | napicallfunc |
+ napi回调代码片段,结合napiasyncwork使用 |
+
+
+ | napicreatepromise |
+ napi创建promise代码片段,结合napiasyncwork使用 |
+
+
+ | napiresolvedeferred |
+ 接受napicreatepromise创建的promise值代码片段 |
+
+
+ | napirejectdeferred |
+ 拒绝napicreatepromise创建的promise值代码片段 |
+
+
+ | 输入输出 |
+ napidoublein |
+ napi输入double类型数据代码片段 |
+
+
+ | napiint32in |
+ napi输入int32_t类型数据代码片段 |
+
+
+ | napiuint32in |
+ napi输入uint32_t类型数据代码片段 |
+
+
+ | napiint64in |
+ napi输入int64_t类型数据代码片段 |
+
+
+ | napiboolin |
+ napi输入bool类型数据代码片段 |
+
+
+ | napistringutf8in |
+ napi输入string utf8类型数据代码片段 |
+
+
+ | napistringutf16in |
+ napi输入string utf16类型数据代码片段 |
+
+
+ | napiisarray |
+ napi判断输入数据是否是array代码片段 |
+
+
+ | napiarrayin |
+ napi输入array类型数据代码片段 |
+
+
+ | napiarrayout |
+ napi输出array类型数据代码片段 |
+
+
+ | napidoubleout |
+ napi输出double类型数据代码片段 |
+
+
+ | napiint32out |
+ napi输出int32_t类型数据代码片段 |
+
+
+ | napiuint32out |
+ napi输出uint32_t类型数据代码片段 |
+
+
+ | napiint64out |
+ napi输出int64_t类型数据代码片段 |
+
+
+ | napiboolout |
+ napi输出bool类型数据代码片段 |
+
+
+ | napistringutf8out |
+ napi输出string utf8类型数据代码片段 |
+
+
+ | napistringutf16out |
+ napi输出string utf16类型数据代码片段 |
+
+
+ | napistructrefin |
+ napi输入struct引用代码片段 |
+
+
+ | napistructrefout |
+ napi输出struct引用代码片段 |
+
+
+ | napiclassrefin |
+ napi输入class引用代码片段 |
+
+
+ | napiclassrefout |
+ napi输出class引用代码片段 |
+
+
+ | napiarrayrefin |
+ napi输入array引用代码片段 |
+
+
+ | napiarrayrefout |
+ napi输出array引用代码片段 |
+
+
+ | 错误处理 |
+ napigetlasterrorinfo |
+ 获取最后一次napi调用失败相关的错误信息代码片段 |
+
+
+ | napithrowerror |
+ napi抛出JS错误对象代码片段 |
+
+
+
+
+**Aki snippets**
+
+
+
+ | 版本 |
+ 场景 |
+ 命令 |
+ 描述 |
+
+
+ | 0.0.1 |
+ 类 |
+ akiclass |
+ aki 类使用场景代码片段 |
+
+
+ | 结构体 |
+ akistruct |
+ aki 结构体使用场景代码片段 |
+
+
+ | 枚举 |
+ akienum |
+ aki 枚举使用场景代码片段 |
+
+
+ | 同步方法 |
+ akisyncfunc |
+ aki同步方法使用场景代码片段 |
+
+
+ | 异步方法 |
+ akiasyncfunc |
+ aki异步方法使用场景代码片段 |
+
+
\ No newline at end of file
diff --git a/src/vscode_plugin/images/snippets_use.png b/src/vscode_plugin/images/snippets_use.png
new file mode 100644
index 0000000000000000000000000000000000000000..0de22e72bc141786732f0efa8e602ee69f58ef77
Binary files /dev/null and b/src/vscode_plugin/images/snippets_use.png differ
diff --git a/src/vscode_plugin/package.json b/src/vscode_plugin/package.json
index 6cd37bc1bd713eb211aaeeef336109d167b864f4..f93d0f8fd17b957736ec154f89ae2a0f70900418 100644
--- a/src/vscode_plugin/package.json
+++ b/src/vscode_plugin/package.json
@@ -175,6 +175,7 @@
},
"devDependencies": {
"@types/node": "^16.17.0",
+ "@types/tar": "^6.1.13",
"@types/vscode": "^1.73.0",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"@typescript-eslint/parser": "^5.30.0",
@@ -183,6 +184,7 @@
"dependencies": {
"vsce": "^2.15.0",
"typescript": "^4.7.2",
- "@vscode/l10n": "^0.0.10"
+ "@vscode/l10n": "^0.0.10",
+ "tar": "^7.4.3"
}
}
diff --git a/src/vscode_plugin/readme.md b/src/vscode_plugin/readme.md
index 3c4f617d33b5e24aad54268d6acfae4e8804baed..8a131dad648a33068d4fde043d1d5117aaa5205a 100644
--- a/src/vscode_plugin/readme.md
+++ b/src/vscode_plugin/readme.md
@@ -30,6 +30,8 @@ napi-gen插件为OpenHarmony开发者提供模板生成(**sa**模板、**hdf**
- **OpenHarmony交叉编译**:根据三方库中Makefile或CmakeLists,调用OpenHarmony SDK中提供的工具链进行交叉编译,拼装 make 及 make install 命令并调用终端执行。生成对应于目标系统架构的二进制文件及头文件,默认安装至三方库路径下ohCrossCompile目录中。
+- **snippets**: 根据 [snippetsApi](https://gitee.com/openharmony/napi_generator/tree/master/src/vscode_plugin/docs/snippetsApi.md) 中提供的命令提供各场景(结构体、枚举等)napi、Aki开发代码片段。
+
## 使用:
- **方式1**: 右键.h文件在弹出菜单里选择子菜单 **[OHOS_Gen]** 内的功能:
@@ -40,6 +42,10 @@ napi-gen插件为OpenHarmony开发者提供模板生成(**sa**模板、**hdf**

+ 对于snippets功能,在cpp文件中输入 [snippetsApi](https://gitee.com/openharmony/napi_generator/tree/master/src/vscode_plugin/docs/snippetsApi.md) 中提供的命令即可生成napi、Aki各场景的代码片段:
+
+ 
+
- **方式2**: 通过在工具栏选择 **[帮助]** -> **[显示所有命令]** 或者 快捷命令 **[ctrl + shift + p]** 在弹出窗口里输入h2dts等命令使用功能