Skip to content

Commit 874e810

Browse files
committed
2 parents 4920582 + 3fbc4d2 commit 874e810

17 files changed

+626
-159
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,66 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### 0.0.195 (2025-05-02)
6+
7+
### 0.0.194 (2025-05-02)
8+
9+
### 0.0.193 (2025-05-02)
10+
11+
### 0.0.192 (2025-05-02)
12+
13+
### 0.0.191 (2025-05-02)
14+
15+
### 0.0.190 (2025-05-01)
16+
17+
### 0.0.189 (2025-05-01)
18+
19+
20+
### Features
21+
22+
* 增加历史聊天续聊的功能 ([6cd946d](https://github.com/yefansky/CodeReDesign/commit/6cd946d57167b59f15145a6dac136ecec6ce57a2))
23+
24+
### 0.0.188 (2025-05-01)
25+
26+
### 0.0.187 (2025-05-01)
27+
28+
### 0.0.186 (2025-05-01)
29+
30+
### 0.0.185 (2025-05-01)
31+
32+
33+
### Bug Fixes
34+
35+
* 代码重构,变量名修改, upload改为redesign, compress 改为 summary ([db3dcf2](https://github.com/yefansky/CodeReDesign/commit/db3dcf26db0d1c0278bfed1e0580e64db62d98bf))
36+
37+
### 0.0.184 (2025-05-01)
38+
39+
### 0.0.183 (2025-05-01)
40+
41+
### 0.0.182 (2025-05-01)
42+
43+
### 0.0.181 (2025-05-01)
44+
45+
### 0.0.180 (2025-05-01)
46+
47+
### 0.0.179 (2025-05-01)
48+
49+
### 0.0.178 (2025-05-01)
50+
51+
### 0.0.177 (2025-04-30)
52+
53+
### 0.0.176 (2025-04-30)
54+
55+
### 0.0.175 (2025-04-30)
56+
57+
### 0.0.174 (2025-04-30)
58+
59+
### 0.0.173 (2025-04-29)
60+
61+
### 0.0.172 (2025-04-29)
62+
63+
### 0.0.171 (2025-04-29)
64+
565
### 0.0.170 (2025-04-29)
666

767
### 0.0.169 (2025-04-29)

README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010
- **API 调用**:上传 CVB 文件并调用 DeepSeek API,获取重构建议。
1111
- **版本管理**:支持多个次重构的历史记录,CVB 在本地可选应用和回滚。
1212
- **多语言支持**:支持 C++、Python、Lua、TypeScript 等多种编程语言。
13-
- **右键菜单支持**:在资源管理器中,右键点击 `.cvb` 文件时,会显示一个上下文菜单,包含 `applyThisCvb``uploadThisCvb``analyzeThisCvb` 三个选项。
13+
- **右键菜单支持**:在资源管理器中,右键点击 `.cvb` 文件时,会显示一个上下文菜单,包含 `applyThisCvb``redesignThisCvb``analyzeThisCvb` 三个选项。
1414
- **CVB 文件视图**:在 VSCode 的侧边栏中,新增了一个 `CVB Actions` 视图,用于显示当前工作区中的所有 `.cvb` 文件,并支持通过点击文件来打开或操作它们。
15+
- **交互式聊天**:内置聊天界面,可直接与 DeepSeek 模型进行对话交流。
16+
- **文件预览**:支持 CVB/MD/聊天文件的格式化预览,自动美化显示效果。
17+
- **高级模型配置**:支持多达10个自定义模型配置,可灵活切换不同API端点。
18+
- **文件摘要**:可对CVB文件进行智能摘要,提取关键信息生成精简版本。
19+
- **单文件操作**:支持直接对单个文件进行分析和重构,无需打包成CVB格式。
1520

1621
除了直接通过指令操作,
1722

@@ -64,7 +69,7 @@ File -> Preferences -> Settings(文件 -> 首选项 -> 设置)
6469
给这些文件取一个版本名,比如输入 "准备重构多进程-初始版本"。
6570
会在本地 `.CodeReDesignWorkSpace` 目录下生成一个时间戳+版本名.cvb 的文件,可以使用 markdown 格式查看。
6671

67-
2. **codeReDesign.uploadCvb**(上传 CVB 文件)
72+
2. **codeReDesign.redesignCvb**(上传 CVB 文件)
6873
选择一个本地已经打包好的 CVB 格式文件,上传到 DeepSeek。
6974
输入你希望重构的提示词,比如 "把这些代码里的多进程重构为多线程,注意要把进程间通讯的标准输出输入句柄改为无锁队列"。
7075
然后 DeepSeek 就会开始帮你重构,你可以在输出框看到中间过程。
@@ -75,13 +80,13 @@ File -> Preferences -> Settings(文件 -> 首选项 -> 设置)
7580
将这个 CVB 格式文件展开覆盖本地文件。
7681

7782
4. **codeReDesign.stopOperation**(中断处理)
78-
中断正在执行的 `uploadCvb` 操作
83+
中断正在执行的DeepSeek操作
7984

8085
5. **codeReDesign.analyzeCode**(分析代码)
8186
选择一个 CVB 文件并输入分析需求,DeepSeek 会分析代码并返回分析结果。
8287

83-
6. **codeReDesign.uploadThisCvb**(上传当前 CVB 文件)
84-
在资源管理器中右键点击 `.cvb` 文件,选择 `Upload This CVB`,上传当前选中的 CVB 文件并调用 API。
88+
6. **codeReDesign.redesignThisCvb**(上传当前 CVB 文件)
89+
在资源管理器中右键点击 `.cvb` 文件,选择 `redesign This CVB`,上传当前选中的 CVB 文件并调用 API。
8590

8691
7. **codeReDesign.applyThisCvb**(应用当前 CVB 文件)
8792
在资源管理器中右键点击 `.cvb` 文件,选择 `Apply This CVB`,将当前选中的 CVB 文件应用到工作区。
@@ -93,18 +98,23 @@ File -> Preferences -> Settings(文件 -> 首选项 -> 设置)
9398

9499
# CodeReDesign
95100

96-
**CodeReDesign** is a VSCode extension that works with the DeepSeek API to help developers refactor and redesign code more efficiently. By providing file selection, code merging, DeepSeek API upload and download, and local code application, CodeReDesign makes the refactoring process simpler and smoother.
101+
**CodeReDesign** is a VSCode extension that works with the DeepSeek API to help developers refactor and redesign code more efficiently. By providing file selection, code merging, DeepSeek API redesign and download, and local code application, CodeReDesign makes the refactoring process simpler and smoother.
97102

98103
---
99104

100105
## Features
101106

102107
- **File Selector**: Supports selecting multiple source files in the current working directory and packages them into a unified markdown-like file (CVB format).
103-
- **API Calls**: Uploads the CVB file and calls DeepSeek API to get refactoring suggestions.
108+
- **API Calls**: redesigns the CVB file and calls DeepSeek API to get refactoring suggestions.
104109
- **Version Management**: Supports multiple refactoring history records, CVB can be applied and rolled back locally.
105110
- **Multi-language Support**: Supports multiple programming languages like C++, Python, Lua, TypeScript, etc.
106-
- **Right-click Menu Support**: Right-click on a `.cvb` file in the explorer to show a context menu with options to `Apply This CVB`, `Upload This CVB`, and `Analyze This CVB`.
111+
- **Right-click Menu Support**: Right-click on a `.cvb` file in the explorer to show a context menu with options to `Apply This CVB`, `redesign This CVB`, and `Analyze This CVB`.
107112
- **CVB File View**: A new `CVB Actions` view in the sidebar displays all `.cvb` files in the current workspace and allows you to open or operate on them by clicking.
113+
- **Interactive Chat**: Built-in chat interface for direct conversation with DeepSeek models.
114+
- **File Preview**: Supports formatted preview for CVB/MD/chat files with automatic beautification.
115+
- **Advanced Model Configuration**: Supports up to 10 custom model configurations for flexible API endpoint switching.
116+
- **File Summary**: Generates intelligent summaries of CVB files to extract key information.
117+
- **Single File Operations**: Supports direct analysis and redesign of single files without CVB packaging.
108118

109119
## How to Use
110120

@@ -143,8 +153,8 @@ Press `ctrl + shift + p` to open the Command Palette, where the following comman
143153
Name the version, such as "Preparing to refactor multi-process to initial version".
144154
A `.cvb` file with a timestamp and version name will be generated in the `.CodeReDesignWorkSpace` directory, which can be viewed in markdown format.
145155

146-
2. **codeReDesign.uploadCvb** (Upload CVB file)
147-
Select a locally packaged CVB file and upload it to DeepSeek.
156+
2. **codeReDesign.redesignCvb** (redesign CVB file)
157+
Select a locally packaged CVB file and redesign it to DeepSeek.
148158
Enter your refactoring request, such as "Refactor the multi-process code to multi-threading, make sure to change the inter-process communication stdout and stdin handles to lock-free queues".
149159
DeepSeek will start the refactoring process, and you can see the intermediate steps in the output.
150160
After the process finishes, a new CVB file will be created locally.
@@ -153,14 +163,14 @@ Press `ctrl + shift + p` to open the Command Palette, where the following comman
153163
If you review the changes and find them satisfactory, you can use this command.
154164
It will unpack and overwrite the local files with the changes from the CVB file.
155165

156-
4. **codeReDesign.stopOperation** (Stop Upload CVB)
157-
Stop the ongoing upload operation.
166+
4. **codeReDesign.stopOperation** (Stop redesign CVB)
167+
Stop the ongoing deepseek operation.
158168

159169
5. **codeReDesign.analyzeCode** (Analyze Code)
160170
Select a CVB file and enter your analysis request, DeepSeek will analyze the code and return the results.
161171

162-
6. **codeReDesign.uploadThisCvb** (Upload This CVB)
163-
Right-click on a `.cvb` file in the explorer and select `Upload This CVB` to upload the selected CVB file and call the API.
172+
6. **codeReDesign.redesignThisCvb** (redesign This CVB)
173+
Right-click on a `.cvb` file in the explorer and select `redesign This CVB` to redesign the selected CVB file and call the API.
164174

165175
7. **codeReDesign.applyThisCvb** (Apply This CVB)
166176
Right-click on a `.cvb` file in the explorer and select `Apply This CVB` to apply the selected CVB file to the workspace.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A VSCode extension for code refactoring and redesign by DeepSeek API.",
55
"publisher": "shellingye",
66
"icon": "images/icon.png",
7-
"version": "0.0.170",
7+
"version": "0.0.195",
88
"engines": {
99
"vscode": "^1.70.0"
1010
},
@@ -14,13 +14,17 @@
1414
"main": "./dist/extension.js",
1515
"activationEvents": [
1616
"onCommand:codeReDesign.generateCvb",
17-
"onCommand:codeReDesign.uploadCvb",
17+
"onCommand:codeReDesign.redesignCvb",
1818
"onCommand:codeReDesign.applyCvb",
1919
"onCommand:codeReDesign.applyThisCvb",
2020
"onCommand:codeReDesign.analyzeCode",
21-
"onCommand:codeReDesign.uploadThisCvb",
21+
"onCommand:codeReDesign.redesignThisCvb",
2222
"onCommand:codeReDesign.analyzeThisCvb",
23-
"onCommand:codeReDesign.compressThisCvb"
23+
"onCommand:codeReDesign.summaryThisCvb",
24+
"onCommand:codeReDesign.analyzeSingleFile",
25+
"onCommand:codeReDesign.redesignSingleFile",
26+
"onCommand:codeReDesign.startChat",
27+
"onCommand:codeReDesign.continueChat"
2428
],
2529
"repository": {
2630
"type": "git",
@@ -35,8 +39,8 @@
3539
"icon": "${add}"
3640
},
3741
{
38-
"command": "codeReDesign.uploadCvb",
39-
"title": "Upload CVB and Call API",
42+
"command": "codeReDesign.redesignCvb",
43+
"title": "Redesign CVB and Call API",
4044
"category": "CodeReDesign",
4145
"icon": "${cloud-upload}"
4246
},
@@ -64,6 +68,12 @@
6468
"category": "CodeReDesign",
6569
"icon": "${chat}"
6670
},
71+
{
72+
"command": "codeReDesign.continueChat",
73+
"title": "continue Chat",
74+
"category": "CodeReDesign",
75+
"icon": "${chat}"
76+
},
6777
{
6878
"command": "codeReDesign.applyThisCvb",
6979
"title": "sidebar Apply this CVB to Workspace",
@@ -72,8 +82,8 @@
7282
"icon": "${save}"
7383
},
7484
{
75-
"command": "codeReDesign.uploadThisCvb",
76-
"title": "sidebar Upload this CVB and Call API",
85+
"command": "codeReDesign.redesignThisCvb",
86+
"title": "sidebar Redesign this CVB and Call API",
7787
"when": "false",
7888
"category": "CodeReDesign",
7989
"icon": "${cloud-upload}"
@@ -86,8 +96,8 @@
8696
"icon": "${bug}"
8797
},
8898
{
89-
"command": "codeReDesign.compressThisCvb",
90-
"title": "sidebar compress this CVB",
99+
"command": "codeReDesign.summaryThisCvb",
100+
"title": "sidebar summary this CVB",
91101
"when": "false",
92102
"category": "CodeReDesign",
93103
"icon": "${beaker}"
@@ -97,6 +107,20 @@
97107
"title": "Show Guide",
98108
"category": "CodeReDesign",
99109
"icon": "${question}"
110+
},
111+
{
112+
"command": "codeReDesign.analyzeSingleFile",
113+
"title": "CodeReDesign:Analyze single File",
114+
"when": "false",
115+
"category": "CodeReDesign",
116+
"icon": "${bug}"
117+
},
118+
{
119+
"command": "codeReDesign.redesignSingleFile",
120+
"title": "CodeReDesign:Redesign single File",
121+
"when": "false",
122+
"category": "CodeReDesign",
123+
"icon": "${bug}"
100124
}
101125
],
102126
"viewsContainers": {
@@ -112,34 +136,45 @@
112136
"explorer": [
113137
{
114138
"id": "codeReDesign.cvbView",
115-
"name": "CodeReDesign Actions"
139+
"name": "CodeReDesign Actions",
140+
"icon": "images/icon.svg"
116141
}
117142
],
118143
"guide-bar": [
119144
{
120145
"type": "webview",
121146
"id": "guideView",
122-
"name": "User Guide"
147+
"name": "User Guide",
148+
"icon": "images/icon.svg"
123149
}
124150
]
125151
},
126152
"menus": {
127153
"view/item/context": [
128154
{
129155
"command": "codeReDesign.applyThisCvb",
130-
"group": "cvb@1"
156+
"group": "cvb@1",
157+
"when": "viewItem == cvbFile"
131158
},
132159
{
133-
"command": "codeReDesign.uploadThisCvb",
134-
"group": "cvb@1"
160+
"command": "codeReDesign.redesignThisCvb",
161+
"group": "cvb@1",
162+
"when": "viewItem == cvbFile"
135163
},
136164
{
137165
"command": "codeReDesign.analyzeThisCvb",
138-
"group": "cvb@1"
166+
"group": "cvb@1",
167+
"when": "viewItem == cvbFile"
168+
},
169+
{
170+
"command": "codeReDesign.summaryThisCvb",
171+
"group": "cvb@1",
172+
"when": "viewItem == cvbFile"
139173
},
140174
{
141-
"command": "codeReDesign.compressThisCvb",
142-
"group": "cvb@1"
175+
"command": "codeReDesign.continueChat",
176+
"group": "cvb@1",
177+
"when": "viewItem == chatFile"
143178
}
144179
],
145180
"editor/context": [
@@ -148,6 +183,18 @@
148183
"group": "navigation",
149184
"when": "panelFocus && activePanel == 'workbench.panel.output'"
150185
}
186+
],
187+
"explorer/context": [
188+
{
189+
"command": "codeReDesign.analyzeSingleFile",
190+
"group": "cvb@1",
191+
"when": "resourceExtname in codeReDesign.supportedSourceFileTypeExt"
192+
},
193+
{
194+
"command": "codeReDesign.redesignSingleFile",
195+
"group": "cvb@1",
196+
"when": "resourceExtname in codeReDesign.supportedSourceFileTypeExt"
197+
}
151198
]
152199
},
153200
"configuration": {

0 commit comments

Comments
 (0)