Skip to content

Commit a9ce075

Browse files
committed
2 parents 9782681 + 2c37aaf commit a9ce075

File tree

8 files changed

+207
-38
lines changed

8 files changed

+207
-38
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ jobs:
2929

3030
# 尝试从最新release下载src.md5
3131
try {
32-
$latestRelease = gh api repos/${{ github.repository }}/releases/latest --jq '.assets[] | select(.name == "src.md5")'
33-
if ($latestRelease) {
34-
$downloadUrl = $latestRelease.browser_download_url
35-
echo "Downloading src.md5 from latest release: $downloadUrl"
36-
Invoke-WebRequest -Uri $downloadUrl -OutFile $md5File -ErrorAction Stop
32+
$lastSrcMD5Url = "https://github.com/yefansky/CodeReDesign/releases/download/latest/src.md5"
33+
if ($lastSrcMD5Url) {
34+
echo "Downloading src.md5 from latest release: $lastSrcMD5Url"
35+
Invoke-WebRequest -Uri $lastSrcMD5Url -OutFile $md5File -ErrorAction Stop
3736

3837
$storedMD5 = Get-Content $md5File -ErrorAction Stop
3938
echo "Stored MD5: $storedMD5"
@@ -58,20 +57,24 @@ jobs:
5857

5958
# Set up Python
6059
- name: Set up Python
60+
if: steps.check_build.outputs.build_needed == 'true'
6161
uses: actions/setup-python@v4
6262
with:
6363
python-version: '3.10'
6464

6565
# Install PyInstaller
6666
- name: Install PyInstaller
67+
if: steps.check_build.outputs.build_needed == 'true'
6768
run: pip install pyinstaller
6869

6970
# Install Python dependencies
7071
- name: Install Python dependencies
72+
if: steps.check_build.outputs.build_needed == 'true'
7173
run: pip install -r src/python/requirements.txt
7274

7375
# Build EXE to a temporary directory
7476
- name: Build EXE
77+
if: steps.check_build.outputs.build_needed == 'true'
7578
run: |
7679
mkdir temp_dist
7780
pyinstaller --onefile --clean --distpath temp_dist src/python/rag.py
@@ -80,6 +83,7 @@ jobs:
8083

8184
# Compress EXE with UPX
8285
- name: Compress EXE with UPX
86+
if: steps.check_build.outputs.build_needed == 'true'
8387
uses: crazy-max/ghaction-upx@v3
8488
with:
8589
version: latest
@@ -89,12 +93,14 @@ jobs:
8993

9094
# Generate MD5 checksum
9195
- name: Generate MD5 checksum
96+
if: steps.check_build.outputs.build_needed == 'true'
9297
run: |
9398
$md5 = (Get-FileHash -Path temp_dist/rag.exe -Algorithm MD5).Hash
9499
echo $md5.ToLower() > temp_dist/md5.txt
95100
shell: pwsh
96101

97102
- name: Delete old Release
103+
if: steps.check_build.outputs.build_needed == 'true'
98104
run: |
99105
gh release view latest --json url 2>$null
100106
$releaseExists = ($LASTEXITCODE -eq 0)
@@ -111,6 +117,7 @@ jobs:
111117
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112118

113119
- name: Create Release
120+
if: steps.check_build.outputs.build_needed == 'true'
114121
uses: softprops/action-gh-release@v2
115122
with:
116123
files: |

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
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.166 (2025-04-28)
6+
7+
### 0.0.165 (2025-04-28)
8+
9+
### 0.0.164 (2025-04-28)
10+
11+
### 0.0.163 (2025-04-28)
12+
13+
### 0.0.162 (2025-04-28)
14+
15+
16+
### Bug Fixes
17+
18+
* 修复exe构架流程 ([97087f2](https://github.com/yefansky/CodeReDesign/commit/97087f2afa0c62d3308ab4b621eac162497677b7))
19+
20+
### 0.0.161 (2025-04-28)
21+
522
### 0.0.160 (2025-04-28)
623

724
### 0.0.159 (2025-04-28)

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
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.160",
7+
"version": "0.0.166",
88
"engines": {
99
"vscode": "^1.70.0"
1010
},
@@ -414,6 +414,7 @@
414414
"cheerio": "^1.0.0",
415415
"exceljs": "^4.4.0",
416416
"execa": "^9.5.2",
417+
"formdata-node": "^6.0.3",
417418
"iconv-lite": "^0.6.3",
418419
"jschardet": "^3.1.4",
419420
"jsdom": "^26.1.0",

src/apiTools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export const searchTool: Tool = {
327327
required: ['query'],
328328
},
329329
function: async (args: { query: string }) => {
330-
vscode.window.showInformationMessage('CodeReDesign 正在搜索网络');
330+
vscode.window.showInformationMessage(`CodeReDesign 正在搜索网络 ${args.query}`);
331331
try {
332332
const links = await getLinksWithBrowser(args.query);
333333
if (!links.length) {

src/deepseekApi.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ export async function processDeepSeekResponse(
110110
thinking = true;
111111
}
112112

113+
// Think 标签结束逻辑
114+
if (thinking && content) {
115+
options.outputChannel?.append("</think>");
116+
thinking = false;
117+
}
118+
113119
chunkResponse += content;
114120

115121
// 同时输出内容和思考内容
@@ -122,12 +128,6 @@ export async function processDeepSeekResponse(
122128
}
123129
}
124130

125-
// Think 标签结束逻辑
126-
if (thinking && content) {
127-
options.outputChannel?.append("</think>");
128-
thinking = false;
129-
}
130-
131131
// 执行自定义 chunk 处理
132132
if (options.onChunk) {
133133
options.onChunk(chunk);

src/resources/chatPanel.css

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,53 @@ button {
164164
}
165165

166166
think {
167-
color: #9ccc9c; /* 柔和的绿色 */
167+
color: #9ccc9c;
168168
font-style: italic;
169169
opacity: 0.8;
170-
border-left: 3px solid #4d9375; /* 左侧装饰线 */
170+
border-left: 3px solid #4d9375;
171171
padding-left: 0.8em;
172172
margin: 0.5em 0;
173-
display: block; /* 确保块级显示 */
173+
display: block;
174174
white-space: pre-wrap;
175+
}
176+
177+
tool_call {
178+
display: block;
179+
background: rgba(20, 20, 30, 0.95);
180+
border: 1px solid #00b7b7;
181+
border-radius: 8px;
182+
padding: 16px;
183+
margin: 12px 0;
184+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
185+
font-family: 'Courier New', Courier, monospace;
186+
font-size: 15px;
187+
line-height: 1.6;
188+
color: #ffffff;
189+
position: relative;
190+
transition: all 0.2s ease;
191+
}
192+
193+
tool_call::before {
194+
content: '🔧 Tool Call';
195+
display: block;
196+
font-size: 13px;
197+
font-weight: bold;
198+
color: #ffffff;
199+
background: #00b7b7;
200+
padding: 6px 10px;
201+
border-radius: 6px 6px 0 0;
202+
margin: -16px -16px 12px -16px;
203+
border-bottom: 1px solid #00b7b7;
204+
}
205+
206+
tool_call:hover {
207+
transform: translateY(-2px);
208+
box-shadow: 0 4px 8px rgba(0, 183, 183, 0.3);
209+
}
210+
211+
tool_call code {
212+
background: rgba(255, 255, 255, 0.15);
213+
padding: 2px 5px;
214+
border-radius: 3px;
215+
color: #00b7b7;
175216
}

0 commit comments

Comments
 (0)