Skip to content

Commit e706394

Browse files
committed
添加图标
1 parent a6f3efb commit e706394

File tree

3 files changed

+53
-26
lines changed

3 files changed

+53
-26
lines changed

README.md

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,67 @@
11
# CodeReDesign
22

3-
**CodeReDesign** 是一个 VSCode 插件,旨在配合DeepSeek API。帮助开发者更高效地进行代码重构和重新设计。通过提供文件选择、代码合并文件生成、SeepSeek API 上传和接收,本地代码应用,CodeReDesign 让代码重构变得更加简单和流畅。
3+
**CodeReDesign** is a VSCode extension designed to work with the DeepSeek API. It helps developers perform code refactoring and redesign more efficiently. By providing file selection, code merging into a unified markdown file, uploading and receiving suggestions via the DeepSeek API, and local application of code changes, CodeReDesign simplifies and streamlines the refactoring process.
4+
5+
**CodeReDesign** 是一个 VSCode 插件,旨在配合 DeepSeek API,帮助开发者更高效地进行代码重构和重新设计。通过提供文件选择、代码合并为统一的 markdown 文件、上传和接收 DeepSeek API 的重构建议,并在本地应用代码变更,CodeReDesign 使得代码重构变得更加简单和流畅。
46

57
---
68

7-
## 功能特性
9+
## Features / 功能特性
10+
11+
- **File Selector**: Select multiple source files in the current working directory and merge them into a unified CVB file (markdown format).
12+
- **API Call**: Upload the CVB file to DeepSeek API and get refactoring suggestions.
13+
- **Version Management**: Supports tracking the history of multiple refactor versions. CVB files can be applied locally or rolled back.
14+
- **Multi-language Support**: Supports multiple programming languages including C++, Python, Lua, TypeScript, etc.
815

9-
- **文件选择器**:支持选择当前工作目录下的多个源文件,打包成一个统一的类markdown文件(CVB格式)。
16+
- **文件选择器**:支持选择当前工作目录下的多个源文件,并将其合并为统一的 CVB 文件(markdown 格式)。
1017
- **API 调用**:上传 CVB 文件并调用 DeepSeek API,获取重构建议。
11-
- **版本管理**:支持多个次重构的历史记录, CVB 在本地可选应用和回滚
18+
- **版本管理**:支持多个次重构的历史记录,CVB 文件可以在本地应用或回滚
1219
- **多语言支持**:支持 C++、Python、Lua、TypeScript 等多种编程语言。
1320

14-
## 使用方法
21+
## Usage / 使用方法
22+
23+
#### Before using, you need to set the DeepSeek API Key
24+
Go to `File -> Preferences -> Settings` (文件 -> 首选项 -> 设置).
25+
26+
Search for `coderedesign`.
27+
28+
Enter your DeepSeek API Key in the **Deep Seek Api Key** field.
1529

16-
#### 使用前需要先设置DeepSeek API 的Key
17-
File -> Preferences -> Settings(文件 -> 首选项 -> 设置)
30+
#### Commands / 指令:
1831

19-
搜索 coderedesign
32+
1. **codeReDesign.generateCvb** (Generate CVB File)
33+
- Package the code that needs refactoring into CVB format.
34+
- Select the files you need and press enter.
35+
- Enter a version name, for example "Initial Version of Multi-process Refactoring".
36+
- A timestamped CVB file (e.g., `timestamp-versionName.cvb`) will be created in the `.CodeReDesignWorkSpace` directory. This file can be viewed in markdown format.
37+
38+
2. **codeReDesign.uploadCvb** (Upload CVB File)
39+
- Select a CVB file that has already been created locally and upload it to DeepSeek.
40+
- Enter a prompt for the refactoring request, such as "Refactor these multi-process codes into multi-threading, and change the inter-process communication standard input-output handles to lock-free queues".
41+
- DeepSeek will process the request and provide refactoring suggestions. You can see the intermediate steps in the output box.
42+
- Once done, a new CVB file will be created locally.
43+
44+
3. **codeReDesign.applyCvb** (Apply CVB File)
45+
- After reviewing the suggestions, you can apply the CVB file by using this command.
46+
- It will overwrite the local files with the refactored code as described in the CVB file.
47+
48+
---
2049

21-
在 Deep Seek Api Key(DeepSeek API 密钥)
22-
里填写你在DeepSeek哪里申请到的Key
50+
#### 示例指令:
2351

24-
#### 指令:
25-
ctrl + shift + p 打开指令菜单(Command Palette),有以下几个指令可用
52+
1. **codeReDesign.generateCvb**(生成 CVB 文件)
53+
- 打包需要重构的代码为 CVB 格式。
54+
- 选中你需要的文件,回车。
55+
- 给这些文件取一个版本名,比如输入 "准备重构多进程-初始版本"。
56+
- 会在本地 `.CodeReDesignWorkSpace` 目录下生成一个时间戳+版本名的 `.cvb` 文件,可以使用 markdown 格式查看。
2657

27-
1. codeReDesign.generateCvb(生成 CVB 文件)
28-
打包需要重构的代码为 CVB 格式
29-
选中你需要的文件,回车
30-
给这些文件取一个版本名,比如输入 "准备重构多进程-初始版本"
31-
会在本地 .CodeReDesignWorkSpace 目录下生成一个 时间戳+版本名.cvb 的文件,可以使用 markdown 格式查看
58+
2. **codeReDesign.uploadCvb**(上传 CVB 文件)
59+
- 选择一个本地已经打包好的 CVB 格式文件,上传到 DeepSeek。
60+
- 输入你希望重构的提示词,比如 "把这些代码里的多进程重构为多线程,注意要把进程间通讯的标准输出输入句柄改为无锁队列"。
61+
- DeepSeek 会开始帮你重构,你可以在输出框看到中间过程。
62+
- 输出完毕,会在本地创建一个新的 CVB 格式文件。
3263

33-
2. codeReDesign.uploadCvb(上传 CVB 文件)
34-
选择一个本地已经打包好的 CVB 格式文件,上传到 DeepSeek
35-
输入你希望重构的提示词,比如 "把这些代码里的多进程重构为多线程,注意要把进程间通讯的标准输出输入句柄改为无锁队列"
36-
然后 DeepSeek 就会开始帮你重构,你可以在输出框看到中间过程
37-
输出完毕,会在本地创建一个新的 CVB 格式文件
64+
3. **codeReDesign.applyCvb**(应用 CVB 文件)
65+
- 如果查看后觉得没问题,可以用这个指令。
66+
- 将这个 CVB 格式文件展开并覆盖本地文件。
3867

39-
3. codeReDesign.applyCvb(应用 CVB 文件)
40-
如果查看后觉得没问题,可以用这个指令
41-
将这个 CVB 格式文件展开覆盖本地文件

images/icon.png

556 KB
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "CodeReDesign",
33
"displayName": "CodeReDesign",
4-
"description": "A VSCode extension for code refactoring and redesign.",
4+
"description": "A VSCode extension for code refactoring and redesign by DeepSeek API.",
55
"publisher": "shellingye",
6+
"icon": "images/icon.png",
67
"version": "0.0.2",
78
"engines": {
89
"vscode": "^1.96.0"

0 commit comments

Comments
 (0)